verilator/test_regress/t/t_fork_dynscope_out.v
Krzysztof Bieganski b7af859ba3
Fix forks capturing non-input ports in tasks (#5237) (#5343)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-08-08 21:55:46 +01:00

29 lines
502 B
Systemverilog

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2024 by Antmicro.
// SPDX-License-Identifier: CC0-1.0
module t;
bit p = 0, q = 0;
initial begin
t1(p);
t2(q);
if (p != 1) $stop;
if (q != 1) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
task t1(inout p);
fork
p = 1;
join_none
endtask
task t2(output q);
q <= 1;
endtask
endmodule