Skip to content

Commit 6aeefd5

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

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

regression/verilog/expressions/replication1.v

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,12 @@ 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+
wire [P:0] some_wire;
28+
29+
always assert property5:
30+
P == 'b0101;
31+
2432
endmodule

0 commit comments

Comments
 (0)