diff options
Diffstat (limited to 'frontends/ast/genrtlil.cc')
-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); } |