Finish Of Sequence

Hi All,

I have a requirement, where I have to run same sequence again and again multiple times, but want to ensure that sequence got over.

Can you anyone tell me, if there is a way using which we can figure out sequence got over?

In reply to kmishra:

You can use simply loop construct to run your sequence several times in your body task like this

task body();
  repeat (10)
    `uvm_do(seq)
endtask : body

This will execute your sequence named seq 10 times.

In reply to chr_sue:

You should not use the `uvm_do_* macros.


task body();
  seq = my_seq::type_id::create("seq");
  repeat (10) begin
    if (!seq.randomize()) begin
      `uvm_error(get_full_name(), "Randomization error!");
    end
    else begin
      seq.start();
    end
  end

Why not to use `uvm_do?

In reply to kmishra:

Read this article from the UVM Cookbook.