In the UVM test I declare and start the sequences, but the output from separate sequences with the same parameters are "related" somehow(see example at the bottom), so when I do cross coverage I only coverage 12.5% of the cases, what is causing this? How can I make the output of the two sequences independent and random?
//declare
ve_master_sequence#( 8,`num_inputs) x_agent_sequence_inst;
ve_master_sequence#( 8,`num_inputs) y_agent_sequence_inst;
//build_phase
x_agent_sequence_inst = ve_master_sequence#( 8,`num_inputs)::type_id::create("x_seq");
y_agent_sequence_inst = ve_master_sequence#( 8,`num_inputs)::type_id::create("y_seq");
//run_phase
x_agent_sequence_inst.start(multadd_env_inst.ve_x_agent_inst.sequencer);
y_agent_sequence_inst.start(multadd_env_inst.ve_y_agent_inst.sequencer);
The environment contains 4 master agents, two 32 bit, two 8 bit. The same parameterized sequence is run on all the agents
// within the sequence
virtual task body();
`uvm_info("ve_master_sequence", $sformatf("begin body()"), UVM_MEDIUM);
for(int i=0; i<length; i++) begin
req = ve_seq_item#(data_width)::type_id::create("req");
start_item(req);
while(!req.randomize() with {
data <= (2**data_width)-1;
delay dist { [0:1] := 2, [2:6] := 1};
});
finish_item(req);
get_response(req);
end
#1000;
endtask
I replaced the req.randomize() with $urandom_range, which worked but it means losing all the constrained random abilities of systemverilog.
When I run the code, and do cross coverage there is a relationship between the output of the sequencers that are the same size,
when y = 0 is always x = 79 or 80
when y = 1 is always x = 80 or 81
when y = 2 is always x = 81 or 82
....
when y = 51 is always x = 130 or 131
when y = 52 is always x = 131 or 132
etc..