File tree Expand file tree Collapse file tree 4 files changed +38
-11
lines changed Expand file tree Collapse file tree 4 files changed +38
-11
lines changed Original file line number Diff line number Diff line change 1+ CORE
2+ empty_sequence1.sv
3+ --bound 5
4+ ^\[main\.p0\] 1 \[\*0\]: REFUTED$
5+ ^\[main\.p1\] \(1 \[\*0\]\) ##1 main\.x == 0: PROVED up to bound 5$
6+ ^\[main\.p2\] main\.x == 0 ##1 \(1 \[\*0\]\): PROVED up to bound 5$
7+ ^\[main\.p3\] \(1 \[\*0\]\) ##0 1: REFUTED$
8+ ^\[main\.p4\] 1 ##0 \(1 \[\*0\]\): PROVED up to bound 5$
9+ ^EXIT=10$
10+ ^SIGNAL=0$
11+ --
12+ ^warning: ignoring
13+ --
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,7 +8,12 @@ module main(input clk);
88 // The empty sequence does not match
99 initial p0 : assert property (1 [* 0 ]);
1010
11- // But can be concatenated
11+ // But can be concatenated -- expected to pass
1212 initial p1 : assert property (1 [* 0 ] ## 1 x == 0 );
13+ initial p2 : assert property (x == 0 ## 1 1 [* 0 ]);
14+
15+ // But can be concatenated -- expected to fail
16+ initial p3 : assert property (1 [* 0 ] ## 0 1 );
17+ initial p4 : assert property (1 ## 0 1 [* 0 ]);
1318
1419endmodule
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ sequence_matchest instantiate_sequence(
109109 {
110110 // now delay
111111 const auto from = numeric_cast_v<mp_integer>(sva_cycle_delay_expr.from ());
112+ DATA_INVARIANT (from >= 0 , " ##n must not be negative" );
112113
113114 auto t_rhs_from = lhs_match.end_time + from;
114115 mp_integer t_rhs_to;
@@ -128,6 +129,24 @@ sequence_matchest instantiate_sequence(
128129 t_rhs_to = t_rhs_from + to;
129130 }
130131
132+ // Implement 1800-2017 16.9.2.1
133+ if (lhs_match.empty_match ())
134+ {
135+ if (from == 0 )
136+ {
137+ // (empty ##0 seq) does not result in a match.
138+ continue ;
139+ }
140+ else
141+ {
142+ // (empty ##n seq), where n is greater than 0,
143+ // is equivalent to (##(n-1) seq).
144+ t_rhs_from = t_rhs_from - 1 ;
145+ if (t_rhs_to != no_timeframes)
146+ t_rhs_to = t_rhs_to - 1 ;
147+ }
148+ }
149+
131150 // Add a potential match for each timeframe in the range
132151 for (mp_integer t_rhs = t_rhs_from; t_rhs <= t_rhs_to; ++t_rhs)
133152 {
You can’t perform that action at this time.
0 commit comments