I want to transfer a couple of bits between two clocks, so I build a small handshake logic, but my timing analyzer shows me some violations.
Setup/hold violations and in addition some rule check violations, about un-constrained asynchrous data transfer. I guess this is all related to some missing constrains.
I tried using multi-cycle constrains, but this didn't do much. (The clocks both use the same frequency so I assume this to be wrong anyway?)
The design, despite the violations works, but I still want to get rid of the / understand what's going on. Maybe someone here has experience in this field. When everything is derived from one common clock using a pll I never had such a problem, my first time working with a rather big fpga and multiple external clocks.
In case this helps:
- Software Quartus PRO
- FPGA Stratix 10
- DE10PRO (Board from terrasic)
Edit:
The clocks should be unrelated and they are not derived from the same source (atleast not inside the fpga)
A bit more information:
- (clk_sys) The first clock I get from a clock pin and change it using a pll inside the fpga (pll to make sure it has the same frequency as the following ones)
- (clk_tx) This one is provided by a transceiver ip inside my fpga
- (clk_rx) This one is provided by a transceiver ip inside my fpga
The transceiver uses an external reverence clock which is in turn generated by an external pll.
What I want to do is transfering the tx data from my user logic to my transceiver and the rx data from the transceiver to my user logic.
The whole design works more or less as a fast network card using fiber optics. (So there are even more clocks inside the design, like pci-e and even some ddr4 for logging purpose, but for the I used an avalon bus, which takes care of clock-crossing. Only for the transceiver I had to use user logic)
Finally:
Yes my question is how to transfer data safely between 2 clock domains without warnings from my timinanalyer.
As I have a handshake inbetween with multiple stages synchronisation register for the control signal I'm confident my transfered data is stable at the time. But my analyzer doesn't seem to recognize it (?).