Jump to content

Recommended Posts

Posted

Hi All UVM Geeks,

I have been recently moved to UVM and trying to find out answer to a basic question.

Is it possible to call multiple sequences from within the test cases.

From UVM UBUS example I found that it is possible to override the default sequence from within the build phase. This can only invoke one sequence.

What is need in my test case is -

"Seq1" --- <some delay> - "Seq2"----- <some_delay> - "Seq3".................................

How can I have such control in my test case.

Regards,

Abhishek

Posted

You should rather start the sequences on the sequencer(s) in your test :

class my_test extends uvm_test;

... etc ...

virtual task run_phase(phase);

// create the sequences

...

// start the sequences

seq1.start(sequencer,null);

seq2.start(sequencer,null);

... etc ...

endtask

endclass

Posted

hi,

why not to make a new sequence which does

>"Seq1" --- <some delay> - "Seq2"----- <some_delay> - "Seq3".................................

as an alternative you may use the sequence library to create a "random" kind of sequence.

/uwe

Posted

hi,

why not to make a new sequence which does

>"Seq1" --- <some delay> - "Seq2"----- <some_delay> - "Seq3".................................

as an alternative you may use the sequence library to create a "random" kind of sequence.

/uwe

Hi All,

Can you throw some more light on the same problem...As to where we will define these sequence??

Also cant we use arbitration algorithm for the same??

If possible can you explain with small piece of code??

Thanks a lot....:)

Posted

task body;
      my_seq_base seq_array[$];
      seq_array.push_front(my_seq_0::type_id::create("seq_0");
      seq_array.push_front(my_seq_1::type_id::create("seq_1");
      seq_array.push_front(my_seq_2::type_id::create("seq_2");
      seq_array.push_front(my_seq_3::type_id::create("seq_3");

      // Shuffle the array contents into a random order:
      seq_array.shuffle();
      // Execute all the array items in turn
      foreach(seq_array[i]) begin
         if(!seq_array[i].randomize()) begin
            `uvm_error("body", "randomization failed for req")
         end
         seq_array[i].start(m_sequencer);
      end
   endtask: body
More example can be found here

http://verificationacademy.com/uvm-ovm/Sequences/Generation

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...