Friday, January 22, 2016

starting_phase for uvm sequence

The sequence can be run using 2 methods in UVM.
1. By setting the seq as default_sequence on a specific sequencer

uvm_config_db #(uvm_object_wrapper)::set (this, "env.misc_vsqr.main_phase", "default_sequence",
         test_seq);


2. By starting the seq on a specific sequencer
 test_seq.start(env.misc_vsqr);

Each sequence will have starting_phase and this needs to be passed with correct phase from where it has been called. In default_sequence method, this is taken care as we mention the phase while setting in the config_db.

Whereas in start method, we have to pass explicitly like below:-
test_seq.starting_phase = this.starting_phase;   //If you invoke from uvm_component
test_seq.starting_phase = parent_sequence.starting_phase;   //If you invoke from another uvm_sequence

then, you can call the start method.

No comments:

Post a Comment