iverilog/ivtest/ivltests/sv_const_fail4.v

13 lines
212 B
Verilog

// Check that force assignment to a const variable fails.
module test;
const integer x = 10;
initial begin
force x = 20; // Error: Assignment to const variable
$display("FAILED");
end
endmodule