Hi UVM forum,
I encountered a problem that relate to killing a sequence, more correct why do I need it.
here is a snippet of the code inside a sequence, the problem will be described at the end of this post.
task body();
start_do();
endtask;
task start_do()
forever begin
fork
send_do()
join
end
endtask
task send_do();
fork
begin
seq_a.start(null); // write to RAL
end
begin
for (int idx=0; idx<8; idx++) begin
automatic i=idx;
fork
seq_b[i].start(seqr_b[i]); //toggle some interface array
join_none
end
wait fork;
end
join_any
disable fork;
endtask
class seq_a extends uvm_sequence;
...
task body();
m_ral.reg_name_1.write(stats, value);
wait_some_time();
....
m_ral.reg_name_n.write(stats, value);
endtask
endclass
class seq_b extends uvm_sequence #(seq_item);
...
task body();
forever begin
`uvm_do(req)
end
endtask
endclass
The first iteration in method start_do() work as expected.
In the 2nd iteration I get UVM_FATAL says “sequence seq_a already started”
I had to kill all the sequences using
....
disable fork;
seq_a.kill()
endtask : send_do()
Why is that? Shouldn’t the “disable fork” port kill every thing inside the “fork … join any”?