Skip to content

Commit 5520bdf

Browse files
committed
Verilog: extend test for unary minus
This extends the test for unary minus to check that the downwards expression context passes through this operator.
1 parent 445ac04 commit 5520bdf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

regression/verilog/expressions/unary_minus1.sv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ module main;
33
// Any arithmetic with x or z returns x.
44
initial assert(-32'bz === 32'hxxxx_xxxx);
55

6+
// Downwards type propagation passes through unary minus.
7+
initial assert(-(1'sb1 + 1'sb1) == 2);
8+
69
endmodule

0 commit comments

Comments
 (0)