Handle continuous assignment of assignment patterns to array elements
Currently when creating the NetNet for a continuous assignment to an array element the type of the element is flattened into a canonical 1 dimensional form. This works for most cases because packed types are compatible if their total packed with is the same. But there are some contexts such as if the right-hand-side is an assignment pattern where the actual type matters and flattening the type will result in incorrect behavior. Retain the original type of the array element when creating the NetNet for the array element assignment. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
a4aade5d1a
commit
79919e33a2
|
|
@ -890,11 +890,8 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
|||
if (sig->pin_count() > 1 && widx_flag) {
|
||||
if (widx < 0 || widx >= (long) sig->pin_count())
|
||||
return 0;
|
||||
|
||||
netvector_t*tmp2_vec = new netvector_t(sig->data_type(),
|
||||
sig->vector_width()-1,0);
|
||||
NetNet*tmp = new NetNet(scope, scope->local_symbol(),
|
||||
sig->type(), tmp2_vec);
|
||||
sig->type(), sig->net_type());
|
||||
tmp->set_line(*this);
|
||||
tmp->local_flag(true);
|
||||
connect(sig->pin(widx), tmp->pin(0));
|
||||
|
|
|
|||
Loading…
Reference in New Issue