aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2020-07-03 13:13:21 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2020-08-18 19:36:24 +0200
commit916028906ab8b74db835e4857fa21580be353f85 (patch)
tree8c9e2c2272a0e6670de3a69a25c49f74ef4e6daf /passes
parent928fd40c2ebc8b83b76c02d80d751d2531341d9d (diff)
downloadyosys-916028906ab8b74db835e4857fa21580be353f85.tar.gz
yosys-916028906ab8b74db835e4857fa21580be353f85.tar.bz2
yosys-916028906ab8b74db835e4857fa21580be353f85.zip
Ensure \A_SIGNED is never used with $shiftx
It has no effect on the output ($shiftx doesn't perform any sign extension whatsoever), so an attempt to use it should be caught early.
Diffstat (limited to 'passes')
-rw-r--r--passes/tests/test_cell.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/passes/tests/test_cell.cc b/passes/tests/test_cell.cc
index bdb475d3b..228b6b67a 100644
--- a/passes/tests/test_cell.cc
+++ b/passes/tests/test_cell.cc
@@ -264,6 +264,10 @@ static void create_gold_module(RTLIL::Design *design, RTLIL::IdString cell_type,
cell->setPort(ID::Y, wire);
}
+ if (cell_type.in(ID($shiftx))) {
+ cell->parameters[ID::A_SIGNED] = false;
+ }
+
if (cell_type.in(ID($shl), ID($shr), ID($sshl), ID($sshr))) {
cell->parameters[ID::B_SIGNED] = false;
}