Altera_Forum
Honored Contributor
14 years agoTSE "small MAC" isn't asserting fifo_rx_dsav signal for min size Eth frames
I have a "Small MAC" instantiation of the TSE for a 100 Mbit link. It appears that it isn't asserting the fifo_rx_dsav signal for small messages. When we try to ping our DUT (device under test) from a PC, it times out on the first attempt (sends out an ARP but not ARP response received), but the ping is successful the next time. Using SignalTap, we can see that nothing comes out of the Rx FIFO because the fifo_rx_dsav signal is never asserted (which is what my state machine uses to start pulling an Ethernet frame out of the FIFO). When the ARP from the second Ping attempt comes in, the MAC finally indicates frames are pending and I'm able to pull them out.
It seems as though the ARP frames (minimum size frames in general) aren't big enough to trip the FIFO threshold logic. The small MAC has this threshold stuck at a fixed value 16 words, or 64 bytes, which is the minimum allowable Ethernet frame size. The ARP is 42 bytes, but per protocol, is padded out to 64 bytes by the PC before sending to my DUT. Does the logic for this threshold work such that the FIFO fullness has to EXCEED the threshold or just reach it (be equal to it)? What else might be causing this behavior? I even enabled the option to pass the CRC on to the user application to ensure it is big enough to reach the threshold. I tried using the almost empty flag instead (set to a static value of 3 words for the small MAC), but my state machine got stuck at startup when an erroneous frame came in from the PHY. My state machine looks for the end-of-packet signal and checks the error signal on that cycle, throwing away the message if both are asserted. Signaltap indicated that an erroneous frame came in from the PHY (RX ERROR signal was asserted) and I could see my state machine eventually start pulling it out of the Rx FIFO. But my state machine never returned to the idle state because the end-of-packet signal was never asserted. This is probably unrelated and is a separate issue. That issue prevented me from using the alternate signal (fifo almost empty) as my work-around to this issue. Any ideas, suggestions, or questions? This is killing me and our integration schedule!