From 609caa23b5e12547c043dc4a1827d1a531af1992 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 24 Nov 2013 17:17:21 +0100 Subject: Implemented correct handling of signed module parameters --- frontends/ast/genrtlil.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'frontends/ast/genrtlil.cc') diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index e634a27a9..177c1ec59 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -1309,9 +1309,13 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) if (child->str.size() == 0) { char buf[100]; snprintf(buf, 100, "$%d", ++para_counter); + if (child->children[0]->is_signed) + cell->signed_parameters.insert(buf); cell->parameters[buf].str = child->children[0]->str; cell->parameters[buf].bits = child->children[0]->bits; } else { + if (child->children[0]->is_signed) + cell->signed_parameters.insert(child->str); cell->parameters[child->str].str = child->children[0]->str; cell->parameters[child->str].bits = child->children[0]->bits; } -- cgit v1.2.3