A bit select is not the same as selecting part of a packed array

When adding the ability to select part of a multi-dimensional packed
array the sign and size information for a true bit select was broken.
This commit is contained in:
Cary R 2014-06-12 09:09:49 -07:00
parent 684e46a6c1
commit 81947edaa5
1 changed files with 5 additions and 3 deletions

View File

@ -2832,9 +2832,11 @@ unsigned PEIdent::test_width(Design*des, NetScope*scope, width_mode_t&mode)
const index_component_t&index_tail = name_tail.index.back();
ivl_assert(*this, index_tail.msb);
}
// If we have a net in hand, then we can predict what
// the slice width will be. If not, then just guess.
if (net == 0)
// If we have a net in hand, then we can predict what the
// slice width will be. If not, then assume it will be a
// simple bit select. If the net only has a single dimension
// then this is still a simple bit select.
if ((net == 0) || (net->packed_dimensions() <= 1))
use_width = 1;
break;
default: