Jump to content

Recommended Posts

Posted

hi,

starting_phase is not set if you start a sequence manually via someseq.start(). but you are free to add the assignment to starting_phase there as well... this might help but gets complicated in case of sequences spawning over phases or multiple encapsulated .start()-ed sequences.

  // Variable: starting_phase
 //
 // If non-null, specifies the phase in which this sequence was started.
 // The ~starting_phase~ is set automatically when this sequence is 
 // started as the default sequence. See 
 // <uvm_sequencer_base::start_phase_sequence>.

actually the issue goes deeper, a component is executing a set! of phases at the same time (simple example run+post_main). therefore if a sequence is started at some point in time it is upto the end user to specify which phase was starting the sequence. there was a discussion in the TSC about that topic as you saw but a proper solution was defered to a later release.

/uwe

Posted

hi,

the simple model is:

1. start your sequences automatically via the phase hooks

2. if you use seq.start() and expect the sequences to bject phase progression make sure you set the seq.starting_phase appropriate

3. for sequences objecting phase progression make a derived class like the following and use it as base for active sequences

virtual class uvm_active_sequence #(type REQ=int,RSP=REQ) extends uvm_sequence#(REQ,RSP); 
   virtual task pre_body();
       if(starting_phase) starting_phase.raise_objection(this, "master seq active");
   endtask

   virtual task post_body();
       if(starting_phase) starting_phase.drop_objection(this, "master seq inactive");
   endtask

   function new(string name ="uvm_active_sequence");
       super.new(name); 
   endfunction
endclass

if you have a more advanced model with sequences spawning phases and sequences acitvely starting other sequences which do require access to the phasing system you probably need a hand crafted solution depending upon your exact requirements.

/uwe

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...