File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
Expand file tree Collapse file tree 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)
8181 return sva_ranged_s_eventually_exprt{
8282 always.lower (), always.upper (), not_exprt{always.op ()}};
8383 }
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+ }
8491 else if (expr.id () == ID_sva_s_eventually)
8592 {
8693 // not s_eventually p --> always not p
You can’t perform that action at this time.
0 commit comments