Hi,
I have a situation for which I don’t have a clean solution yet.
- Frontdoor sequence fetching handle of a TLM FIFO and performing a blocking .get() as part of the sequence.
- Testcase where a RAL access timeout is produced and handled within a fork.
The 1st RAL access is supposed to return nothing and the frontdoor sequence to stay stucked at the tlm.get() line. My expectation was that by exiting the fork, the frontdoor sequence will be terminated as well → not the case: the 2nd read is not even started, and the frontdoor sequence is still stucked at the tlm.get() line.
How can I correctly terminate the frontdoor sequence?
class my_frontdoor_seq extends uvm_reg_frontdoor;
`uvm_object_utils(il_frontdoor_seq)
uvm_tlm_analysis_fifo #(resp_item) resp_fifo;
task pre_body();
if(!uvm_config_db #(uvm_tlm_analysis_fifo #(resp_item))::get(null, get_full_name(), "resp_fifo", resp_fifo))
`uvm_fatal(get_type_name(), "Error fetching resp_fifo")
endtask: pre_body
task body;
start_item(cmd_read);
finish_item(cmd_read);
resp_fifo.get(read_response);
endtask
endclass
and the testcase:
...
do_something_to_block_the_DUT();
...
`uvm_info("DEBUG","Sending Read, expecting timeout", UVM_LOW)
fork
begin
fork begin
my_ral_reg.read(.status(rw_status), .value(data), .path(UVM_FRONTDOOR));
test_failed();
`uvm_fatal("DEBUG", "No timeout! DUT not blocked!")
end
join_none;
wait fork;
end
begin
#50us;
`uvm_info("DEBUG", "Read timeout", UVM_LOW)
end
join_any
disable fork;
...
// do something to unblock the DUT
send_flush_command();
...
`uvm_info("DEBUG","Sending Read, expecting no timeout", UVM_LOW)
fork begin
fork
begin
my_ral_reg.read(.status(rw_status), .value(data), .path(UVM_FRONTDOOR));
test_passed();
`uvm_info("DEBUG", "No timeout! Flush worked!", UVM_LOW)
end
begin
#30us;
test_failed();
`uvm_fatal("DEBUG", "Timeout! Flush did not work!")
end
join_any
disable fork;
end join