How does a UVM sequence change the transactions based on DUT Outputs

In reply to n347:

I am looking for ways to modify my UVM sequence to call a diff sequence/transaction or stop the stimulus requests to the DUT based on DUT outputs.
For example: if the DUT has an output packet size greater than 1000, the Sequence should slow down driving packets to the DUT. Or modify the transactions… How can this be achieved?
I could think of

  1. Some kind of communication between monitor and Sequencer?
  2. Driver sending a response back to the sequence? But driver doesnt know about DUT outputs , only monitor knows.
    Please suggest!

Driver can collect the DUT outputs and it can send it back to sequence using the following methods

seq_item_port.item_done(rsp);
seq_item_port.put_response(rsp);
rsp_port.write(rsp);

Sequence can get the response using

get_response(rsp)

and can modify the transactions