In reply to cgales:
Thanks cgales for your reply. I have some doubts related to my code, I want to constraint values in sequence from the virtual sequence. But I am unable to constraint the values. If anyone knows how to do please explain me with an example. Thanks
//THIS IS MY SEQUENCE CLASS
class seq1 extends uvm_sequence#(transaction);
`uvm_object_utils(seq1)
//constructor
task body;
transaction req = transaction::type_id::create("req");
repeat(10) begin
`uvm_do_with(req,{req.a == a; req.b == b;})
end
endtask
endclass
//VIRTUAL SEQUENCE CLASS
class virtual_seq extends uvm_sequence#(transaction);
`uvm_object_utils(virtual_seq)
`uvm_declare_p_sequencer(virtual_sequencer)
seq1 s1;
//constructor
task body;
s1 = seq1::type_id::create("s1");
`uvm_do_on_with(s1, seqr_h.p_sequencer,{s1.a == 5; s1.b == 10; } )
endtask
endclass