From: Eddie Hung Date: Sun, 15 Mar 2020 16:09:35 +0000 (-0700) Subject: Update backends/btor/btor.cc; credit @boqwxp X-Git-Tag: working-ls180~697^2~5 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dde3dfd72e25bc1f166a8448fed2742c46b4aa71;p=yosys.git Update backends/btor/btor.cc; credit @boqwxp Co-Authored-By: Alberto Gonzalez <61295559+boqwxp@users.noreply.github.com> --- 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;