3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-11 21:50:54 +00:00

SystemVerilog support for implicit named port connections

This is the `foo foo(.port1, .port2);` SystemVerilog syntax
introduced in IEEE1800-2005.
This commit is contained in:
tux3 2019-06-05 00:47:54 +02:00
parent 1332051f33
commit 88f5977093
5 changed files with 59 additions and 12 deletions

View file

@ -0,0 +1,19 @@
// Test implicit port connections
module alu (input [2:0] a, input [2:0] b, input cin, output cout, output [2:0] result);
assign cout = cin;
assign result = a + b;
endmodule
module named_ports(output [2:0] alu_result, output cout);
wire [2:0] a = 3'b010, b = 3'b100;
wire cin = 1;
alu alu (
.a(a),
.b, // Implicit connection is equivalent to .b(b)
.cin(), // Explicitely unconnected
.cout(cout),
.result(alu_result)
);
endmodule