Stratix4 PCIE endpoint Hard IP and Avalon ST
In order to throttle the Avalon ST bus, I am using the Valid signal of the Avalon ST Interface from my application verilog module to PCIe endpoint Hardpoint. In this case, my application module wants to transmit completion with Data packet. The ready signal from the hard IP to my application module is always high - that means the hard IP is always ready to accept the packets from my application module. But the application module is throttling the 64 bit tx_st_data bus using Valid signal. In this mode, the simulation passes for 4, 8 and 12 DW completions with data but fails for 16 DW complation with data. I am not sure why. If I do not throttle the 16 DW read completion packet then it passes. I looked at txdata[31:0] in epmap and it seems to be going unknown for few clocks.
The failing completion cycle looks like this. Clock1 Valid = 1, SOP = 1, tx_st_data[63:0] = 0108_0010_4a00_0004, Clock2 Valid = 1, SOP = 0, tx_st_data[63:0] = bebe_0180_0000_0004 Clock3 Valid = 0, SOP = 0, tx_st_data[63:0] = bebe_0180_0000_0004 Clock4 Valid = 1, SOP = 0, tx_st_data[63:0] = bebe_0181_baba_0000 Clock5 Valid = 0, SOP = 0, tx_st_data[63:0] = bebe_0181_baba_0000 Clock6 Valid = 1, EOP = 1, tx_st_data[63:0] = 9f1a_220a_baba_0000 As you can see that the application is clearly sending 4DWs of data starting from clock2. I am not sure why the simulation hangs for this case. The read request had Address bit 2 set so the read access was not QW aligned. This is why in clocks2, upper DATA is valid but in clock6 upper data is not valid. Above completion packet was in response to a read request at byte non-prefetchable address 20_0004 with DW count of 4. Again if remove the throttling using Valid signal, it passes. So I am not sure why the throttling due to Valid makes the simulation hang. Any suggestions will be great.