what is the difference between uvm_do_with and uvm_do_on_with?
In reply to lalithjithan:
Hi, lalithjithan
you can use uvm_do_with to specify the item you want to send, and make some constraints to this item. with
uvm_do_on_with, you can additionally specify the sequencer of item.
uvm_do_with(tr, {tr.size == 1;})
uvm_do_with(tr, p_sqr.sqr1, {tr.size == 2;})
Hello,
I have an additional question on `uvm_do_on_with macro, please:
Is it possible to specify the CONSTRAINT argument using a constraint block?
For example:
class my_vseq extends uvm_sequence#(my_seqit); //Virtual sequence type (uses sequence item type)
[...]
my_seq my_seq_h; //Sequence handle
constraint opcode_cnstr { my_seq_h.opcode inside {0,1,2,3,4}; } //opcode is a seqit field
task body();
`uvm_do_on_with(my_seq_h.p_sequencer.my_seqr_h, {opcode_cnstr;} )
//`uvm_do_on_with(my_seq_h.p_sequencer.my_seqr_h, {opcode inside {0,1,2,3,4};} )
endtask
endclass
Thanks in advance!
In reply to andrei.gheorghe:
A short remark first:
a Virtual sequence is a sequence which does not generate seq_items itself. It orchestrates sequences from different sequencers which will generate sequence items.
What you want to do does not work, because the macros are an abreviation of a a set of commands which are executed in a certain order.