diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-06-10 17:10:06 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-06-10 17:10:06 +0200 |
commit | a5c30183b5fba4d7af4fb6c908cca5c5515e3089 (patch) | |
tree | 4463e652a2ba987c2cbcbb73f142352e4c91558a /frontends/ast | |
parent | 90265118215ae74384732edc9cf3fb57b6978756 (diff) | |
download | yosys-a5c30183b5fba4d7af4fb6c908cca5c5515e3089.tar.gz yosys-a5c30183b5fba4d7af4fb6c908cca5c5515e3089.tar.bz2 yosys-a5c30183b5fba4d7af4fb6c908cca5c5515e3089.zip |
Sign-extension related fixes in SatGen and AST frontend
Diffstat (limited to 'frontends/ast')
-rw-r--r-- | frontends/ast/genrtlil.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index c75bca911..cb59246c6 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -768,6 +768,8 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint) int width = std::max(left.width, right.width); if (width > width_hint && width_hint > 0) width = width_hint; + if (width < width_hint) + width = width_hint; return binop2rtlil(this, type_name, width, left, right); } |