Calculate the width of an array word correctly.
When finding the width of an array word we need to skip any word selects for the array dimensions.
This commit is contained in:
parent
192522b3d8
commit
31fae351d2
|
|
@ -1936,7 +1936,10 @@ unsigned PEIdent::test_width(Design*des, NetScope*scope,
|
||||||
if (!name_tail.index.empty()) {
|
if (!name_tail.index.empty()) {
|
||||||
probe_index_expr_width(des, scope, name_tail);
|
probe_index_expr_width(des, scope, name_tail);
|
||||||
const index_component_t&index_tail = name_tail.index.back();
|
const index_component_t&index_tail = name_tail.index.back();
|
||||||
use_sel = index_tail.sel;
|
// Skip full array word net selects.
|
||||||
|
if (!net || (name_tail.index.size() > net->array_dimensions())) {
|
||||||
|
use_sel = index_tail.sel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned use_width = UINT_MAX;
|
unsigned use_width = UINT_MAX;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue