From: David Shah Date: Fri, 22 Nov 2019 09:16:37 +0000 (+0000) Subject: sv: Add tests for wildcard port connections X-Git-Tag: working-ls180~824^2~4 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a210675d71b30e97bad728d7f418c14ea0eb28ba;p=yosys.git sv: Add tests for wildcard port connections Signed-off-by: David Shah --- diff --git a/tests/various/sv_implicit_ports.sh b/tests/various/sv_implicit_ports.sh new file mode 100755 index 000000000..13d39cf8b --- /dev/null +++ b/tests/various/sv_implicit_ports.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +trap 'echo "ERROR in sv_implicit_ports.sh" >&2; exit 1' ERR + +# Simple case +../../yosys -f "verilog -sv" -qp "prep -flatten -top top; select -assert-count 1 t:\$add" - <&1 | grep -F "ERROR: No matching wire for implicit port connection \`b' of cell top.add_i (add)." > /dev/null + +# Incorrectly sized wire +((../../yosys -f "verilog -sv" -qp "hierarchy -top top" - || true) <&1 | grep -F "ERROR: Width mismatch between wire (7 bits) and port (8 bits) for implicit port connection \`b' of cell top.add_i (add)." > /dev/null