In reply to cgales:
Hi Cgales,
Thanks for the comment. In the below code, whatever randomized in trans_seq will be passed to write_seq right. But, while executing this code, I observed that, write_seq.write_data and write_seq.address has different data.
Note : Both are started with p_sequencer.
class write_seq extends uvm_sequence #(uvm_sequence_item);
`uvm_object_utils(write_seq)
`uvm_declare_p_sequencer(virtual_sequencer)
rand bit[31:0] write_data;
rand bit[31:0] address;
endclass : write_seq
class trans_seq extends uvm_sequence #(uvm_sequence_item);
`uvm_object_utils(trans_seq)
`uvm_declare_p_sequencer(virtual_sequencer)
function new(string name = "trans_seq");
super.new(name);
endfunction : new
rand bit[31:0] write_data;
rand bit[31:0] address;
write_seq wr_seq;
extern virtual task body();
endclass : trans_seq
task trans_seq::body();
wr_seq = write_seq::type_id::create("wr_seq");
wr_seq.randomize with {write_data == this.write_data;
address == this.address;};
wr_seq.start(p_sequencer);
endtask : body