Sequence arbitration is a configuration setting within a sequencer to control the execution of multiple sequences when they are launched in parallel. For example, we could have multiple sequences started on a single sequencer using a
fork-join block and we need to have a scheme for the sequencer to order the execution of sequences.
In the code below, how do you know what order the sequencer will follow ?
class my_test extends uvm_test; ... virtual task run_phase (uvm_phase phase); ... fork m_seq1.start (m_sequencer); m_seq2.start (m_sequencer); m_seq3.start (m_sequencer); join ... endtask endclass
For this purpose, there are 6 different UVM arbitration modes that can be applied to a sequencer.
This is the default arbitration mode where the UVM sequencer starts them in the order specified within the
fork-join regardless of their priorities.
In here the sequencer will randomly start sequences regardless of their priorities.
This mode will always grant the sequence with highest priority first. Multiple sequences with the same priority will be arbitrated similar to a FIFO.
This mode will always grant the sequence with highest priority first. Multiple sequences with the same priority will be randomly picked.
There is a higher chance of picking higher priority sequences in this mode.
If none of the above modes satisfies your requirement, then you can create a user defined arbitration scheme. All you need to do is to create a new sequencer extended from
uvm_sequencer and define its