From 42618741d964e8d7ad498b2b086c2d03d2b076e8 Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 27 Apr 2009 18:13:19 -0700 Subject: [PATCH] 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. --- elab_expr.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elab_expr.cc b/elab_expr.cc index 3eeb7a0a0..b105f8dda 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -1936,7 +1936,10 @@ unsigned PEIdent::test_width(Design*des, NetScope*scope, if (!name_tail.index.empty()) { probe_index_expr_width(des, scope, name_tail); 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;