oaTerm.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaTerm.h
00004 //
00005 // This file contains the definition for the oaTerm class and its public
00006 // supporting class.
00007 //
00008 // The oaTerm class is an abstract base for all types of terminals. Terminals
00009 // represent the logical connection points for a design. The pins associated
00010 // with terminals represent the physical connection points. The nets associated
00011 // with the terminals are logically exported through the terminals to the next
00012 // higher level in a design hierarchy.
00013 //
00014 // Terminals are available to EMH as oaTerm in the block domain, oaModTerm in
00015 // the module domain, and oaOccTerm in the occurrence domain.
00016 //
00017 // The supporting classes defined in this file include:
00018 //
00019 //  oaPinConnectMethod
00020 //      This class implements an enumerated type that describes the pin
00021 //      connection method associated with a terminal.
00022 //
00023 //  oaTermAttrType
00024 //      This class implements support for displaying different term attributes
00025 //      using a textDisplay object.
00026 //
00027 //  oaTermType
00028 //      This class implements an enumerated type that describes the type of
00029 //      an associated terminal.
00030 //
00031 //  oaRouteMethod
00032 //      This class implements an enumerated type that describes the routing
00033 //      method associated with various logical objects such as terminals, nets,
00034 //      and instTerms.
00035 //
00036 //  oaTermArray
00037 //  oaModTermArray
00038 //  oaOccTermArray
00039 //      These classes implement arrays of terminal pointers for the different
00040 //      EMH domains.
00041 //
00042 // *****************************************************************************
00043 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00044 // Integration Initiative, this material may not be copied, modified,
00045 // re-published, uploaded, executed, or distributed in any way, in any medium,
00046 // in whole or in part, without prior written permission from Cadence.
00047 //
00048 //                Copyright 2002-2008 Cadence Design Systems, Inc.
00049 //                           All Rights Reserved.
00050 //
00051 //  $Author: icftcm $
00052 //  $Revision: #1 $
00053 //  $Date: 2010/08/09 $
00054 // *****************************************************************************
00055 // *****************************************************************************
00056 
00057 
00058 
00059 #if !defined(oaTerm_P)
00060 #define oaTerm_P
00061 
00062 
00063 
00064 // *****************************************************************************
00065 // Nested includes
00066 // *****************************************************************************
00067 #include "oaAntennaData.h"
00068 #include "oaNet.h"
00069 
00070 
00071 
00072 
00073 // *****************************************************************************
00074 // Declare and define types in the OpenAccess namespace.
00075 // *****************************************************************************
00076 BEGIN_OA_NAMESPACE
00077 
00078 
00079 
00080 // *****************************************************************************
00081 // oaPinConnectMethodEnum
00082 // *****************************************************************************
00083 #define oavNumPinConnectMethodTypes     4
00084 
00085 enum oaPinConnectMethodEnum {
00086     oacDefaultPinConnectMethod  = 0,
00087     oacRingPinConnectMethod     = 1,
00088     oacAbutPinConnectMethod     = 2,
00089     oacFeedthruPinConnectMethod = 3
00090 };
00091 
00092 
00093 
00094 // *****************************************************************************
00095 // oaPinConnectMethod
00096 // *****************************************************************************
00097 class OA_DESIGN_DLL_API oaPinConnectMethod {
00098 public:
00099                             oaPinConnectMethod(oaPinConnectMethodEnum valIn);
00100                             oaPinConnectMethod(const oaString &name);
00101                             ~oaPinConnectMethod();
00102 
00103 #if !defined(OA_DEPRECATED)
00104     const oaString          &getName();
00105 #endif
00106 
00107                             operator                oaPinConnectMethodEnum() const;
00108 
00109     const oaString          &getName() const;
00110 
00111 private:
00112     oaPinConnectMethodEnum  value;
00113 
00114     static const oaString   names[];
00115 };
00116 
00117 
00118 
00119 // *****************************************************************************
00120 // oaTermAttrTypeEnum
00121 // *****************************************************************************
00122 #define oavNumTermAttrTypes     3
00123 
00124 enum oaTermAttrTypeEnum {
00125     oacNameTermAttrType     = 0,
00126     oacHasPinsTermAttrType  = 1,
00127     oacNumBitsTermAttrType  = 2
00128 };
00129 
00130 
00131 
00132 // *****************************************************************************
00133 // oaTermAttrType
00134 // *****************************************************************************
00135 class OA_DESIGN_DLL_API oaTermAttrType : public oaAttrType {
00136 public:
00137                             oaTermAttrType(oaTermAttrTypeEnum valueIn);
00138                             oaTermAttrType(const oaString &name);
00139                             oaTermAttrType(oaAttrType attr);
00140 
00141     virtual const oaString  &getName() const;
00142 
00143     oaTermAttrTypeEnum      getValue() const;
00144 
00145 private:
00146     static const oaString   names[];
00147 };
00148 
00149 
00150 
00151 // *****************************************************************************
00152 // oaTermTypeEnum
00153 // *****************************************************************************
00154 #define oavNumTermTypeEnums 7
00155 
00156 enum oaTermTypeEnum {
00157     oacInputTermType        = 0,
00158     oacOutputTermType       = 1,
00159     oacInputOutputTermType  = 2,
00160     oacSwitchTermType       = 3,
00161     oacJumperTermType       = 4,
00162     oacUnusedTermType       = 5,
00163     oacTristateTermType     = 6
00164 };
00165 
00166 
00167 
00168 // *****************************************************************************
00169 // oaTermType
00170 // *****************************************************************************
00171 class OA_DESIGN_DLL_API oaTermType {
00172 public:
00173                             oaTermType(oaTermTypeEnum valueIn);
00174                             oaTermType(const oaString &name);
00175                             ~oaTermType();
00176 
00177 #if !defined(OA_DEPRECATED)
00178     const oaString          &getName();
00179 #endif
00180 
00181                             operator                oaTermTypeEnum() const;
00182 
00183     const oaString          &getName() const;
00184 
00185 private:
00186     oaTermTypeEnum          value;
00187 
00188     static const oaString   names[];
00189 };
00190 
00191 
00192 
00193 // *****************************************************************************
00194 // oaRouteMethodEnum
00195 // *****************************************************************************
00196 #define oavNumRouteMethods 2
00197 
00198 enum oaRouteMethodEnum {
00199     oacGeometricRouteMethod = 0,
00200     oacSymbolicRouteMethod  = 1
00201 };
00202 
00203 
00204 
00205 // *****************************************************************************
00206 // oaRouteMethod
00207 // *****************************************************************************
00208 class OA_DESIGN_DLL_API oaRouteMethod {
00209 public:
00210                             oaRouteMethod(oaRouteMethodEnum valueIn);
00211                             oaRouteMethod(const oaString &name);
00212                             ~oaRouteMethod();
00213 
00214 #if !defined(OA_DEPRECATED)
00215     const oaString          &getName();
00216 #endif
00217 
00218                             operator                oaRouteMethodEnum() const;
00219 
00220     const oaString          &getName() const;
00221 
00222 private:
00223     oaRouteMethodEnum       value;
00224 
00225     static const oaString   names[];
00226 };
00227 
00228 
00229 
00230 // *****************************************************************************
00231 // Explicit template instantiations
00232 // *****************************************************************************
00233 #if defined(OA_DESIGN_DLL_EXTERN)
00234 OA_DESIGN_DLL_EXTERN template
00235  class OA_DESIGN_DLL_API oaArray<oaTerm*>;
00236 
00237 OA_DESIGN_DLL_EXTERN template
00238  class OA_DESIGN_DLL_API oaArray<oaModTerm*>;
00239 
00240 OA_DESIGN_DLL_EXTERN template
00241  class OA_DESIGN_DLL_API oaArray<oaOccTerm*>;
00242 #endif
00243 
00244 
00245 
00246 
00247 // *****************************************************************************
00248 // oaTermArray
00249 // *****************************************************************************
00250 class OA_DESIGN_DLL_API oaTermArray : public oaArray<oaTerm*> {
00251 public:
00252                             oaTermArray(oaUInt4 sizeIn = 0);
00253 };
00254 
00255 
00256 
00257 // *****************************************************************************
00258 // oaModTermArray
00259 // *****************************************************************************
00260 class OA_DESIGN_DLL_API oaModTermArray : public oaArray<oaModTerm*> {
00261 public:
00262                             oaModTermArray(oaUInt4 sizeIn = 0);
00263 };
00264 
00265 
00266 
00267 // *****************************************************************************
00268 // oaOccTermArray
00269 // *****************************************************************************
00270 class OA_DESIGN_DLL_API oaOccTermArray : public oaArray<oaOccTerm*> {
00271 public:
00272                             oaOccTermArray(oaUInt4 sizeIn = 0);
00273 };
00274 
00275 
00276 
00277 
00278 // *****************************************************************************
00279 // oaTerm
00280 // *****************************************************************************
00281 class OA_DESIGN_DLL_API oaTerm : public oaBlockObject {
00282 public:
00283     static oaTerm                   *create(oaNet                   *net,
00284                                             const oaName            &name,
00285                                             oaTermType              termType = oacInputOutputTermType,
00286                                             oaBlockDomainVisibility view = oacInheritFromTopBlock);
00287 
00288     void                            destroy();
00289 
00290     static oaTerm                   *find(const oaBlock *block,
00291                                           const oaName  &name);
00292     static oaTerm                   *find(const oaBlock *block,
00293                                           oaUInt4       position);
00294 
00295     static oaBoolean                isValidName(const oaNet     *net,
00296                                                 const oaName    &name);
00297 
00298     static oaUInt4                  getMaxPosition(const oaBlock *block);
00299 
00300     oaBoolean                       isImplicit() const;
00301     oaBoolean                       isInterface() const;
00302 
00303     oaNet                           *getNet(oaBoolean preferred = false) const;
00304     oaBitTerm                       *getBit(oaUInt4 bitIndex) const;
00305     oaUInt4                         getNumBits() const;
00306     oaTermType                      getTermType() const;
00307     oaUInt4                         getPosition() const;
00308     void                            getName(oaName &name) const;
00309     void                            getName(const oaNameSpace   &ns,
00310                                             oaString            &name) const;
00311 
00312     void                            moveToNet(oaNet *net);
00313 
00314     void                            setTermType(oaTermType termType);
00315     void                            setIsInterface(oaBoolean isInterface);
00316 
00317     void                            setPosition(oaUInt4 position);
00318     void                            unsetPosition();
00319 
00320     void                            scalarize();
00321 
00322     oaOccTerm                       *getOccTerm() const;
00323 
00324     oaCollection<oaPin, oaTerm>     getPins() const;
00325     oaCollection<oaRoute, oaTerm>   getConnRoutes() const;
00326     oaCollection<oaOccTerm, oaTerm> getOccTerms(const oaOccurrence *top) const;
00327 
00328     enum {dtIndex = oacTermDataType};
00329 };
00330 
00331 
00332 
00333 // *****************************************************************************
00334 // oaBitTerm
00335 // *****************************************************************************
00336 class OA_DESIGN_DLL_API oaBitTerm : public oaTerm {
00337 public:
00338     void                                getAntennaData(oaAntennaData    &data,
00339                                                        oaAntennaModel   model = oacDefaultAntennaModel) const;
00340     oaTermConnectDef                    *getConnectDef() const;
00341     oaBitTerm                           *getGroundSensitivity() const;
00342     oaPinConnectMethod                  getPinConnectMethod() const;
00343     oaRouteMethod                       getRouteMethod() const;
00344     oaBitTerm                           *getSupplySensitivity() const;
00345 
00346     void                                setMustJoin(const oaBitTerm *term);
00347     void                                unsetMustJoin();
00348 
00349     void                                setGroundSensitivity(const oaBitTerm *term);
00350     void                                setPinConnectMethod(oaPinConnectMethod method);
00351     void                                setRouteMethod(oaRouteMethod routeMethod);
00352     void                                setSupplySensitivity(const oaBitTerm *term);
00353 
00354     void                                setAntennaData(const oaAntennaData &data);
00355     void                                unsetAntennaData(oaAntennaModel model = oacDefaultAntennaModel);
00356     oaBoolean                           isAntennaDataSet(oaAntennaModel model = oacDefaultAntennaModel) const;
00357 
00358     void                                hide();
00359 
00360     oaCollection<oaBitTerm, oaBitTerm>  getMustJoinTerms() const;
00361 };
00362 
00363 
00364 
00365 // *****************************************************************************
00366 // Design Traits.
00367 // *****************************************************************************
00368 template<>
00369 class oaTraits<oaTerm> {
00370 public:
00371     typedef oaBlockObject       parentType;
00372     typedef oaTermModTypeEnum   modTypeType;
00373     enum {domain = oacBlockDomain};
00374     enum {dbType = oacDesignDBType};
00375     enum {isConcrete = false};
00376     enum {isMultiDomain = true};
00377     enum {dtIndex = oacTermDataType};
00378     enum {dataTypeEnumVal = oacTermDataType};
00379     enum {abstractTypeEnumVal = oacTermType};
00380 };
00381 
00382 template<>
00383 class oaTraits<oaBitTerm> {
00384 public:
00385     typedef oaTermModTypeEnum   modTypeType;
00386     typedef oaTerm              parentType;
00387     enum {isMultiDomain = true};
00388     enum {dtIndex = oacTermDataType};
00389     enum {dataTypeEnumVal = oacTermDataType};
00390     enum {domain = oacBlockDomain};
00391     enum {dbType = oacDesignDBType};
00392     enum {isConcrete = false};
00393     enum {abstractTypeEnumVal = oacBitTermType};
00394 };
00395 
00396 
00397 
00398 END_OA_NAMESPACE
00399 
00400 #endif

Return to top of page