File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
regression/verilog/synthesis Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ CORE
2
+ posedge_real.v
3
+ --module main
4
+ ^file posedge_real.v line \d+: edge event controls do not take real operands$
5
+ ^EXIT=2$
6
+ ^SIGNAL=0$
7
+ --
8
+ ^warning: ignoring
9
+ --
Original file line number Diff line number Diff line change
1
+ module main ;
2
+
3
+ real data;
4
+
5
+ always @(posedge data);
6
+
7
+ endmodule
Original file line number Diff line number Diff line change @@ -2568,6 +2568,17 @@ exprt verilog_typecheck_exprt::convert_unary_expr(unary_exprt expr)
2568
2568
else if (expr.id () == ID_posedge || expr.id () == ID_negedge)
2569
2569
{
2570
2570
convert_expr (expr.op ());
2571
+
2572
+ // 1800-2017 6.12.1
2573
+ // Edge event controls must not be given real operands.
2574
+ if (
2575
+ expr.op ().type ().id () == ID_verilog_shortreal ||
2576
+ expr.op ().type ().id () == ID_verilog_real)
2577
+ {
2578
+ throw errort ().with_location (expr.source_location ())
2579
+ << " edge event controls do not take real operands" ;
2580
+ }
2581
+
2571
2582
expr.type () = bool_typet{};
2572
2583
}
2573
2584
else if (expr.id () == ID_verilog_smv_eventually)
You can’t perform that action at this time.
0 commit comments