eval_tree: Properly support struct fields in get_array_info
Fixes #1032 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
37eba70ca4
commit
8ca387d6de
|
|
@ -2176,6 +2176,13 @@ static bool get_array_info(const NetExpr*arg, long dim,
|
|||
left = param->expr_width() - 1;
|
||||
right = 0;
|
||||
return false;
|
||||
}
|
||||
if (const NetESelect*select = dynamic_cast<const NetESelect*>(arg)) {
|
||||
const netranges_t&dim_vals = select->net_type()->slice_dimensions();
|
||||
const netrange_t&range = dim_vals[dim-1];
|
||||
left = range.get_msb();
|
||||
right = range.get_lsb();
|
||||
return false;
|
||||
}
|
||||
/* The argument must be a signal that has enough dimensions. */
|
||||
const NetESignal*esig = dynamic_cast<const NetESignal*>(arg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue