3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-13 05:01:29 +00:00

Fixed more extend vs. extend_u0 issues

This commit is contained in:
Clifford Wolf 2013-11-07 19:19:53 +01:00
parent 02f4f89fdb
commit d7cb62ac96
3 changed files with 20 additions and 11 deletions

View file

@ -441,7 +441,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
int width = children[1]->range_left - children[1]->range_right + 1;
if (width != int(children[0]->bits.size())) {
RTLIL::SigSpec sig(children[0]->bits);
sig.extend(width, children[0]->is_signed);
sig.extend_u0(width, children[0]->is_signed);
delete children[0];
children[0] = mkconst_bits(sig.as_const().bits, children[0]->is_signed);
}