diff options
author | Jannis Harder <me@jix.one> | 2023-02-01 18:06:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 18:06:59 +0100 |
commit | 0f2cb80a2655f7f54b0d4978c7620c1d0bc6f107 (patch) | |
tree | 36e82fc55f7698f441fc6724f68c534d0103911c | |
parent | f7c1e4aadfcd168274f65034c4e66ed96271d8ec (diff) | |
parent | 5e8263840824bc5113efdeb03d066f0889e562c8 (diff) | |
download | yosys-0f2cb80a2655f7f54b0d4978c7620c1d0bc6f107.tar.gz yosys-0f2cb80a2655f7f54b0d4978c7620c1d0bc6f107.tar.bz2 yosys-0f2cb80a2655f7f54b0d4978c7620c1d0bc6f107.zip |
Merge pull request #3655 from jix/smt2_fix_b_op_width
smt2: Fix operation width computation for boolean producing cells
-rw-r--r-- | backends/smt2/smt2.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc index 1ab39a405..48da3f4be 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -462,7 +462,10 @@ struct Smt2Worker int width = GetSize(sig_y); if (type == 's' || type == 'S' || type == 'd' || type == 'b') { - width = max(width, GetSize(cell->getPort(ID::A))); + if (type == 'b') + width = GetSize(cell->getPort(ID::A)); + else + width = max(width, GetSize(cell->getPort(ID::A))); if (cell->hasPort(ID::B)) width = max(width, GetSize(cell->getPort(ID::B))); } |