My Yorkies grew up with my cats but will chase them often. The Yorkies do know when to leave the cats alone. Mika (14) rules with an iron paw while Tallulah (12) will just sit there and take it. Tallulah actually loves the dogs and will cuddle up to them and rub on them which usually ends with a yorkie chasing her. Buddy (90 pound golden) is terrified of Mika and tortured my Tallulah who baths him daily and loves to rub on him and he never does anything. He will put himself between the Yorkies and the cats to protect them. The Yorkies have never hurt the cats. The cats do have dog free safe areas.
It will take time but they will work it out