diff --git a/elab_net.cc b/elab_net.cc index 0f5deabfb..2495b9d6c 100644 --- a/elab_net.cc +++ b/elab_net.cc @@ -559,8 +559,9 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope, packed_base = collapse_array_indices(des, scope, sig, tmp_index); if (debug_elaborate) { - cerr << get_fileline() << ": debug: " - << "packed_base expression = " << *packed_base << endl; + cerr << get_fileline() << ": PEIdent::elaborate_lnet_common_: " + << "packed_base=" << *packed_base + << ", member_off=" << member_off << endl; } } diff --git a/netmisc.cc b/netmisc.cc index 2beb1aa5f..4271720a7 100644 --- a/netmisc.cc +++ b/netmisc.cc @@ -309,7 +309,7 @@ NetExpr *normalize_variable_base(NetExpr *base, long msb, long lsb, if (min_wid < base->expr_width()) min_wid = base->expr_width(); /* Now that we have the minimum needed width increase it by * one to make room for the normalization calculation. */ - min_wid += 1; + min_wid += 2; /* Pad the base expression to the correct width. */ base = pad_to_width(base, min_wid, *base); /* If the base expression is unsigned and either the lsb @@ -344,7 +344,7 @@ NetExpr *normalize_variable_base(NetExpr *base, long msb, long lsb, if (min_wid < base->expr_width()) min_wid = base->expr_width(); /* Now that we have the minimum needed width increase it by * one to make room for the normalization calculation. */ - min_wid += 1; + min_wid += 2; /* Pad the base expression to the correct width. */ base = pad_to_width(base, min_wid, *base); /* If the offset is greater than zero then we need to do