oaInstTerm.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaInstTerm.h
00004 //
00005 // This file contains the definition for the oaInstTerm class. The oaInstTerm
00006 // class is an abstract base for all types of connections between a net and a
00007 // terminal of an instance.
00008 //
00009 // *****************************************************************************
00010 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00011 // Integration Initiative, this material may not be copied, modified,
00012 // re-published, uploaded, executed, or distributed in any way, in any medium,
00013 // in whole or in part, without prior written permission from Cadence.
00014 //
00015 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00016 //                           All Rights Reserved.
00017 //
00018 //  $Author: icftcm $
00019 //  $Revision: #1 $
00020 //  $Date: 2010/08/09 $
00021 //  $State$
00022 // *****************************************************************************
00023 // *****************************************************************************
00024 
00025 
00026 
00027 #if !defined(oaInstTerm_P)
00028 #define oaInstTerm_P
00029 
00030 
00031 
00032 // *****************************************************************************
00033 // Nested includes
00034 // *****************************************************************************
00035 #include "oaInst.h"
00036 #include "oaNetTermArray.h"
00037 
00038 
00039 
00040 // *****************************************************************************
00041 // Declare and define types in the OpenAccess namespace.
00042 // *****************************************************************************
00043 BEGIN_OA_NAMESPACE
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // oaInstTermAttrTypeEnum
00049 // *****************************************************************************
00050 #define oavNumInstTermAttrTypes 1
00051 
00052 
00053 enum oaInstTermAttrTypeEnum {    oacNameInstTermAttrType            = 0};
00054 
00055 
00056 
00057 // *****************************************************************************
00058 // oaInstTermAttrType
00059 // *****************************************************************************
00060 class OA_DESIGN_DLL_API oaInstTermAttrType : public oaAttrType {
00061 public:
00062                             oaInstTermAttrType(oaInstTermAttrTypeEnum valueIn);
00063                             oaInstTermAttrType(const oaString &name);
00064                             oaInstTermAttrType(oaAttrType attr);
00065     virtual inline          ~oaInstTermAttrType();
00066 
00067     virtual const oaString  &getName() const;
00068 
00069     oaInstTermAttrTypeEnum  getValue() const;
00070 
00071 private:
00072     static const oaString   names[];
00073 };
00074 
00075 
00076 
00077 // *****************************************************************************
00078 // oaInstTerm
00079 // *****************************************************************************
00080 class OA_DESIGN_DLL_API oaInstTerm : public oaBlockObject {
00081 public:
00082     static oaInstTerm                       *create(oaNet                   *net,
00083                                                     oaInst                  *inst,
00084                                                     oaTerm                  *term,
00085                                                     oaBlockDomainVisibility view = oacInheritFromTopBlock);
00086     static oaInstTerm                       *create(oaNet                   *net,
00087                                                     oaInst                  *inst,
00088                                                     const oaName            &termName,
00089                                                     oaBlockDomainVisibility view = oacInheritFromTopBlock);
00090     static oaInstTerm                       *create(oaNet                   *net,
00091                                                     oaInst                  *inst,
00092                                                     oaUInt4                 termPosition,
00093                                                     oaBlockDomainVisibility view = oacInheritFromTopBlock);
00094     static void                             create(oaInst                   *inst,
00095                                                    const oaNetTermArray     &connData,
00096                                                    oaBlockDomainVisibility  view = oacInheritFromTopBlock);
00097     static void                             create(oaInst                   *inst,
00098                                                    const oaNetTermNameArray &connData,
00099                                                    oaBlockDomainVisibility  view = oacInheritFromTopBlock);
00100     static void                             create(oaInst                   *inst,
00101                                                    const oaNetTermPosArray  &connData,
00102                                                    oaBlockDomainVisibility  view = oacInheritFromTopBlock);
00103 
00104     static oaInstTerm                       *find(const oaInst  *inst,
00105                                                   const oaTerm  *term);
00106     static oaInstTerm                       *find(const oaInst  *inst,
00107                                                   const oaName  &termName);
00108     static oaInstTerm                       *find(const oaInst  *inst,
00109                                                   oaUInt4       termPosition);
00110 
00111     void                                    destroy();
00112     void                                    hide();
00113 
00114     oaInstTerm                              *getBit(oaUInt4 bitIndex) const;
00115     oaNet                                   *getNet(oaBoolean preferred = false) const;
00116     oaInst                                  *getInst() const;
00117     oaTerm                                  *getTerm() const;
00118     void                                    getTermName(oaName &name) const;
00119     void                                    getTermName(const oaNameSpace   &ns,
00120                                                         oaString            &name) const;
00121     oaUInt4                                 getTermPosition() const;
00122     oaUInt4                                 getNumBits() const;
00123     oaRouteMethod                           getRouteMethod() const;
00124     oaBoolean                               isBound() const;
00125     oaBoolean                               isImplicit() const;
00126     oaBoolean                               usesTermPosition() const;
00127 
00128     void                                    addToNet(oaNet *net);
00129     void                                    removeFromNet();
00130 
00131     void                                    setRouteMethod(oaRouteMethod routeMethod);
00132     void                                    scalarize();
00133 
00134     oaOccInstTerm                           *getOccInstTerm() const;
00135 
00136     oaCollection<oaRoute, oaInstTerm>       getConnRoutes() const;
00137     oaCollection<oaOccInstTerm, oaInstTerm> getOccInstTerms(const oaOccurrence *top) const;
00138 
00139     enum {dtIndex = oacInstTermDataType};
00140 };
00141 
00142 
00143 
00144 // *****************************************************************************
00145 // Design Traits.
00146 // *****************************************************************************
00147 template<>
00148 class oaTraits<oaInstTerm> {
00149 public:
00150     typedef oaBlockObject           parentType;
00151     typedef oaInstTermModTypeEnum   modTypeType;
00152     enum {domain = oacBlockDomain};
00153     enum {dbType = oacDesignDBType};
00154     enum {isMultiDomain = true};
00155     enum {dtIndex = oacInstTermDataType};
00156     enum {isConcrete = true};
00157     enum {objectTypeEnumVal = oacInstTermType};
00158     enum {dataTypeEnumVal = oacInstTermDataType};
00159 };
00160 
00161 
00162 
00163 END_OA_NAMESPACE
00164 
00165 #endif

Return to top of page