05-23-2018 08:11 AM
I have been attempting to get a simulation working for a design making use of a GTHE3_CHANNEL module for some time now, and haven't had any luck.
This is being used for a 1g ethernet interface and works perfectly in hardware, but in simulation the transceiver will not maintain character alignment when it has locked to the correct character. (In my case, 20'hA257C).
The transceiver is in PCS mode with SHOW_REALIGN_COMMA set to "false".
I am manually aligning it so am making use of the RXSLIDE input. The problem I'm seeing is that it will become aligned, and I will pulse RX_SLIDE whch causes it to realign itself by one bit as expected. However, after a short period of timing, it will automagically begin realigning itself again and land on a random alignment. Please see rx_slide_realignment.png for an example of this.
In this image, iData[19:0] is the data coming out of the rx port on the GTHE3_CHANNEL. As you can see, it has aligned itself to 7CA25, so I pulse RX_SLIDE 8 times (pulsed for 2 usr clk cycles, minimum of 32 cycles apart) so it can realign itself to A257C. Seems to work? But then the GTHE3_CHANNEL just starts jittering its data output and realigns itself somewhere else again. I've setup a sim to just run forever and it does the same thing repeatedly, but will never actually stay aligned to the correct character.
Any ideas what is causing this? It only happens in simulation, as I stated it works perfectly in hardware.
05-23-2018 08:21 AM
This problem is usually the result of having comma alignment enabled. You should add RXBYTEISALIGNED and RXBYTEREALIGN to your simulation. If they are active it is a problem. When you create your design you should have comma alignment disabled.
05-23-2018 08:36 AM
Yes, I was thinking if you used the example design simulation it would include a comma character where your normal data flow might not.