| 1231 | } |
| 1232 | |
| 1233 | bool bindStructInPackage(Design* design, Signal* signal, |
| 1234 | std::string_view packageName, |
| 1235 | std::string_view structName) { |
| 1236 | Package* p = design->getPackage(packageName); |
| 1237 | if (p) { |
| 1238 | const DataType* dtype = p->getDataType(structName); |
| 1239 | if (dtype) { |
| 1240 | signal->setDataType(dtype); |
| 1241 | const DataType* actual = dtype->getActual(); |
| 1242 | if (actual->getCategory() == DataType::Category::STRUCT) { |
| 1243 | Struct* st = (Struct*)actual; |
| 1244 | if (st->isNet()) { |
| 1245 | signal->setType(VObjectType::paNetType_Wire); |
| 1246 | } |
| 1247 | } |
| 1248 | return true; |
| 1249 | } else { |
| 1250 | const DataType* dtype = p->getClassDefinition(structName); |
| 1251 | if (dtype) { |
| 1252 | signal->setDataType(dtype); |
| 1253 | return true; |
| 1254 | } |
| 1255 | } |
| 1256 | } |
| 1257 | return false; |
| 1258 | } |
| 1259 | |
| 1260 | bool ElaborationStep::bindPortType_(Signal* signal, const FileContent* fC, |
| 1261 | NodeId id, Scope* scope, |
no test coverage detected