00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaNet.h 00004 // 00005 // This file contains the definition for the oaNet and oaBitNet classes and 00006 // their public supporting classes. The oaNet class is an abstract base for 00007 // all types of nets. The oaBitNet class is the base class for all single-bit 00008 // nets. The supporting classes include: 00009 // 00010 // oaNetAttrType 00011 // This class implements an enumerated type that designates different 00012 // net attributes for use with the oaAttributeDisplay object. 00013 // 00014 // oaRoutePattern 00015 // This class implements an enumerated type that describes the routing 00016 // pattern for the associated net. 00017 // 00018 // oaConnStatus 00019 // This class implements an enumerated type that describes the connection 00020 // status for the associated net. 00021 // 00022 // oaMemNetIter 00023 // This class implements an iterator over the collection of nets that 00024 // a specified net is a member of. 00025 // 00026 // ***************************************************************************** 00027 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00028 // Integration Initiative, this material may not be copied, modified, 00029 // re-published, uploaded, executed, or distributed in any way, in any medium, 00030 // in whole or in part, without prior written permission from Cadence. 00031 // 00032 // Copyright 2002-2005 Cadence Design Systems, Inc. 00033 // All Rights Reserved. 00034 // 00035 // $Author: icftcm $ 00036 // $Revision: #1 $ 00037 // $Date: 2010/08/09 $ 00038 // $State: Exp $ 00039 // ***************************************************************************** 00040 // ***************************************************************************** 00041 00042 00043 00044 #if !defined(oaNet_P) 00045 #define oaNet_P 00046 00047 00048 00049 // ***************************************************************************** 00050 // Nested includes 00051 // ***************************************************************************** 00052 #include "oaName.h" 00053 #include "oaConstraintGroup.h" 00054 #include "oaDesignModTypes.h" 00055 #include "oaBlockObject.h" 00056 #include "oaDesignCollection.h" 00057 #include "oaConnCollection.h" 00058 #include "oaAttrType.h" 00059 #include "oaSigType.h" 00060 #include "oaSource.h" 00061 00062 00063 00064 // ***************************************************************************** 00065 // Declare and define types in the OpenAccess namespace. 00066 // ***************************************************************************** 00067 BEGIN_OA_NAMESPACE 00068 00069 00070 00071 // ***************************************************************************** 00072 // oaNetAttrTypeEnum 00073 // ***************************************************************************** 00074 #define oavNumNetAttrTypes 6 00075 00076 enum oaNetAttrTypeEnum { 00077 oacNameNetAttrType = 0, 00078 oacSigTypeNetAttrType = 1, 00079 oacIsGlobalNetAttrType = 2, 00080 oacIsImplicitNetAttrType = 3, 00081 oacIsEmptyNetAttrType = 4, 00082 oacNumBitsNetAttrType = 5 00083 }; 00084 00085 00086 00087 // ***************************************************************************** 00088 // oaNetAttrType 00089 // ***************************************************************************** 00090 class OA_DESIGN_DLL_API oaNetAttrType : public oaAttrType { 00091 public: 00092 oaNetAttrType(oaNetAttrTypeEnum valueIn); 00093 oaNetAttrType(const oaString &name); 00094 oaNetAttrType(oaAttrType attr); 00095 00096 virtual const oaString &getName() const; 00097 00098 oaNetAttrTypeEnum getValue() const; 00099 00100 private: 00101 static const oaString names[]; 00102 }; 00103 00104 00105 00106 // ***************************************************************************** 00107 // oaRoutePatternEnum 00108 // ***************************************************************************** 00109 #define oavNumRoutePatternTypes 3 00110 00111 enum oaRoutePatternEnum { 00112 oacSteinerRoutePattern = 0, 00113 oacBalancedRoutePattern = 1, 00114 oacTrunkRoutePattern = 2 00115 }; 00116 00117 00118 00119 // ***************************************************************************** 00120 // oaRoutePattern 00121 // ***************************************************************************** 00122 class OA_DESIGN_DLL_API oaRoutePattern { 00123 public: 00124 oaRoutePattern(oaRoutePatternEnum valueIn); 00125 oaRoutePattern(const oaString &name); 00126 ~oaRoutePattern(); 00127 00128 const oaString &getName() const; 00129 00130 operator oaRoutePatternEnum() const; 00131 00132 private: 00133 oaRoutePatternEnum value; 00134 00135 static const oaString names[]; 00136 }; 00137 00138 00139 00140 // ***************************************************************************** 00141 // oaConnStatusEnum 00142 // ***************************************************************************** 00143 #define oavNumConnStatusTypes 3 00144 00145 enum oaConnStatusEnum { 00146 oacNormalConnStatus = 0, 00147 oacFixedConnStatus = 1, 00148 oacLockedConnStatus = 2 00149 }; 00150 00151 00152 00153 // ***************************************************************************** 00154 // oaConnStatus 00155 // ***************************************************************************** 00156 class OA_DESIGN_DLL_API oaConnStatus { 00157 public: 00158 oaConnStatus(oaConnStatusEnum valueIn); 00159 oaConnStatus(const oaString &name); 00160 ~oaConnStatus(); 00161 00162 const oaString &getName() const; 00163 00164 operator oaConnStatusEnum() const; 00165 00166 private: 00167 oaConnStatusEnum value; 00168 00169 static const oaString names[]; 00170 }; 00171 00172 00173 00174 // ***************************************************************************** 00175 // oaNet 00176 // ***************************************************************************** 00177 class OA_DESIGN_DLL_API oaNet : public oaBlockObject { 00178 public: 00179 static oaNet *create(oaBlock *block, 00180 const oaName &name, 00181 oaSigType sigType = oacSignalSigType, 00182 oaBoolean isGlobal = false, 00183 oaBlockDomainVisibility view = oacInheritFromTopBlock); 00184 00185 void destroy(); 00186 00187 static oaNet *find(const oaBlock *block, 00188 const oaName &name); 00189 00190 static oaBoolean isValidName(const oaBlock *block, 00191 const oaName &name); 00192 00193 oaBoolean isEmpty() const; 00194 oaBoolean isImplicit() const; 00195 oaBoolean isGlobal() const; 00196 00197 oaUInt4 getNumBits() const; 00198 oaBitNet *getBit(oaUInt4 bitIndex) const; 00199 00200 void getName(oaName &name) const; 00201 void getName(const oaNameSpace &ns, 00202 oaString &name) const; 00203 00204 oaSigType getSigType() const; 00205 oaInt4 getPriority() const; 00206 oaSource getSource() const; 00207 00208 void setGlobal(oaBoolean isGlobal); 00209 void setSigType(const oaSigType &sigType); 00210 void setPriority(oaInt4 priority); 00211 void setSource(oaSource source); 00212 00213 oaBoolean hasDefaultConstraintGroup() const; 00214 oaConstraintGroup *getDefaultConstraintGroup() const; 00215 00216 void transfer(oaNet *fromNet); 00217 void merge(oaNet *fromNet); 00218 00219 void scalarize(); 00220 00221 oaOccNet *getOccNet() const; 00222 00223 oaCollection<oaGuide, oaNet> getGuides(oaBoolean includeRouteGuides = true) const; 00224 oaCollection<oaInstTerm, oaNet> getInstTerms(oaUInt4 filterFlags = oacInstTermIterNotImplicit) const; 00225 oaCollection<oaOccNet, oaNet> getOccNets(const oaOccurrence *top) const; 00226 oaCollection<oaPin, oaNet> getPins() const; 00227 oaCollection<oaRoute, oaNet> getRoutes() const; 00228 oaCollection<oaShape, oaNet> getShapes(oaUInt4 filterFlags = oacShapeIterNetRoutes) const; 00229 oaCollection<oaBitNet, oaNet> getSingleBitMembers() const; 00230 oaCollection<oaSteiner, oaNet> getSteiners() const; 00231 oaCollection<oaTerm, oaNet> getTerms(oaUInt4 filterflags = oacTermIterNotImplicit) const; 00232 oaCollection<oaVia, oaNet> getVias(oaUInt4 filterFlags = oacViaIterNetRoutes) const; 00233 00234 oaMemNetCollection getMemberNets(oaBoolean unique = true) const; 00235 00236 enum {dtIndex = oacNetDataType}; 00237 }; 00238 00239 00240 00241 // ***************************************************************************** 00242 // oaBitNet 00243 // ***************************************************************************** 00244 class OA_DESIGN_DLL_API oaBitNet : public oaNet { 00245 public: 00246 oaBoolean isPreferredEquivalent() const; 00247 oaBoolean isOriginal() const; 00248 00249 oaNetConnectDef *getConnectDef() const; 00250 oaConnStatus getConnStatus() const; 00251 oaBitNet *getOriginal() const; 00252 void getParasiticConfidence(oaUInt4 &minValue, 00253 oaUInt4 &maxValue) const; 00254 oaBitNet *getPreferredEquivalent() const; 00255 oaRoutePattern getRoutePattern() const; 00256 oaBitNet *getShieldNet1() const; 00257 oaBitNet *getShieldNet2() const; 00258 oaFloat getVoltage() const; 00259 00260 void setConnStatus(oaConnStatus status); 00261 void setOriginal(oaBitNet *original); 00262 void setParasiticConfidence(oaUInt4 value); 00263 void setParasiticConfidence(oaUInt4 minValue, 00264 oaUInt4 maxValue); 00265 void setPreferredEquivalent(); 00266 void setRoutePattern(oaRoutePattern routePattern); 00267 void setShieldNet1(oaBitNet *shieldNet); 00268 void setShieldNet2(oaBitNet *shieldNet); 00269 void setVoltage(oaFloat voltage); 00270 00271 void makeEquivalent(oaBitNet *equivNet); 00272 void breakEquivalence(); 00273 oaBoolean hasImplicitEquivalence() const; 00274 00275 oaCollection<oaBitNet, oaBitNet> getEquivalentNets() const; 00276 oaCollection<oaBitNet, oaBitNet> getEquivalentNets(oaUInt4 filterFlags) const; 00277 }; 00278 00279 00280 00281 // ***************************************************************************** 00282 // Design Traits. 00283 // ***************************************************************************** 00284 template<> 00285 class oaTraits<oaNet> { 00286 public: 00287 typedef oaBlockObject parentType; 00288 typedef oaNetModTypeEnum modTypeType; 00289 enum {domain = oacBlockDomain}; 00290 enum {dbType = oacDesignDBType}; 00291 enum {isConcrete = false}; 00292 enum {dtIndex = oacNetDataType}; 00293 enum {isMultiDomain = true}; 00294 enum {dataTypeEnumVal = oacNetDataType}; 00295 enum {abstractTypeEnumVal = oacNetType}; 00296 }; 00297 00298 template<> 00299 class oaTraits<oaBitNet> { 00300 public: 00301 typedef oaNetModTypeEnum modTypeType; 00302 typedef oaNet parentType; 00303 enum {dtIndex = oacNetDataType}; 00304 enum {isMultiDomain = true}; 00305 enum {dataTypeEnumVal = oacNetDataType}; 00306 enum {domain = oacBlockDomain}; 00307 enum {dbType = oacDesignDBType}; 00308 enum {isConcrete = false}; 00309 enum {abstractTypeEnumVal = oacBitNetType}; 00310 }; 00311 00312 00313 00314 END_OA_NAMESPACE 00315 00316 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.