diff options
author | Xiretza <xiretza@xiretza.xyz> | 2020-07-03 13:13:21 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2020-08-18 19:36:24 +0200 |
commit | 916028906ab8b74db835e4857fa21580be353f85 (patch) | |
tree | 8c9e2c2272a0e6670de3a69a25c49f74ef4e6daf /kernel | |
parent | 928fd40c2ebc8b83b76c02d80d751d2531341d9d (diff) | |
download | yosys-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 'kernel')
-rw-r--r-- | kernel/rtlil.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index d7d226942..c56f0dcab 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1035,7 +1035,11 @@ namespace { } if (cell->type.in(ID($shift), ID($shiftx))) { - param_bool(ID::A_SIGNED); + if (cell->type == ID($shiftx)) { + param_bool(ID::A_SIGNED, /*expected=*/false); + } else { + param_bool(ID::A_SIGNED); + } param_bool(ID::B_SIGNED); port(ID::A, param(ID::A_WIDTH)); port(ID::B, param(ID::B_WIDTH)); |