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);
8
8
// The empty sequence does not match
9
9
initial p0 : assert property (1 [* 0 ]);
10
10
11
- // But can be concatenated
11
+ // But can be concatenated -- expected to pass
12
12
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 ]);
13
18
14
19
endmodule
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ sequence_matchest instantiate_sequence(
109
109
{
110
110
// now delay
111
111
const auto from = numeric_cast_v<mp_integer>(sva_cycle_delay_expr.from ());
112
+ DATA_INVARIANT (from >= 0 , " ##n must not be negative" );
112
113
113
114
auto t_rhs_from = lhs_match.end_time + from;
114
115
mp_integer t_rhs_to;
@@ -128,6 +129,24 @@ sequence_matchest instantiate_sequence(
128
129
t_rhs_to = t_rhs_from + to;
129
130
}
130
131
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
+
131
150
// Add a potential match for each timeframe in the range
132
151
for (mp_integer t_rhs = t_rhs_from; t_rhs <= t_rhs_to; ++t_rhs)
133
152
{
You can’t perform that action at this time.
0 commit comments