Reply To: Simulating Backpressure with the AXIS VC

Why OSVVM™? Forums OSVVM Simulating Backpressure with the AXIS VC Reply To: Simulating Backpressure with the AXIS VC

#2167
Jim Lewis
Member

Hi Adam,
Currently the features that control these is described on pages 26 and 27 of the AxiStream_user_guide.pdf in OsvvmLibraries/Documentation. There are two controls for this:
RECEIVE_READY_BEFORE_VALID – this is true by default and allows TReady to be generated even if TValid is not asserted.
RECEIVE_READY_DELAY_CYCLES – Number of clocks to delay the assertion of TReady. This setting depends on the RECEIVE_READY_BEFORE_VALID setting. If RECEIVE_READY_BEFORE_VALID is TRUE, then delay (in clocks) is referenced to the completion of the previous cycle. If RECEIVE_READY_BEFORE_VALID is FALSE, then delay (in clocks) is referenced to when RValid is asserted.

This is demonstrated in the test cases TbStream_AxiTiming2.vhd and TbStream_AxiTimingBurst2.vhd. You will find these in the OsvvmLibraries/AXI4/AxiStream/TestCases directory. See the AxiReceiverProc. If you want to run these and look at the results, I recommend modifying OsvvmLibraries/AXI4/AxiStream/RunDemoTests.pro – this is exactly what it is intended to be used as. Simply replace the
RunTest ./TestCases/TbStream_SendGetDemo1.vhd
with (the SetInteractiveMode logs all signals and allows you to display waveforms after the test case finishes running).

SetInteractiveMode TRUE
RunTest ./TestCases/TbStream_AxiTiming2.vhd
RunTest ./TestCases/TbStream_AxiTimingBurst2.vhd

Setting these is done via SetAxiStreamOptions transaction. The following generates RReady once every 5 clocks independent of whether RValid is asserted or not.

SetAxiStreamOptions(StreamRxRec, RECEIVE_READY_BEFORE_VALID, TRUE) ;
SetAxiStreamOptions(StreamRxRec, RECEIVE_READY_DELAY_CYCLES, 5) ;

The following generates RReady 5 clocks after RValid is asserted.

SetAxiStreamOptions(StreamRxRec, RECEIVE_READY_BEFORE_VALID, FALSE) ;
SetAxiStreamOptions(StreamRxRec, RECEIVE_READY_DELAY_CYCLES, 5) ;

Looking into the near term future, we have plans to update this to use randomization. We have been brainstorming about its operation/use model. I think the new features are ready to implement. The challenge is maintaining backward compatibility with the current features – and I think we have that sorted out.

Best Regards,
Jim