Jump to content

Calling Sequneces from within a sequence


Recommended Posts

Hi All UVM Geeks,

Guys I came across with a statement that says - "UVM sequences can call other sequences".

I think that simply means - Few simple sequences can be used to compose complex sequences.

Somehow, I m not able to find an example which can actually demonstrate this behavior.

Can some one explain how this can be done.

Regards,

Abhishek

Link to comment
Share on other sites

hi,

maybe its too simple :-) uvm_do* does items and sequences ...

/uwe

class simple_seq_do extends uvm_sequence #(simple_item);

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

 `uvm_object_utils(simple_seq_do)    

 virtual task body();
   `uvm_info(get_name(), $sformatf("In body() of %s", get_name()),1000)
   `uvm_do(req)
 endtask

endclass : simple_seq_do



class simple_seq_sub_seqs extends uvm_sequence #(simple_item);

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

 `uvm_object_utils(simple_seq_sub_seqs)    

 simple_seq_do seq_do;

 virtual task body();
   `uvm_info(get_name(), $sformatf("In body() of %s", get_name()),1000)
   #100;
   `uvm_do(seq_do)
 endtask

endclass : simple_seq_sub_seqs

EDIT: uvm_sequence_utils are deprecated - changed to uvm_object_utils

Edited by uwes
Link to comment
Share on other sites

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