Driver can send responses via rsp_port ( analysis_port ) through :: rsp_port.write( rsp ) ;
The Sequencer sends the response back to appropriate sequence based on
( Response ) property ’ sequence_id ’
The write() Call essentially pushes the Response inside the Response Queue of the Sequence !!
My question is when should driver call :: rsp_port.write( RSP ) ??
Based on my understanding to send response via driver ::
[a] seq_item_port.item_done() is necessary when there is No Pipelining !!
item_done() with Optional Response needs to be called if get_next_item() is Used !!
[A] If driver uses get_next_item() , user has to call item_done() .
So no point in callng write(RSP ) when driver does get_next_item() .
Response CAN be sent directly via :: item_done( RSP )
Hence write() CAN'T be called as an alternative to :: item_done(RSP) !!
**seq_item_port.put_response( RSP ) / seq_item_port.put( RSP ) is Called when get() is Used in driver i.e there is Pipelining !!
If driver does get() , instead of seq_item_port.put_response( RSP ) / seq_item_port.put( RSP )
rsp_port.write( RSP ) CAN be Used !!
[b]The ONLY advantage with rsp_port.write() is components can receive the Response via write() by connecting to driver’s rsp_port !!**
**[Q2] Sequence waits for response via :: get_response( rsp ) ;
Is there any alternative for fetching responses in the sequence ?**