File tree 3 files changed +31
-0
lines changed
3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ CORE
2
+ s_always1.sv
3
+ --bound 20
4
+ ^\[main\.p0\] s_always \[0:9\] main\.x < 10: PROVED up to bound 20$
5
+ ^\[main\.p1\] not \(s_always \[0:9\] main\.x < 10\): REFUTED$
6
+ ^EXIT=10$
7
+ ^SIGNAL=0$
8
+ --
9
+ ^warning: ignoring
10
+ --
Original file line number Diff line number Diff line change
1
+ module main (input clk);
2
+
3
+ reg [31 : 0 ] x = 0 ;
4
+
5
+ always_ff @ (posedge clk)
6
+ x<= x+ 1 ;
7
+
8
+ // should pass
9
+ initial p0 : assert property (s_always [0 : 9 ] x< 10 );
10
+
11
+ // should fail
12
+ initial p1 : assert property (not s_always [0 : 9 ] x< 10 );
13
+
14
+ endmodule
Original file line number Diff line number Diff line change @@ -81,6 +81,13 @@ std::optional<exprt> negate_property_node(const exprt &expr)
81
81
return sva_ranged_s_eventually_exprt{
82
82
always.lower (), always.upper (), not_exprt{always.op ()}};
83
83
}
84
+ else if (expr.id () == ID_sva_s_always)
85
+ {
86
+ // not s_always [x:y] p --> eventually [x:y] not p
87
+ auto &s_always = to_sva_s_always_expr (expr);
88
+ return sva_eventually_exprt{
89
+ s_always.lower (), s_always.upper (), not_exprt{s_always.op ()}};
90
+ }
84
91
else if (expr.id () == ID_sva_s_eventually)
85
92
{
86
93
// not s_eventually p --> always not p
You can’t perform that action at this time.
0 commit comments