diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-06-07 11:41:54 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-06-07 11:41:54 +0200 |
commit | b637b3109d61ff2d120978975a7b8cdc2ca3f418 (patch) | |
tree | 68c54d800e9907f0c3a2daf43183bac73a187dbe /tests/various | |
parent | b894187cf66dfa346eddeccf42c38c0635db9524 (diff) | |
parent | 88f59770932720cfc1e987c98e53faedd7388ed8 (diff) | |
download | yosys-b637b3109d61ff2d120978975a7b8cdc2ca3f418.tar.gz yosys-b637b3109d61ff2d120978975a7b8cdc2ca3f418.tar.bz2 yosys-b637b3109d61ff2d120978975a7b8cdc2ca3f418.zip |
Merge branch 'implicit_named_connection' of https://github.com/tux3/yosys into tux3-implicit_named_connection
Diffstat (limited to 'tests/various')
-rw-r--r-- | tests/various/implicit_ports.sv | 19 | ||||
-rw-r--r-- | tests/various/implicit_ports.ys | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/various/implicit_ports.sv b/tests/various/implicit_ports.sv new file mode 100644 index 000000000..6a766bd51 --- /dev/null +++ b/tests/various/implicit_ports.sv @@ -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 + diff --git a/tests/various/implicit_ports.ys b/tests/various/implicit_ports.ys new file mode 100644 index 000000000..7b4764921 --- /dev/null +++ b/tests/various/implicit_ports.ys @@ -0,0 +1,8 @@ +read_verilog -sv implicit_ports.sv +proc; opt + +flatten +select -module named_ports + +sat -verify -prove alu_result 6 +sat -verify -set-all-undef cout |