Question on use_response_handler() and response_handler functions

In reply to puranik.sunil@tcs.com:

You have 2 options to handle responses from the driver to the sequence:
(1) Sending back the response from the driver to the sequence using put or item_done: In the sequencer you have to execute get_response explicitly. This works perfectly with non-pipelined protocols.
(2) Using the response handler sends automatically a response to the sequence. You have to enable the response_handeler by calling

use_response_handler(1);

in the sequence (body task). And you have to override the function

response_handler

.
The implementation in the base class is doing nothing. One very simple implementation is to count the responses. This look like this:

function void response_handler(uvm_sequence_item response);
     count++;
endfunction: response_handler

It keeps also the reponse FIFO empty. Additionally you can add more functionality to this function. Using the response handler works with pipelined/out-of-order protocols.