Skip to content

Commit 224d167

Browse files
committed
SystemVerilog: interface instantiation
1 parent e6f0621 commit 224d167

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

regression/verilog/interface/interface1.sv

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ interface myInterface;
22
endinterface
33

44
module main;
5+
myInterface some_interface;
56
endmodule

src/verilog/parser.y

+11
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,7 @@ port_direction:
986986

987987
module_common_item:
988988
module_or_generate_item_declaration
989+
| interface_instantiation
989990
| assertion_item
990991
| bind_directive
991992
| continuous_assign
@@ -3021,6 +3022,16 @@ named_port_connection:
30213022
mto($$, $4); }
30223023
;
30233024

3025+
hierarchical_instance: name_of_instance
3026+
;
3027+
3028+
// System Verilog standard 1800-2017
3029+
// A.4.1.2 Interface instantiation
3030+
3031+
interface_instantiation:
3032+
interface_identifier hierarchical_instance ';'
3033+
;
3034+
30243035
// System Verilog standard 1800-2017
30253036
// A.4.2 Generated instantiation
30263037

0 commit comments

Comments
 (0)