oaViaDef.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaViaDef.h
00004 //
00005 // This file contains the definition for the oaViaDef, oaStdViaDef, and
00006 // oaCustomViaDef classes.
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(oaViaDef_P)
00027 #define oaViaDef_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaPhysicalLayer.h"
00035 #include "oaViaParam.h"
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Declare and define types in the OpenAccess namespace.
00041 // *****************************************************************************
00042 BEGIN_OA_NAMESPACE
00043 
00044 
00045 
00046 // *****************************************************************************
00047 // oaViaDef
00048 // *****************************************************************************
00049 class OA_TECH_DLL_API oaViaDef : public oaTechObject {
00050 public:
00051     static oaViaDef                     *find(const oaTech      *tech,
00052                                               const oaString    &name);
00053     static oaViaDef                     *find(const oaTech      *tech,
00054                                               const oaString    &name,
00055                                               oaBoolean         local);
00056 
00057     void                                destroy();
00058 
00059     void                                getName(oaString &name) const;
00060     void                                getLayers(oaPhysicalLayer   *&layer1,
00061                                                   oaPhysicalLayer   *&layer2) const;
00062     oaPhysicalLayer                     *getLayer1() const;
00063     oaPhysicalLayer                     *getLayer2() const;
00064     oaLayerNum                          getLayer1Num() const;
00065     oaLayerNum                          getLayer2Num() const;
00066     oaFloat                             getResistancePerCut() const;
00067 
00068     oaBoolean                           hasLayer(oaLayerNum layerNum) const;
00069 
00070     void                                setResistancePerCut(oaFloat resPerCut);
00071 
00072     oaCollection<oaViaHeader, oaViaDef> getUsedIn() const;
00073 
00074     enum {dtIndex = oacViaDefDataType};
00075 };
00076 
00077 
00078 
00079 // *****************************************************************************
00080 // oaStdViaDef
00081 // *****************************************************************************
00082 class OA_TECH_DLL_API oaStdViaDef : public oaViaDef {
00083 public:
00084     static oaStdViaDef      *create(oaTech              *tech,
00085                                     const oaString      &name,
00086                                     oaPhysicalLayer     *layer1,
00087                                     oaPhysicalLayer     *layer2,
00088                                     const oaViaParam    &params,
00089                                     oaPhysicalLayer     *implant1 = NULL,
00090                                     oaPhysicalLayer     *implant2 = NULL);
00091 
00092     void                    getParams(oaViaParam &params) const;
00093     oaBoolean               hasImplant1() const;
00094     oaBoolean               hasImplant2() const;
00095     oaPhysicalLayer         *getImplant1() const;
00096     oaPhysicalLayer         *getImplant2() const;
00097     oaLayerNum              getImplant1Num() const;
00098     oaLayerNum              getImplant2Num() const;
00099 
00100     void                    setParams(const oaViaParam &params);
00101 };
00102 
00103 
00104 
00105 // *****************************************************************************
00106 // oaCustomViaDef
00107 // *****************************************************************************
00108 class OA_TECH_DLL_API oaCustomViaDef : public oaViaDef {
00109 public:
00110     static oaCustomViaDef   *create(oaTech              *tech,
00111                                     const oaString      &name,
00112                                     const oaScalarName  &libName,
00113                                     const oaScalarName  &cellName,
00114                                     const oaScalarName  &viewName,
00115                                     oaPhysicalLayer     *layer1,
00116                                     oaPhysicalLayer     *layer2);
00117 
00118     void                    getLibName(oaScalarName &libName) const;
00119     void                    getCellName(oaScalarName &cellName) const;
00120     void                    getViewName(oaScalarName &viewName) const;
00121 
00122     void                    getLibName(const oaNameSpace    &ns,
00123                                        oaString             &out) const;
00124     void                    getCellName(const oaNameSpace   &ns,
00125                                         oaString            &out) const;
00126     void                    getViewName(const oaNameSpace   &ns,
00127                                         oaString            &out) const;
00128     void                    setMaster(const oaScalarName    &libName,
00129                                       const oaScalarName    &cellName,
00130                                       const oaScalarName    &viewName);
00131 
00132 };
00133 
00134 
00135 
00136 // *****************************************************************************
00137 // oaTech traits
00138 // *****************************************************************************
00139 template<>
00140 class oaTraits<oaViaDef> {
00141 public:
00142     typedef oaTechObject        parentType;
00143     typedef oaViaDefModTypeEnum modTypeType;
00144     typedef oaViaDefTbl         tblType;
00145     enum {dbType = oacTechDBType};
00146     enum {domain = oacNoDomain};
00147     enum {isMultiDomain = false};
00148     enum {isConcrete = false};
00149     enum {dtIndex = oacViaDefDataType};
00150     enum {dataTypeEnumVal = oacViaDefDataType};
00151     enum {abstractTypeEnumVal = oacViaDefType};
00152 };
00153 
00154 template<>
00155 class oaTraits<oaStdViaDef> {
00156 public:
00157     typedef oaViaDefModTypeEnum modTypeType;
00158     typedef oaViaDefTbl         tblType;
00159     typedef oaViaDef            parentType;
00160     enum {dtIndex = oacViaDefDataType};
00161     enum {dataTypeEnumVal = oacViaDefDataType};
00162     enum {dbType = oacTechDBType};
00163     enum {domain = oacNoDomain};
00164     enum {isMultiDomain = false};
00165     enum {isConcrete = true};
00166     enum {objectTypeEnumVal = oacStdViaDefType};
00167 };
00168 
00169 template<>
00170 class oaTraits<oaCustomViaDef> {
00171 public:
00172     typedef oaViaDefModTypeEnum modTypeType;
00173     typedef oaViaDefTbl         tblType;
00174     typedef oaViaDef            parentType;
00175     enum {dtIndex = oacViaDefDataType};
00176     enum {dataTypeEnumVal = oacViaDefDataType};
00177     enum {dbType = oacTechDBType};
00178     enum {domain = oacNoDomain};
00179     enum {isMultiDomain = false};
00180     enum {isConcrete = true};
00181     enum {objectTypeEnumVal = oacCustomViaDefType};
00182 };
00183 
00184 
00185 
00186 END_OA_NAMESPACE
00187 
00188 #endif

Return to top of page