fork: ptime_check
begin
test_p[0] = process::self();
wait(xyz == 1);
end
begin
test_p[1] = process::self();
#1us;
`uvm_error("xyz not set after 1us delay")
end
join_none
wait(test_p[0] != null);
test_p[0].await();
`uvm_info("TEST", "Killing timeout process. Seen xyz", UVM_LOW)
disable ptime_check;
result:
5us: uvm_test_top [TEST] Killing timeout process. Seen xyz
5.7us: uvm_test_top xyz not set after 1us delay
Why doesn’t disable ptime_check kill the second begin…end? Am I doing something wrong? I confirm that test_p[1].kill() instead of disable ptime_check works.
It would help to provide a complete runnable example like below which works on 3 of the simulators on www.edaplayground.com
module top;
int xyz;
process test_p[2];
initial #10ns xyz = 1;
initial begin
fork: ptime_check
begin
test_p[0] = process::self();
wait(xyz == 1);
end
begin
test_p[1] = process::self();
#1us;
$error("xyz not set after 1us delay");
end
join_none
wait(test_p[0] != null);
test_p[0].await();
$error("Killing timeout process. Seen xyz");
disable ptime_check;
end
endmodule
Note that the kill() method is preferred since it is not globally applied compared with disabling a named block
Your code works as I would expect on 3 out of 4 simulators on www.edaplayground.com. They all interpret the statement “The disable statement shall terminate the activity of a task or a named block” in section 9.6.2 Disable statement to include the processes spawned by a fork statement.
This Mentor/Siemens EDA sponsored public forum is not for discussing tool specific usage or issues. Please contact your tool vendor directly for support.