-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
If I run the following example with ebmc examples/test_constant_expr.v --systemverilog --top test_constant_expr --bound 10
module test_constant_expr #(parameter x = 8'hff) ();
test_mod #(.p(x[3 : 0])) mod ();
endmodule
module test_mod #(parameter p = 1) ();
initial begin
$display("p = 0x%0h", p);
end
endmodule
I get the following output
Parsing examples/test_constant_expr.v
Converting
Type-checking Verilog::test_mod
Type-checking Verilog::test_constant_expr
file examples/test_constant_expr.v line 3: expected constant expression, but got `255[3:0]'
CONVERSION ERROR
It seems that EBMC does not recognize x[3:0]
, where x
is a (constant) parameter, as a constant expression.
Metadata
Metadata
Assignees
Labels
No labels