From ebe1d7d5ab798b945bf2aa0e818ffe7152995071 Mon Sep 17 00:00:00 2001 From: David Shah Date: Fri, 22 Nov 2019 12:57:51 +0000 Subject: [PATCH] sv: More tests for wildcard port connections Signed-off-by: David Shah --- tests/various/sv_implicit_ports.sh | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tests/various/sv_implicit_ports.sh b/tests/various/sv_implicit_ports.sh index 2faac2e85..9a01447f7 100755 --- a/tests/various/sv_implicit_ports.sh +++ b/tests/various/sv_implicit_ports.sh @@ -65,3 +65,60 @@ module top(input [7:0] a, output [7:0] q); add add_i(.*); endmodule EOT + +# Parameterised module +../../yosys -f "verilog -sv" -qp "prep -flatten -top top; select -assert-count 1 t:\$add" - <&1 | grep -F "ERROR: Width mismatch between wire (8 bits) and port (6 bits) for implicit port connection \`q' of cell top.add_i (add)." > /dev/null + +# Mixed implicit and explicit 1 +../../yosys -f "verilog -sv" -qp "prep -flatten -top top; select -assert-count 1 t:\$add" - <&1 | grep -F "Warning: Resizing cell port top.add_i.b from 10 bits to 8 bits." > /dev/null -- 2.30.2