My schematic looks like this:

simulate this circuit – Schematic created using CircuitLab
How should i connect ground and power supply to comparator? I have some signal which i want to convert to LVDS. My output stage from analog is based on LM6172. I convert amplitude to pulse width via comparator LM311 which then goes to LVDS driver. Comparator has both neagtive and positive power supply and GND port. I usually separate analog and digital grounds and power supply (with some ferrite beads i.e) but i dont know really how to do this here. Second input of comparator is DAC which is connected to digital GND. So should I connect my comparator to digital or analog power supply and ground? I thought about using optocoupler but i dont have much space on board for that.