File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change
1
+ CORE
2
+ sva_not1.sv
3
+ --k-induction
4
+ ^\[main\.p0] always not 0: PROVED$
5
+ ^\[main\.p1] always not 1: REFUTED$
6
+ ^EXIT=10$
7
+ ^SIGNAL=0$
8
+ --
9
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ module main ;
2
+
3
+ // should pass
4
+ p0 : assert property (not 0 );
5
+
6
+ // should fail
7
+ p1 : assert property (not 1 );
8
+
9
+ endmodule
Original file line number Diff line number Diff line change @@ -2270,7 +2270,8 @@ exprt verilog_typecheck_exprt::convert_unary_expr(unary_exprt expr)
2270
2270
convert_expr (expr.op ());
2271
2271
2272
2272
if (expr.op ().type ().id () == ID_verilog_signedbv ||
2273
- expr.op ().type ().id () == ID_verilog_unsignedbv) {
2273
+ expr.op ().type ().id () == ID_verilog_unsignedbv)
2274
+ {
2274
2275
expr.type ()=verilog_unsignedbv_typet (1 );
2275
2276
}
2276
2277
else
@@ -2279,6 +2280,13 @@ exprt verilog_typecheck_exprt::convert_unary_expr(unary_exprt expr)
2279
2280
make_boolean (expr.op ());
2280
2281
}
2281
2282
}
2283
+ else if (expr.id () == ID_sva_not)
2284
+ {
2285
+ convert_expr (expr.op ());
2286
+ make_boolean (expr.op ());
2287
+ expr.type ()=bool_typet (); // always boolean, never x
2288
+ return std::move (expr);
2289
+ }
2282
2290
else if (expr.id ()==ID_reduction_or || expr.id ()==ID_reduction_and ||
2283
2291
expr.id ()==ID_reduction_nor || expr.id ()==ID_reduction_nand ||
2284
2292
expr.id ()==ID_reduction_xor || expr.id ()==ID_reduction_xnor)
You can’t perform that action at this time.
0 commit comments