File tree Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change
1
+ CORE
2
+ cycle_delay1.sv
3
+
4
+ ^file cycle_delay1\.sv line \d+: expected constant expression, but got `main.from'$
5
+ ^EXIT=2$
6
+ ^SIGNAL=0$
7
+ --
8
+ ^warning: ignoring
9
+ --
Original file line number Diff line number Diff line change
1
+ module main (input clk, input [31 : 0 ] from);
2
+
3
+ reg [31 : 0 ] x;
4
+
5
+ always_ff @ (posedge clk)
6
+ x++ ;
7
+
8
+ // The cycle delay must be elaboration-time constant
9
+ initial assert property (## [from: 2 ] x!= 10 );
10
+
11
+ endmodule
Original file line number Diff line number Diff line change 1
1
CORE
2
2
unbounded1.sv
3
3
--module main --bound 1
4
- ^\[main\.assert\.1\] always \(main\.a ##\[0:main\.upper \] main.b\): REFUTED$
4
+ ^\[main\.assert\.1\] always \(main\.a ##\[0:\$ \] main.b\): REFUTED$
5
5
^EXIT=10$
6
6
^SIGNAL=0$
7
7
--
Original file line number Diff line number Diff line change @@ -193,11 +193,19 @@ exprt verilog_typecheck_exprt::convert_ternary_sva(ternary_exprt expr)
193
193
if (expr.id () == ID_sva_cycle_delay) // ##[1:2] something
194
194
{
195
195
expr.type () = bool_typet ();
196
+
196
197
convert_expr (expr.op0 ());
198
+ expr.op0 () = elaborate_constant_expression_check (expr.op0 ());
199
+
197
200
if (expr.op1 ().is_not_nil ())
201
+ {
198
202
convert_expr (expr.op1 ());
203
+ expr.op1 () = elaborate_constant_expression_check (expr.op1 ());
204
+ }
205
+
199
206
convert_sva (expr.op2 ());
200
207
make_boolean (expr.op2 ());
208
+
201
209
return std::move (expr);
202
210
}
203
211
else if (
You can’t perform that action at this time.
0 commit comments