-2

x.stop_sequences() is causing this

UVM FATAL Item_done() called with no outstanding requests. Each call to item_done() must be paired with a previous call to get_next_item()

Can someone tell me how to use stop_sequences while making sure the driver is inactive?

Matthew Taylor
  • 13,365
  • 3
  • 17
  • 44
uvm123
  • 1

2 Answers2

0

I don't think there is any built-in mechanism; you have to write the code yourself. Basically, you need to implement a reset or interrupt mechanism in your driver. Here is a skeleton idea:

  task run_phase (uvm_phase phase);
   forever begin
   @(posedge <ENABLE INPUT>);
   fork
     <DO DRIVERY THINGS>;
   join_none
 
   @(negedge <ENABLE INPUT>);
    disable fork;
   end
  endtask: run_phase
Matthew Taylor
  • 13,365
  • 3
  • 17
  • 44
0

In addition to @mathew-taylor's suggestion, you may need to also consider the monitor, since it will need to discard partially assembled data collections.

If you have a reactive driver, this gets even trickier. It would be prudent to provide an boolean validity attribute in your transactions. Construction would set it to true (1'b1). If responses are outstanding upon reset, send all the outstanding responses after setting the validity field to false (1'b0). This will keep the sequencer from jamming. Any consumer of transaction data would then need to examine the validity. To simplify, you could build in the check via accessor functions and make all attributes local. This would also work on the monitor.