How to pause a sequence based on event

Hi Hao,

In reply to peterjin:

Hi,
I have a question about how to pause a uvm_sequence based on events.
My test setup is like this:

  1. I am trying to simulate a QoS-based flow control traffic

This immediately gets me thinking about using the priority feature of the sequencer.

  1. I have one driver and 4 sequences, all the four sequences are being arbitrated on the same sequencer. Each sequence represents a QoS class.
  1. During the simulation, all four sequences will be driving data via the same driver

When not throttled, do they all have equal priority?

In the meantime, the environment will generate a pause-event to pause a certain sequence (let’s say sequence 0).
What I want to achieve:

  1. When the environment generates the pause-event to pause sequence0, only sequence0 should be paused, while seq1,2,3 should continue to drive data to the DUT

This would correspond to lowering the priority of a sequencer.

  1. After some time, when the environment generates the clear_pause-event to unpause sequence0, sequence0 should resume driving data

This would correspond to restoring the priority.

[br]It sounds like you could use set_arbitration() to put the sequencer in either UVM_SEQ_ARB_STRICT_FIFO or UVM_SEQ_ARB_STRICT_RANDOM mode, and then alter the priority of sequences as needed. If your environment has a handle to all of the sequences which need to have their QoS modified, it would simply call set_priority() on the sequence you want to pause or unpause.

The change in priority will apply to the next item the sequence tries to send. If there is already a pending item already started on the sequencer, it’s priority won’t be changed.

-Ryan