From a5c30183b5fba4d7af4fb6c908cca5c5515e3089 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 10 Jun 2013 17:10:06 +0200 Subject: Sign-extension related fixes in SatGen and AST frontend --- frontends/ast/genrtlil.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'frontends') diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index c75bca91..cb59246c 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); } -- cgit v1.2.3