In reply to dave_59:
You were right, sequence construction was not inside. I did move it inside. But it didn’t change anything. The ob_agent_num generated were unique(they were 5) and none repeated. So, it didn’t make any difference to the simulation. Probably I need to debug is further.
I did try below code,
begin
your_sequence_base seq;
a = ....;
b = ....;
ob_agent_num = $urandom_range(0,7);
$cast(seq,ob_seq[ob_agent_num].create_object("");
seq.randomize;
seq.start(p_sequencer.ob_agent_sequencer[ob_agent_num]);
end
``` verilog
But it reports, " Null object access, The object is being used before it was constructed/allocated" at below line. Do I have to specify anything in those quotes or anything is missing?
$cast(seq,ob_seq[ob_agent_num].create_object("");
There is always something to learn from your posts. Thank you!