Tests: Update t_disable_task_unsup (#6853 partial)
This commit is contained in:
parent
f6b966ed16
commit
742c0b134c
|
|
@ -1,5 +1,8 @@
|
|||
%Error-UNSUPPORTED: t/t_disable_task_unsup.v:20:13: Unsupported: disabling task by name
|
||||
20 | #1 disable increment_x;
|
||||
%Error-UNSUPPORTED: t/t_disable_task_unsup.v:37:10: Unsupported: disabling task by name
|
||||
37 | #1 disable increment_x;
|
||||
| ^~~~~~~
|
||||
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
|
||||
%Error-UNSUPPORTED: t/t_disable_task_unsup.v:26:5: Unsupported: disabling task by name
|
||||
26 | disable get_and_send;
|
||||
| ^~~~~~~
|
||||
%Error: Exiting due to
|
||||
|
|
|
|||
|
|
@ -12,14 +12,52 @@ task increment_x;
|
|||
x++;
|
||||
endtask
|
||||
|
||||
class driver;
|
||||
int m_time = 0;
|
||||
|
||||
task get_and_send();
|
||||
forever begin
|
||||
#10;
|
||||
m_time += 10;
|
||||
end
|
||||
endtask
|
||||
|
||||
task post_shutdown_phase();
|
||||
disable get_and_send;
|
||||
endtask
|
||||
endclass
|
||||
|
||||
module t;
|
||||
|
||||
driver c;
|
||||
|
||||
initial begin
|
||||
fork
|
||||
increment_x();
|
||||
#1 disable increment_x;
|
||||
join
|
||||
|
||||
if (x != 1) $stop;
|
||||
|
||||
c = new;
|
||||
fork
|
||||
c.get_and_send;
|
||||
join_none
|
||||
if (c.m_time != 0) $stop;
|
||||
|
||||
#11;
|
||||
if ($time != 12) $stop;
|
||||
if (c.m_time != 10) $stop;
|
||||
|
||||
#20;
|
||||
if ($time != 32) $stop;
|
||||
if (c.m_time != 30) $stop;
|
||||
c.post_shutdown_phase;
|
||||
|
||||
#20;
|
||||
if ($time != 52) $stop;
|
||||
if (c.m_time != 30) $stop;
|
||||
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue