I have the following code in which data act as top sequence which execute other sequences and I am using this offset to pass it to another child sequence
Class Data ;
randc bit [1:0] offset ;
virtual task body () ;
for (int i=0; i<4 i++) begin
this.randomize ();
$display ("value of offset=%0b",offset);
<executing another sequence which take offset as an input >
end
endtask
endclass
the problem is that this offset output is not randomized as cyclic at all , some values are repeated without providing all values for offset.
New contributor
Ahmed Taha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.