Skip to content

Commit 3aadcce

Browse files
authored
Merge pull request #1327 from diffblue/equality4
Verilog: KNOWNBUG test for four-valued zero extension
2 parents 2cc1635 + c4f0cd0 commit 3aadcce

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
KNOWNBUG
2+
equality4.v
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
--
9+
zero_extend doesn't work for four-valued operands.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module main;
2+
3+
// The two operands are zero-extended to 8 bits.
4+
initial assert((2'b10 + 1'sbx) === 8'bxxxxxxxx);
5+
initial assert((2'b10 | 1'sbx) === 8'b0000001x);
6+
7+
// The two operands are sign-extended to 8 bits.
8+
initial assert((2'sb10 + 1'sbx) === 8'sbxxxxxxxx);
9+
initial assert((2'sb10 | 1'sbx) === 8'sb1111111x);
10+
11+
endmodule

0 commit comments

Comments
 (0)