Skip to content

Commit c99748c

Browse files
committed
Verilog: test constant folding for replication
This adds a test that replication operators can be constant-folded.
1 parent b7a55de commit c99748c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

regression/verilog/expressions/replication1.v

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@ module main(in);
2121
always assert property4:
2222
{{ 1 { 1'b0 }}, in } == in;
2323

24+
// constant folding
25+
parameter P = { 2 { 2'b01 } };
26+
27+
always assert property5:
28+
P == 'b0101;
29+
2430
endmodule

0 commit comments

Comments
 (0)