Skip to content

Commit fcd83b5

Browse files
committed
KNOWNBUG test for casting z/x to Boolean
"true" is defined as "nonzero known value" (1800-2017 12.4), and hence, neither z nor x should be 'true'.
1 parent 03d9ee4 commit fcd83b5

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

regression/verilog/SVA/sequence5.desc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
KNOWNBUG
2+
sequence5.sv
3+
--bound 0
4+
^\[main\.p0\] 1: PROVED up to bound 0$
5+
^\[main\.p1\] 0: REFUTED$
6+
^\[main\.p2\] 1'bx: PROVED up to bound 0$
7+
^\[main\.p3\] 1'bz: PROVED up to bound 0$
8+
^EXIT=10$
9+
^SIGNAL=0$
10+
--
11+
^warning: ignoring
12+
--
13+
x and z are recognized as 'true', but 'true' is defined as a "nonzero known
14+
value" (1800-2017 12.4).

regression/verilog/SVA/sequence5.sv

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module main;
2+
3+
// passes, since 10 is true
4+
initial p0: assert property (10);
5+
6+
// fails, since 0 isn't true
7+
initial p1: assert property (0);
8+
9+
// fails, since 'x' isn't true
10+
initial p2: assert property (1'bx);
11+
12+
// fails, since 'z' isn't true
13+
initial p3: assert property (1'bz);
14+
15+
endmodule

0 commit comments

Comments
 (0)