How to migrate source-synchronous GPIO to Intel PHY Lite IP?
I first asked this question about 3 months ago (link), but I haven't received any useful replies, so I will try to simplify my question.
I need to use a PHY Lite IP to implement a source-synchronous input interface in a Cyclone 10 GX (or Arria 10). The reason I cannot use normal source-synchronous techniques (see AN433) is that this fails timing. Therefore, according to the Cyclone 10 / Arria 10 documentation, I should use a PHY Lite IP for optimal timing performance.
I have read the PHY Lite user guide repeatedly, but I find it very unclear. I have also read AN756 repeatedly, but it is incredibly vague.
AN756 says this is how to implement a source-synchronous input interface using PHY Lite:
There is no description, just this one vague figure.
The obvious problem is that the top diagram (using ordinary GPIO) has 2 inputs: "Data" and "Clock". The bottom diagram (using PHY Lite) has 3 inputs: "Data", "Strobe In" and "Ref Clock".
So my question is simply: What should "Strobe In" and "Ref Clock" be connected to?
My best guess is that they should both be connected to "Clock" (this guess is based on the fact that there is only one blue waveform, but two blue arrows). I tried this idea in simulation and it seems to work correctly:
However, this fails to build in Quartus. The error message implies that the "Ref Clock" pin must not be connected to anything else.
Please help! After several months, this is extremely frustrating.
My company was somehow able to contact an engineer at Intel, who solved the problem immediately.
In summary:
- The refclk and strb pins (two FPGA pins) must both be driven by the same external clock.
- There is a bug in all versions of Quartus up to and including 21.4, which prevents the IO delay chains from being configured correctly. Therefore, the design will typically fail timing, even if everything has been configured correctly. As a workaround (until the bug is fixed in Quartus 22.1), the IO delay chains can be configured manually (see details below).
Here is the content of the (excellent) E-mail:
Quartus should automatically change the IO delay chain settings such that each IO is optimized for both setup and hold however there appears to be a problem with the automatic delay chain calculation algorithm in 21.3 which is why you are seeing lots of hold violations while your setup looks good. I have checked in 21.4 and can confirm that the same issue exists in that version too. I can however confirm that this issue has been resolved in the latest internal release of 22.1 which is due for release very soon. As a temporary solution (prior to the release of 22.1) you can manually set the IO delay chain values using the assignment below. set_instance_assignment -name IO_12_LANE_INPUT_DATA_DELAY_CHAIN 60 -to InData You can apply this to all InData pins (as in the assignment above) however to get the optimum solution you will need to apply different values on a per-pin basis which is also supported. I am looking at what specific settings are required to close timing and will update you in due course. You can see the delay chain values used in the "Delay Chain Summary" section of the Route Stage report. I tested the assignment above in 21.3 and the interface closed timing. With regard to the refclk versus the strobe, ideally these should both originate from the same clock source such that they are PPM aligned. This will prevent the internal FIFO within the PHYLITE IP from overflowing/underflowing. The simplest solution is to connect the same clock on your board to both the strobe and refclk pins of the device.
We applied these changes in our project and it met timing. Correct behavior has been confirmed in simulation.