AXI4 icon indicating copy to clipboard operation
AXI4 copied to clipboard

AXI stream Receiver: Give users more time to specify options at the start of a test

Open SkydiverTricky opened this issue 3 years ago • 0 comments

Currently, the AXI Stream Receiver has the following lines at the start of the ReceiveHandler process:

-- Initialize
TReady  <= '0' ;
wait for 0 ns ; -- Allow ReceiveFifo to initialize

ReceiveLoop : loop
  if WaitForGet then 
  ....

 DoAxiReadyHandshake (
....

Because this process only waits for a single delta, it is impossible to set WaitForGet via the TransRec in TransactionDispatcher as this will take 2 deltas to assign a value to WaitForGet. This causes the ReceiveHandler to automatically assign TReady to '1' and it remains this way until the first transaction.

It means a user cannot set options that affect the behaviour of tready: RECEIVE_READY_BEFORE_VALID RECEIVE_READY_DELAY_CYCLES or RECEIVE_READY_WAIT_FOR_GET until after the first transaction.

A couple of options for work arounds:

  1. Have the process wait a few more deltas at the start of the process (enough that they could apply all of the options above)
  2. Have a signal into the entity (or via some other means) that is an initialisation blocker, so you can do the following instead of waiting for a single delta:
-- Initialize
TReady  <= '0' ;
WaitForBarrier(initDone);

..etc

SkydiverTricky avatar Jun 22 '22 18:06 SkydiverTricky