3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-05-25 11:26:22 +00:00

Undo rewrite_parameter changes.

This commit is contained in:
nella 2026-05-12 15:58:46 +02:00 committed by nella
parent 52baeaef74
commit c6c44c5c9d

View file

@ -1875,10 +1875,8 @@ std::string AstModule::derive_common(RTLIL::Design *design, const dict<RTLIL::Id
child->children[0]->realvalue = std::stod(it->second.decode_string());
} else if ((it->second.flags & RTLIL::CONST_FLAG_STRING) != 0)
child->children[0] = AstNode::mkconst_str(loc, it->second.decode_string());
else {
bool is_signed = child->is_signed || ((it->second.flags & RTLIL::CONST_FLAG_SIGNED) != 0);
child->children[0] = AstNode::mkconst_bits(loc, it->second.to_bits(), is_signed, (it->second.flags & RTLIL::CONST_FLAG_UNSIZED) != 0);
}
else
child->children[0] = AstNode::mkconst_bits(loc, it->second.to_bits(), (it->second.flags & RTLIL::CONST_FLAG_SIGNED) != 0, (it->second.flags & RTLIL::CONST_FLAG_UNSIZED) != 0);
rewritten.insert(it->first);
}