Files
iverilog/ivtest/ivltests/sv_assign_pattern_auto_force_fail.v
T
Lars-Peter Clausen 9bbdb0da0e Add regression test for automatic terms in assignment patterns
Check that automatic variables referenced through an assignment pattern in a
procedural `force` statement are rejected.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2026-06-30 18:25:52 -07:00

20 lines
324 B
Verilog

// Check that assignment patterns cannot reference automatic variables in
// procedural force statements.
module test;
reg [3:0] result;
task automatic t;
input [3:0] value;
begin
force result = '{value[3], value[2], value[1], value[0]};
end
endtask
initial begin
t(4'ha);
end
endmodule