diff --git a/elab_sig.cc b/elab_sig.cc index d0cb720b4..ceb4256c4 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -1254,21 +1254,6 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope) const sig = new NetNet(scope, name_, wtype, unpacked_dimensions, &netstring_t::type_string); - } else if (set_data_type_==0 && data_type_==IVL_VT_STRING) { - - // Signal declared as: string foo; - if (debug_elaborate) { - cerr << get_fileline() << ": PWire::elaborate_sig: " - << "Create signal " << wtype - << " string " - << name_ << " in scope " << scope_path(scope) - << " without set_data_type_" - << endl; - } - - sig = new NetNet(scope, name_, wtype, unpacked_dimensions, - &netstring_t::type_string); - } else if (parray_type_t*parray_type = dynamic_cast(set_data_type_)) { // The pform gives us a parray_type_t for packed arrays // that show up in type definitions. This can be handled @@ -1315,6 +1300,10 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope) const } } + ivl_assert(*this, use_data_type == IVL_VT_LOGIC || + use_data_type == IVL_VT_BOOL || + use_data_type == IVL_VT_REAL); + netvector_t*vec = new netvector_t(packed_dimensions, use_data_type); vec->set_signed(get_signed()); vec->set_isint(get_isint()); diff --git a/pform.cc b/pform.cc index e81efd3ca..cac63013f 100644 --- a/pform.cc +++ b/pform.cc @@ -3044,8 +3044,7 @@ vector*pform_make_task_ports(const struct vlltype&loc, } if (dynamic_cast (vtype)) { - ret = pform_make_task_ports(loc, pt, IVL_VT_STRING, - false, 0, ports); + ret = do_make_task_ports(loc, pt, IVL_VT_STRING, vtype, ports); } if (class_type_t*class_type = dynamic_cast (vtype)) {