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:
parent
9026511821
commit
a5c30183b5
2 changed files with 10 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue