3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-26 18:45:34 +00:00

Sign-extension related fixes in SatGen and AST frontend

This commit is contained in:
Clifford Wolf 2013-06-10 17:10:06 +02:00
parent 9026511821
commit a5c30183b5
2 changed files with 10 additions and 8 deletions

View file

@ -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);
}