oaPin.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaPin.h
00004 //
00005 // This file contains the definition for the oaPin class. A oaPin implements an
00006 // object that represents the physical connections of terminals to nets.
00007 //
00008 // *****************************************************************************
00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00010 // Integration Initiative, this material may not be copied, modified,
00011 // re-published, uploaded, executed, or distributed in any way, in any medium,
00012 // in whole or in part, without prior written permission from Cadence.
00013 //
00014 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: icftcm $
00018 //  $Revision: #1 $
00019 //  $Date: 2010/08/09 $
00020 //  $State: Exp $
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaPin_P)
00027 #define oaPin_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaInst.h"
00035 
00036 
00037 
00038 // *****************************************************************************
00039 // Declare and define types in the OpenAccess namespace.
00040 // *****************************************************************************
00041 BEGIN_OA_NAMESPACE
00042 
00043 
00044 
00045 // *****************************************************************************
00046 // Access Direction Bits
00047 // *****************************************************************************
00048 #define oacNone         0x0000u
00049 #define oacTop          0x0001u
00050 #define oacBottom       0x0002u
00051 #define oacLeft         0x0004u
00052 #define oacRight        0x0008u
00053 
00054 
00055 
00056 // *****************************************************************************
00057 // oaPinTypeEnum
00058 // *****************************************************************************
00059 #define oavNumPinTypes      3
00060 
00061 enum oaPinTypeEnum {
00062     oacNonePinType  = 0,
00063     oacCorePinType  = 1,
00064     oacBumpPinType  = 2
00065 };
00066 
00067 
00068 
00069 // *****************************************************************************
00070 // oaPinType
00071 // *****************************************************************************
00072 class OA_DESIGN_DLL_API oaPinType {
00073 public:
00074                             oaPinType(oaPinTypeEnum valueIn);
00075                             oaPinType(const oaString &name);
00076                             ~oaPinType();
00077 
00078                             operator                oaPinTypeEnum() const;
00079 
00080     const oaString          &getName() const;
00081 
00082 private:
00083     static const oaString   *initNames();
00084 
00085     static const oaString   *names;
00086     oaPinTypeEnum           value;
00087 };
00088 
00089 
00090 
00091 // *****************************************************************************
00092 // oaPin
00093 // *****************************************************************************
00094 class OA_DESIGN_DLL_API oaPin : public oaBlockObject {
00095 public:
00096     static oaPin                    *create(oaTerm  *term,
00097                                             oaUInt4 accessDir = oacNone);
00098     static oaPin                    *create(oaTerm          *term,
00099                                             const oaString  &name,
00100                                             oaUInt4         accessDir = oacNone);
00101 
00102     void                            destroy();
00103 
00104     static oaPin                    *find(const oaTerm      *term,
00105                                           const oaString    &name);
00106 
00107     oaTerm                          *getTerm() const;
00108     void                            getName(oaString &name) const;
00109     oaUInt4                         getAccessDir() const;
00110     oaPlacementStatus               getPlacementStatus() const;
00111     oaPinType                       getPinType() const;
00112 
00113     void                            setTerm(oaTerm *term);
00114     void                            setName(const oaString &name);
00115     void                            setAccessDir(oaUInt4 accessDir);
00116     void                            setPlacementStatus(oaPlacementStatus status);
00117     void                            setPinType(oaPinType pinType);
00118 
00119     oaCollection<oaPinFig, oaPin>   getFigs() const;
00120     oaCollection<oaRoute, oaPin>    getConnRoutes() const;
00121 
00122     enum {dtIndex = oacPinDataType};
00123 };
00124 
00125 
00126 
00127 // *****************************************************************************
00128 // Design Traits.
00129 // *****************************************************************************
00130 template<>
00131 class oaTraits<oaPin> {
00132 public:
00133     typedef oaBlockObject       parentType;
00134     typedef oaPinModTypeEnum    modTypeType;
00135     enum {domain = oacBlockDomain};
00136     enum {dbType = oacDesignDBType};
00137     enum {isMultiDomain = false};
00138     enum {isConcrete = true};
00139     enum {objectTypeEnumVal = oacPinType};
00140     enum {dtIndex = oacPinDataType};
00141     enum {dataTypeEnumVal = oacPinDataType};
00142 };
00143 
00144 
00145 
00146 END_OA_NAMESPACE
00147 
00148 #endif

Return to top of page