aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-02-05 16:41:09 -0800
committerEddie Hung <eddie@fpgeh.com>2020-02-05 16:41:09 -0800
commit4c1d3a126d3978aeacbab623532c0ec9400b8959 (patch)
treec195c2679a3292f73900011a059a706342a49e28 /tests
parent505557e93e0263b7714bd37b274923a6369278f5 (diff)
downloadyosys-4c1d3a126d3978aeacbab623532c0ec9400b8959.tar.gz
yosys-4c1d3a126d3978aeacbab623532c0ec9400b8959.tar.bz2
yosys-4c1d3a126d3978aeacbab623532c0ec9400b8959.zip
shiftx2mux: fix select out of bounds
Diffstat (limited to 'tests')
-rwxr-xr-xtests/techmap/run-test.sh2
-rw-r--r--tests/techmap/shiftx2mux.ys11
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/techmap/run-test.sh b/tests/techmap/run-test.sh
index 96489ff15..c16f204d9 100755
--- a/tests/techmap/run-test.sh
+++ b/tests/techmap/run-test.sh
@@ -6,7 +6,7 @@ for x in *.ys; do
echo "all:: run-$x"
echo "run-$x:"
echo " @echo 'Running $x..'"
- echo " @../../yosys -ql ${x%.ys}.log $x"
+ echo " @../../yosys -ql ${x%.ys}.log -e 'select out of bounds' $x"
done
for s in *.sh; do
if [ "$s" != "run-test.sh" ]; then
diff --git a/tests/techmap/shiftx2mux.ys b/tests/techmap/shiftx2mux.ys
index c13b5f600..eb29680f6 100644
--- a/tests/techmap/shiftx2mux.ys
+++ b/tests/techmap/shiftx2mux.ys
@@ -108,3 +108,14 @@ design -import gate -as gate
miter -equiv -flatten -make_assert -make_outputs gold gate miter
sat -verify -prove-asserts -show-ports miter
+
+design -reset
+read_verilog <<EOT
+module top(input [6:0] A, input [1:0] B, output [1:0] Y);
+wire [7:0] AA = {1'bx, A};
+assign Y = AA[B*2 +: 2];
+endmodule
+EOT
+opt
+wreduce
+equiv_opt techmap