Skip to content

Commit fe22515

Browse files
committed
SystemVerilog: fix for checkers with multiple ports
This fixes the grammar for checker declarations with multiple ports.
1 parent 918ef6d commit fe22515

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Verilog: fix for the type of implicit nets for continous assignments
66
* SystemVerilog: fix for type parameters
77
* SystemVerilog: type parameter ports
8+
* SystemVerilog: fix for checkers with multiple ports
89
* SMV: word constants
910
* SMV: IVAR declarations
1011
* SMV: bit selection operator
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
checker2.sv
3+
--bound 20
4+
^\[main\.c\.assert\.1\] always myChecker\.data1 != myChecker\.data2: REFUTED$
5+
^EXIT=10$
6+
^SIGNAL=0$
7+
--
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
checker myChecker(input logic [31:0] data1, input logic [31:0] data2);
2+
assert property (data1 != data2);
3+
endchecker
4+
5+
module main(input clk);
6+
reg [31:0] counter = 0;
7+
always_ff @(posedge clk) counter++;
8+
myChecker c(counter, 10);
9+
endmodule

src/verilog/parser.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,8 @@ checker_port_list_opt:
794794
checker_port_list:
795795
checker_port_item
796796
{ init($$); mts($$, $1); }
797-
| checker_port_list checker_port_item
798-
{ $$ = $1; mts($$, $2); }
797+
| checker_port_list ',' checker_port_item
798+
{ $$ = $1; mts($$, $3); }
799799
;
800800

801801
checker_port_item:

0 commit comments

Comments
 (0)