File tree 5 files changed +73
-0
lines changed
5 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ CORE
2
+ s_until1.sv
3
+ --smv-netlist
4
+ ^LTLSPEC \(\!node144\) U node151$
5
+ ^LTLSPEC \(1\) U node158$
6
+ ^EXIT=0$
7
+ ^SIGNAL=0$
8
+ --
Original file line number Diff line number Diff line change
1
+ module main (input clk);
2
+
3
+ // count up from 0 to 10
4
+ reg [7 : 0 ] counter = 0 ;
5
+
6
+ always_ff @ (posedge clk)
7
+ if (counter == 10 )
8
+ counter = 0 ;
9
+ else
10
+ counter = counter + 1 ;
11
+
12
+ // expected to pass
13
+ initial p0 : assert property ($past (counter)<= counter s_until counter== 10 );
14
+
15
+ // expected to fail
16
+ initial p1 : assert property (1 s_until counter== 11 );
17
+
18
+ endmodule
Original file line number Diff line number Diff line change
1
+ CORE
2
+ s_until1.sv
3
+ --bound 11
4
+ ^\[.*\] \$past\(main\.counter\) <= main\.counter s_until main\.counter == 10: PROVED up to bound 11$
5
+ ^\[.*\] 1 s_until main\.counter == 11: REFUTED$
6
+ ^EXIT=10$
7
+ ^SIGNAL=0$
8
+ --
Original file line number Diff line number Diff line change
1
+ module main (input clk);
2
+
3
+ // count up from 0 to 10
4
+ reg [7 : 0 ] counter = 0 ;
5
+
6
+ always_ff @ (posedge clk)
7
+ if (counter == 10 )
8
+ counter = 0 ;
9
+ else
10
+ counter = counter + 1 ;
11
+
12
+ // expected to pass
13
+ initial p0 : assert property ($past (counter)<= counter s_until counter== 10 );
14
+
15
+ // expected to fail
16
+ initial p1 : assert property (1 s_until counter== 11 );
17
+
18
+ endmodule
Original file line number Diff line number Diff line change @@ -338,6 +338,27 @@ std::optional<exprt> SVA_to_LTL(exprt expr)
338
338
else
339
339
return {};
340
340
}
341
+ else if (expr.id () == ID_sva_s_until)
342
+ {
343
+ auto &until = to_sva_s_until_expr (expr);
344
+ auto rec_lhs = SVA_to_LTL (until.lhs ());
345
+ auto rec_rhs = SVA_to_LTL (until.rhs ());
346
+ if (rec_lhs.has_value () && rec_rhs.has_value ())
347
+ return U_exprt{rec_lhs.value (), rec_rhs.value ()};
348
+ else
349
+ return {};
350
+ }
351
+ else if (expr.id () == ID_sva_s_until_with)
352
+ {
353
+ // This is release with swapped operands
354
+ auto &until_with = to_sva_s_until_with_expr (expr);
355
+ auto rec_lhs = SVA_to_LTL (until_with.lhs ());
356
+ auto rec_rhs = SVA_to_LTL (until_with.rhs ());
357
+ if (rec_lhs.has_value () && rec_rhs.has_value ())
358
+ return R_exprt{rec_rhs.value (), rec_lhs.value ()}; // swapped
359
+ else
360
+ return {};
361
+ }
341
362
else if (!has_temporal_operator (expr))
342
363
{
343
364
return expr;
You can’t perform that action at this time.
0 commit comments