3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-19 04:13:39 +00:00

Fixed localparam signdness, fixes #127

This commit is contained in:
Clifford Wolf 2016-03-18 12:15:00 +01:00
parent b6d08f39ba
commit ef4207d5ad

View file

@ -794,7 +794,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
RTLIL::SigSpec sig(children[0]->bits); RTLIL::SigSpec sig(children[0]->bits);
sig.extend_u0(width, children[0]->is_signed); sig.extend_u0(width, children[0]->is_signed);
AstNode *old_child_0 = children[0]; AstNode *old_child_0 = children[0];
children[0] = mkconst_bits(sig.as_const().bits, children[0]->is_signed); children[0] = mkconst_bits(sig.as_const().bits, is_signed);
delete old_child_0; delete old_child_0;
} }
children[0]->is_signed = is_signed; children[0]->is_signed = is_signed;