Jump to content

FORK JOIN_NONE in UVM_SEQUENCE


Recommended Posts

class my_virtual_sequence extends uvm_sequence;
`uvm_sequence_utils(my_virtual sequence,my_v_sequencer)
exec_sequence eseq_inst[100];

...
virtual task body();

 for(int i = 0 ; i <100 ; i++)begin
 
     fork
       automatic int var = i; // this is not allowed , getting compilation error 
       `uvm_do_on(eseq_inst[var], p_sequencer.master_sequencer[var])
     join_none
 end
.....
some other piece of code                   
.....
endtask: body
endclass: my_virtual_sequence

Hi ,

As per the above code, I wanted to parallely fire 100 transactions on 100 different masters_sequncers.

Question 1: But it is not allowing to declare automatic variable before fork. what is alternative to this ?

Also Question 2: when we execute `uvm_do_on(eseq_inst[var],...) , so it creates an object and registers with factory.

Does for every iteration it registers with factory the same name eseq_inst[var] instead of value eseq_inst[0]/eseq_inst[1]/eseq_inst[3].

Since I checked UVM library and found 

 

 

`uvm_do_on_with implicity calls `uvm_create which further calls create_item()

as :

{ \
uvm_object_wrapper w_; \
w_ = SEQ_OR_ITEM.get_type(); \
$cast(SEQ_OR_ITEM , create_item(w_, SEQR, #SEQ_OR_ITEM));\
}
Definition at line 146 of file uvm_sequence_defines.svh.

while create_item has been defined as:
protected function uvm_sequence_item create_item(
uvm_object_wrapper type_var,
uvm_sequencer_base l_sequencer,
string name
)
 

So what is the work around to this if one wants to execute it with `uvm_do_* .

May be using seq.start(sequncer) can be solution , but wandering if I can do it `uvm_do.

 

Thanks

Link to comment
Share on other sites

Great many thanks Tudor , I  overlooked it .  

Also can you please also provide your expertise feedback on :

 

Question 2: when we execute `uvm_do_on(eseq_inst[va],...) , so it creates an object and registers with factory.

Does for every iteration it registers with factory the same name eseq_inst[va] instead of value eseq_inst[0]/eseq_inst[1]/eseq_inst[3].

as per UVM library :

 

`uvm_do_on_with implicity calls `uvm_create which further calls create_item()

as :

{ \
uvm_object_wrapper w_; \
w_ = SEQ_OR_ITEM.get_type(); \
$cast(SEQ_OR_ITEM , create_item(w_, SEQR, #SEQ_OR_ITEM));\
}
Definition at line 146 of file uvm_sequence_defines.svh.

while create_item has been defined as:
protected function uvm_sequence_item create_item(
uvm_object_wrapper type_var,
uvm_sequencer_base l_sequencer,
string name
)

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