oaVia.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaVia.h
00004 //
00005 // This file contains the definitions of the oaVia class and its public
00006 // supporting classes. These classes include:
00007 //
00008 //  oaViaDirection
00009 //      The oaViaDirection class implements an enumerated type that describes
00010 //      the direction of a via.
00011 //
00012 //  oaVia
00013 //      This class is an abstract base for all types of vias. oaVia objects are
00014 //      used for connecting two adjacent route segments (pathSegs) that are on
00015 //      different layers. oaVia objects reference an oaViaDef defined in a
00016 //      technology database.
00017 //
00018 //  oaStdVia
00019 //      This class implements a standard via. A standard via uses a built in
00020 //      model of a via, and refers to an oaStdViaDef that has a specific set of
00021 //      parameters defined in an oaViaParam.
00022 //
00023 //  oaCustomVia
00024 //      This class implements a custom via. A custom via uses a specified design
00025 //      to represent a via, and refers to an oaCustomViaDef. The design may be
00026 //      a parameterized cell.
00027 //
00028 // *****************************************************************************
00029 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00030 // Integration Initiative, this material may not be copied, modified,
00031 // re-published, uploaded, executed, or distributed in any way, in any medium,
00032 // in whole or in part, without prior written permission from Cadence.
00033 //
00034 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00035 //                           All Rights Reserved.
00036 //
00037 //  $Author: icftcm $
00038 //  $Revision: #1 $
00039 //  $Date: 2010/08/09 $
00040 //  $State: Exp $
00041 // *****************************************************************************
00042 // *****************************************************************************
00043 
00044 
00045 
00046 #if !defined(oaVia_P)
00047 #define oaVia_P
00048 
00049 
00050 
00051 // *****************************************************************************
00052 // Nested includes
00053 // *****************************************************************************
00054 #include "oaRef.h"
00055 #include "oaViaHeader.h"
00056 
00057 
00058 
00059 // *****************************************************************************
00060 // Declare and define types in the OpenAccess namespace.
00061 // *****************************************************************************
00062 BEGIN_OA_NAMESPACE
00063 
00064 
00065 
00066 // *****************************************************************************
00067 // oaViaDirectionEnum
00068 // *****************************************************************************
00069 #define oavNumViaDirectionTypes 2
00070 
00071 enum oaViaDirectionEnum {
00072     oacLayer1ToLayer2ViaDirection   = 0,
00073     oacLayer2ToLayer1ViaDirection   = 1
00074 };
00075 
00076 
00077 
00078 // *****************************************************************************
00079 // oaViaDirection
00080 // *****************************************************************************
00081 class OA_DESIGN_DLL_API oaViaDirection {
00082 public:         
00083                             oaViaDirection(oaViaDirectionEnum valueIn);
00084                             oaViaDirection(const oaString &name);
00085                             ~oaViaDirection();
00086 
00087     const oaString          &getName() const;
00088 
00089                             operator                oaViaDirectionEnum() const;
00090 
00091 private:
00092     oaViaDirectionEnum      value;
00093 
00094     static const oaString   names[];
00095 };
00096 
00097 
00098 
00099 // *****************************************************************************
00100 // oaVia
00101 // *****************************************************************************
00102 class OA_DESIGN_DLL_API oaVia : public oaRef {
00103 public:
00104     oaViaHeader                     *getHeader() const;
00105     oaViaDef                        *getViaDef() const;
00106     void                            getViaDefName(oaString &name) const;
00107     oaPurposeNum                    getPurposeNum() const;
00108     oaRoute                         *getRoute() const;
00109     oaRouteStatus                   getRouteStatus() const;
00110     oaRouteTopology                 getRouteTopology() const;
00111     oaViaDirection                  getDirection() const;
00112     oaBitNet                        *getShieldedNet1() const;
00113     oaBitNet                        *getShieldedNet2() const;
00114     oaBoolean                       isUnShielded() const;
00115 
00116     oaBoolean                       hasRoute() const;
00117 
00118     void                            setPurposeNum(oaPurposeNum purposeNum);
00119     void                            setRouteStatus(const oaRouteStatus &status);
00120     void                            setRouteTopology(const oaRouteTopology &topology);
00121     void                            setDirection(const oaViaDirection &dir);
00122     void                            setShieldedNet1(oaBitNet *net);
00123     void                            setShieldedNet2(oaBitNet *net);
00124     void                            setUnShielded(oaBoolean unShielded);
00125 
00126     oaCollection<oaRoute, oaVia>    getConnRoutes() const;
00127 
00128     enum {dtIndex = oacViaDataType};
00129 };
00130 
00131 
00132 
00133 // *****************************************************************************
00134 // oaStdVia
00135 // *****************************************************************************
00136 class OA_DESIGN_DLL_API oaStdVia : public oaVia {
00137 public:
00138     static oaStdVia         *create(oaBlock             *block,
00139                                     const oaStdViaDef   *viaDef,
00140                                     const oaTransform   &xform,
00141                                     const oaViaParam    *params = NULL);
00142 
00143     oaStdViaHeader          *getHeader() const;
00144     void                    getViaParams(oaViaParam &params) const;
00145 
00146     void                    setViaParams(const oaViaParam &params);
00147 };
00148 
00149 
00150 
00151 // *****************************************************************************
00152 // oaCustomVia
00153 // *****************************************************************************
00154 class OA_DESIGN_DLL_API oaCustomVia : public oaVia {
00155 public:
00156     static oaCustomVia      *create(oaBlock                 *block,
00157                                     const oaCustomViaDef    *viaDef,
00158                                     const oaTransform       &xform,
00159                                     const oaParamArray      *params = NULL);
00160 
00161     void                    getLibName(oaScalarName &libName) const;
00162     void                    getCellName(oaScalarName &cellName) const;
00163     void                    getViewName(oaScalarName &viewName) const;
00164     void                    getLibName(const oaNameSpace    &ns,
00165                                        oaString             &libName) const;
00166     void                    getCellName(const oaNameSpace   &ns,
00167                                         oaString            &cellName) const;
00168     void                    getViewName(const oaNameSpace   &ns,
00169                                         oaString            &viewName) const;
00170     oaCustomViaHeader       *getHeader() const;
00171     void                    getParams(oaParamArray &params) const;
00172 
00173     void                    setParams(const oaParamArray &params);
00174 };
00175 
00176 
00177 
00178 // *****************************************************************************
00179 // Design Traits.
00180 // *****************************************************************************
00181 template<>
00182 class oaTraits<oaVia> {
00183 public:
00184     typedef oaRef               parentType;
00185     typedef oaViaModTypeEnum    modTypeType;
00186     enum {domain = oacBlockDomain};
00187     enum {dbType = oacDesignDBType};
00188     enum {isMultiDomain = false};
00189     enum {isConcrete = false};
00190     enum {dtIndex = oacViaDataType};
00191     enum {dataTypeEnumVal = oacViaDataType};
00192     enum {abstractTypeEnumVal = oacViaType};
00193 };
00194 
00195 template<>
00196 class oaTraits<oaStdVia> {
00197 public:
00198     typedef oaViaModTypeEnum    modTypeType;
00199     typedef oaVia               parentType;
00200     enum {dtIndex = oacViaDataType};
00201     enum {dataTypeEnumVal = oacViaDataType};
00202     enum {domain = oacBlockDomain};
00203     enum {dbType = oacDesignDBType};
00204     enum {isMultiDomain = false};
00205     enum {isConcrete = true};
00206     enum {objectTypeEnumVal = oacStdViaType};
00207 };
00208 
00209 template<>
00210 class oaTraits<oaCustomVia> {
00211 public:
00212     typedef oaViaModTypeEnum    modTypeType;
00213     typedef oaVia               parentType;
00214     enum {dtIndex = oacViaDataType};
00215     enum {dataTypeEnumVal = oacViaDataType};
00216     enum {domain = oacBlockDomain};
00217     enum {dbType = oacDesignDBType};
00218     enum {isMultiDomain = false};
00219     enum {isConcrete = true};
00220     enum {objectTypeEnumVal = oacCustomViaType};
00221 };
00222 
00223 
00224 
00225 END_OA_NAMESPACE
00226 
00227 #endif

Return to top of page