| 2094 | } |
| 2095 | |
| 2096 | bool CompileHelper::compileNetDeclaration(DesignComponent* component, |
| 2097 | const FileContent* fC, NodeId id, |
| 2098 | bool interface, |
| 2099 | CompileDesign* compileDesign, |
| 2100 | UHDM::VectorOfattribute* attributes) { |
| 2101 | /* |
| 2102 | n<> u<17> t<NetType_Wire> p<18> l<27> |
| 2103 | n<> u<18> t<NetTypeOrTrireg_Net> p<22> c<17> s<21> l<27> |
| 2104 | n<a> u<19> t<StringConst> p<20> l<27> |
| 2105 | n<> u<20> t<Net_decl_assignment> p<21> c<19> l<27> |
| 2106 | n<> u<21> t<List_of_net_decl_assignments> p<22> c<20> l<27> |
| 2107 | n<> u<22> t<Net_declaration> p<23> c<18> l<27> |
| 2108 | */ |
| 2109 | NodeId List_of_net_decl_assignments; |
| 2110 | NodeId Packed_dimension; |
| 2111 | bool isSigned = false; |
| 2112 | VObjectType nettype = VObjectType::slNoType; |
| 2113 | VObjectType subnettype = VObjectType::slNoType; |
| 2114 | NodeId NetTypeOrTrireg_Net = fC->Child(id); |
| 2115 | NodeId NetType = fC->Child(NetTypeOrTrireg_Net); |
| 2116 | if (!NetType) { |
| 2117 | NetType = NetTypeOrTrireg_Net; |
| 2118 | nettype = fC->Type(NetType); |
| 2119 | if (NetType) { |
| 2120 | if (fC->SymName(NetType) == "logic") { |
| 2121 | nettype = VObjectType::paIntVec_TypeLogic; |
| 2122 | } |
| 2123 | } |
| 2124 | NodeId Data_type_or_implicit = fC->Sibling(NetType); |
| 2125 | Packed_dimension = fC->Child(Data_type_or_implicit); |
| 2126 | if (fC->Type(Packed_dimension) == VObjectType::paSigning_Signed) { |
| 2127 | isSigned = true; |
| 2128 | } |
| 2129 | if (fC->Type(Data_type_or_implicit) == VObjectType::paData_type_or_implicit) |
| 2130 | List_of_net_decl_assignments = fC->Sibling(Data_type_or_implicit); |
| 2131 | else |
| 2132 | List_of_net_decl_assignments = Data_type_or_implicit; |
| 2133 | } else { |
| 2134 | nettype = fC->Type(NetType); |
| 2135 | NodeId net = fC->Sibling(NetTypeOrTrireg_Net); |
| 2136 | if (fC->Type(net) == VObjectType::paPacked_dimension) { |
| 2137 | List_of_net_decl_assignments = fC->Sibling(net); |
| 2138 | } else { |
| 2139 | List_of_net_decl_assignments = net; |
| 2140 | } |
| 2141 | } |
| 2142 | |
| 2143 | NodeId delay; |
| 2144 | if (fC->Type(List_of_net_decl_assignments) == VObjectType::paDelay3 || |
| 2145 | fC->Type(List_of_net_decl_assignments) == VObjectType::paDelay_control) { |
| 2146 | delay = List_of_net_decl_assignments; |
| 2147 | List_of_net_decl_assignments = fC->Sibling(List_of_net_decl_assignments); |
| 2148 | } |
| 2149 | NodeId net_decl_assignment = fC->Child(List_of_net_decl_assignments); |
| 2150 | if (!net_decl_assignment) { |
| 2151 | net_decl_assignment = List_of_net_decl_assignments; |
| 2152 | } |
| 2153 | while (net_decl_assignment) { |
no test coverage detected