diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-03-15 09:09:35 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-04-02 07:14:08 -0700 |
commit | dde3dfd72e25bc1f166a8448fed2742c46b4aa71 (patch) | |
tree | 88a739f0b5ab234c85c38cbc8b76f67a622b36ca /backends | |
parent | 6d4f01c3fa5b068e7ba55b21ed5f71446fcbc518 (diff) | |
download | yosys-dde3dfd72e25bc1f166a8448fed2742c46b4aa71.tar.gz yosys-dde3dfd72e25bc1f166a8448fed2742c46b4aa71.tar.bz2 yosys-dde3dfd72e25bc1f166a8448fed2742c46b4aa71.zip |
Update backends/btor/btor.cc; credit @boqwxp
Co-Authored-By: Alberto Gonzalez <61295559+boqwxp@users.noreply.github.com>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/btor/btor.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/backends/btor/btor.cc b/backends/btor/btor.cc index d2bca8cd6..eabd870ab 100644 --- a/backends/btor/btor.cc +++ b/backends/btor/btor.cc @@ -433,8 +433,7 @@ struct BtorWorker if (cell->type == "$neg") btor_op = "neg"; log_assert(!btor_op.empty()); - int width = GetSize(cell->getPort(ID::Y)); - width = std::max(width, GetSize(cell->getPort(ID::A))); + int width = std::max(GetSize(cell->getPort(ID::A)), GetSize(cell->getPort(ID::Y))); bool a_signed = cell->hasParam("\\A_SIGNED") ? cell->getParam("\\A_SIGNED").as_bool() : false; |