| 773 | } |
| 774 | |
| 775 | void UhdmWriter::writeDataTypes(const DesignComponent::DataTypeMap& datatypeMap, |
| 776 | BaseClass* parent, |
| 777 | VectorOftypespec* dest_typespecs, Serializer& s, |
| 778 | bool setParent) { |
| 779 | std::set<uint64_t> ids; |
| 780 | for (const auto& entry : datatypeMap) { |
| 781 | const DataType* dtype = entry.second; |
| 782 | if (dtype->getCategory() == DataType::Category::REF) { |
| 783 | dtype = dtype->getDefinition(); |
| 784 | } |
| 785 | if (dtype->getCategory() == DataType::Category::TYPEDEF) { |
| 786 | if (dtype->getTypespec() == nullptr) dtype = dtype->getDefinition(); |
| 787 | } |
| 788 | typespec* tps = dtype->getTypespec(); |
| 789 | tps = replace(tps, m_compileDesign->getSwapedObjects()); |
| 790 | if (parent->UhdmType() == uhdmpackage) { |
| 791 | if (tps && (tps->VpiName().find("::") == std::string::npos)) { |
| 792 | const std::string newName = |
| 793 | StrCat(parent->VpiName(), "::", tps->VpiName()); |
| 794 | tps->VpiName(newName); |
| 795 | } |
| 796 | } |
| 797 | |
| 798 | if (tps) { |
| 799 | if (!tps->Instance()) { |
| 800 | if (parent->UhdmType() != uhdmclass_defn) |
| 801 | tps->Instance((instance*)parent); |
| 802 | } |
| 803 | if (setParent) tps->VpiParent(parent); |
| 804 | if (ids.find(tps->UhdmId()) == ids.end()) { |
| 805 | dest_typespecs->push_back(tps); |
| 806 | ids.insert(tps->UhdmId()); |
| 807 | } |
| 808 | } |
| 809 | } |
| 810 | } |
| 811 | |
| 812 | void UhdmWriter::writeNets(DesignComponent* mod, |
| 813 | std::vector<Signal*>& orig_nets, BaseClass* parent, |
nothing calls this directly
no test coverage detected