m-labs / misoc

The original high performance and small footprint system-on-chip based on Migen™
https://m-labs.hk
Other
306 stars 85 forks source link

liteeth: Fix Kintex UltraScale GTH intermittent breakage #108

Closed HarryMakes closed 3 years ago

HarryMakes commented 3 years ago

Fingers crossed, this PR should finally, once and for all, fix https://github.com/m-labs/artiq/issues/1424 where the Ethernet on the KU FPGA on Metlino would randomly break. The symptom can be any of the following:

After consulting this Xilinx page, I believe the GTH is still missing some Xilinx parameters or signals, so I tweaked liteeth_mini's current usage of the GTH and tested. At the time of writing, I only needed to add the PROGDIVRESET signal such that both the GTH TX/RX and their programmable divisors are reset altogether, which should guarantee that the TX/RXOUTCLK aren't flatlined. And this has so far eliminated all the symptoms I described above.

It would be best to double check my logic and/or find more symptoms to test with, but I think this PR should be good enough. This has been tested on different units of Metlino, one in Hong Kong (M-Labs) and one in Poland (Creotech).

sbourdeauducq commented 3 years ago

Great! Should a similar fix be applied to https://github.com/m-labs/artiq/blob/master/artiq/gateware/drtio/transceiver/gth_ultrascale.py ?

jbqubit commented 3 years ago

Great find @HarryMakes. Thank you for persevering!