diff --git a/elab_sig.cc b/elab_sig.cc index 561f61d6b..d0cb720b4 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -873,37 +873,6 @@ void PWhile::elaborate_sig(Design*des, NetScope*scope) const statement_->elaborate_sig(des, scope); } -static ivl_type_s*elaborate_type(Design*des, NetScope*scope, - data_type_t*pform_type) -{ - if (struct_type_t*struct_type = dynamic_cast(pform_type)) { - ivl_type_s*use_type = struct_type->elaborate_type(des, scope); - return use_type; - } - - cerr << pform_type->get_fileline() << ": sorry: I don't know how to elaborate " - << typeid(*pform_type).name() << " here." << endl; - des->errors += 1; - - return 0; -} - -static netparray_t* elaborate_parray_type(Design*des, NetScope*scope, const LineInfo*li, - parray_type_t*data_type) -{ - - vectorpacked_dimensions; - bool dimensions_ok = evaluate_ranges(des, scope, li, packed_dimensions, * data_type->dims); - ivl_assert(*data_type, dimensions_ok); - - ivl_type_s*element_type = elaborate_type(des, scope, data_type->base_type); - - netparray_t*res = new netparray_t(packed_dimensions, element_type); - //res->set_line(*data_type); - - return res; -} - bool test_ranges_eeq(const vector&lef, const vector&rig) { if (lef.size() != rig.size()) @@ -1307,7 +1276,8 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope) const // The trick here is that the parray type has an // arbitrary sub-type, and not just a scalar bit... - netparray_t*use_type = elaborate_parray_type(des, scope, this, parray_type); + ivl_type_t tmp_type = parray_type->elaborate_type(des, scope); + const netparray_t*use_type = dynamic_cast(tmp_type); // Should not be getting packed dimensions other than // through the parray type declaration. ivl_assert(*this, packed_dimensions.empty());