oaConstraintDef.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaConstraintDef.h
00004 //
00005 // This file contains the definitions for the following classes:
00006 //      oaSimpleConstraintType
00007 //      oaLayerConstraintType
00008 //      oaLayerPairConstraintType
00009 //      oaLayerArrayConstraintType
00010 //      oaConstraintDef
00011 //      oaSimpleConstraintDef
00012 //      oaLayerConstraintDef
00013 //      oaLayerPairConstraintDef
00014 //      oaLayerArrayConstraintDef
00015 //
00016 // *****************************************************************************
00017 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00018 // Integration Initiative, this material may not be copied, modified,
00019 // re-published, uploaded, executed, or distributed in any way, in any medium,
00020 // in whole or in part, without prior written permission from Cadence.
00021 //
00022 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00023 //                           All Rights Reserved.
00024 //
00025 //  $Author: icftcm $
00026 //  $Revision: #1 $
00027 //  $Date: 2010/08/09 $
00028 //  $State: Exp $
00029 // *****************************************************************************
00030 // *****************************************************************************
00031 
00032 
00033 
00034 #if !defined(oaConstraintDef_P)
00035 #define oaConstraintDef_P
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Nested includes
00041 // *****************************************************************************
00042 #include "oaArray.h"
00043 #include "oaSessionObject.h"
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // Declare and define types in the OpenAccess namespace.
00049 // *****************************************************************************
00050 BEGIN_OA_NAMESPACE
00051 
00052 
00053 
00054 // *****************************************************************************
00055 // oaSimpleConstraintTypeEnum
00056 // *****************************************************************************
00057 #define oavNumSimpleConstraintTypes  21
00058 
00059 enum oaSimpleConstraintTypeEnum {
00060     oacValidRoutingLayers               = 0,
00061     oacValidRoutingVias                 = 1,
00062     oacCumMetalAntenna                  = 2,
00063     oacCumViaAntenna                    = 3,
00064     oacViaStackLimit                    = 4,
00065     oacHorizontalPlacementGridPitch     = 5,
00066     oacHorizontalPlacementGridOffset    = 6,
00067     oacVerticalPlacementGridPitch       = 7,
00068     oacVerticalPlacementGridOffset      = 8,
00069     oacDefaultHorizontalRouteGridPitch  = 9,
00070     oacDefaultVerticalRouteGridPitch    = 10,
00071     oacDefault135RouteGridPitch         = 11,
00072     oacDefault45RouteGridPitch          = 12,
00073     oacDefaultHorizontalRouteGridOffset = 13,
00074     oacDefaultVerticalRouteGridOffset   = 14,
00075     oacDefault135RouteGridOffset        = 15,
00076     oacDefault45RouteGridOffset         = 16,
00077     oacTaperHalo                        = 17,
00078     oacShapeAngle                       = 18,
00079     oacUseNonOrthogonalRoutingRules     = 19,
00080     oacMaxFloatingArea                  = 20
00081 };
00082 
00083 
00084 
00085 // *****************************************************************************
00086 // oaLayerConstraintTypeEnum
00087 // *****************************************************************************
00088 #define oavNumLayerConstraintTypes  83
00089 
00090 enum oaLayerConstraintTypeEnum {
00091     oacMinArea                          = 0,
00092     oacMinEnclosedArea                  = 1,
00093     oacMinDensity                       = 2,
00094     oacMaxDensity                       = 3,
00095     oacMinEdgeLength                    = 4,
00096     oacMinConcaveEdgeLength             = 5,
00097     oacMinConvexEdgeLength              = 6,
00098     oacMinDiagonalEdgeLength            = 7,
00099     oacMinSpacing                       = 8,
00100     oacMinDiagonalSpacing               = 9,
00101     oacMinCenterToCenterSpacing         = 10,
00102     oacMinDiffPotentialSpacing          = 11,
00103     oacMinEnclosedSpacing               = 12,
00104     oacMinFillPatternSpacing            = 13,
00105     oacMinProximitySpacing              = 14,
00106     oacMinProtrudedProximitySpacing     = 15,
00107     oacMinSameNetSpacing                = 16,
00108     oacMinAdjacentViaSpacing            = 17,
00109     oacMergeSpaceAllowed                = 18,
00110     oacMinWidth                         = 19,
00111     oacMinDiagonalWidth                 = 20,
00112     oacMinProtrusionWidth               = 21,
00113     oacMaxWidth                         = 22,
00114     oacMinSize                          = 23,
00115     oacMinNumCut                        = 24,
00116     oacMinProtrusionNumCut              = 25,
00117     oacHorizontalRouteGridPitch         = 26,
00118     oacHorizontalRouteGridOffset        = 27,
00119     oacVerticalRouteGridPitch           = 28,
00120     oacVerticalRouteGridOffset          = 29,
00121     oac135RouteGridPitch                = 30,
00122     oac135RouteGridOffset               = 31,
00123     oac45RouteGridPitch                 = 32,
00124     oac45RouteGridOffset                = 33,
00125     oacErrorLayer                       = 34,
00126     oacAntenna                          = 35,
00127     oacMinLength                        = 36,
00128     oacMaxLength                        = 37,
00129     oacDiagonalShapesAllowed            = 38,
00130     oacMaxTapSpacing                    = 39,
00131     oacMinBoundaryExtension             = 40,
00132     oacMinBoundaryInteriorHalo          = 41,
00133     oacMinWireExtension                 = 42,
00134     oacMinParallelViaSpacing            = 43,
00135     oacMinEndOfLineSpacing              = 44,
00136     oacMinLargeViaArraySpacing          = 45,
00137     oacMinLargeViaArrayWidth            = 46,
00138     oacMinLargeViaArrayCutSpacing       = 47,
00139     oacRectangularLargeViaArraysAllowed = 48,
00140     oacMinEdgeMaxCount                  = 49,
00141     oacMinEdgeAdjacentDistance          = 50,
00142     oacMaxDiagonalEdgeLength            = 51,
00143     oacMaxRoutingDistance               = 52,
00144     oacKeepAlignedShapeAndBoundary      = 53,
00145     oacPreferredRoutingDirection        = 54,
00146     oacMinEdgeAdjacentLength            = 55,
00147     oacMinRectArea                      = 56,
00148     oacGateOrientation                  = 57,
00149     oacMinOrthogonalViaSpacing          = 58,
00150     oacMinNotchSpacing                  = 59,
00151     oacMinEndOfNotchSpacing             = 60,
00152     oacLayerShapeAngle                  = 61,
00153     oacAllowedSpacingRange              = 62,
00154     oacMinViaSpacing                    = 63,
00155     oacCutClass                         = 64,
00156     oacGateClearance                    = 65,
00157     oacMaxDiffDensity                   = 66,
00158     oacMinAreaEdgeLength                = 67,
00159     oacMinCornerToCornerDistance        = 68,
00160     oacMinCutClassSpacing               = 69,
00161     oacMinEndOfLinePerpSpacing          = 70,
00162     oacMinEndOfLineExtensionSpacing     = 71,
00163     oacMinFillToFillSpacing             = 72,
00164     oacMinNeighborViaSpacing            = 73,
00165     oacMinOppositeSpanSpacing           = 74,
00166     oacMinParallelSpanSpacing           = 75,
00167     oacMinParallelWithinViaSpacing      = 76,
00168     oacMinPerimeter                     = 77,
00169     oacMinSameMetalSharedEdgeViaSpacing = 78,
00170     oacAllowedWidthRange                = 79,
00171     oacMinBoundaryExteriorHalo          = 80,
00172     oacMinVoltageSpacing                = 81,
00173     oacMinProtrusionSpacing             = 82
00174 };
00175 
00176 
00177 
00178 // *****************************************************************************
00179 // oaLayerPairConstraintTypeEnum
00180 // *****************************************************************************
00181 #define oavNumLayerPairConstraintTypes  23
00182 
00183 enum oaLayerPairConstraintTypeEnum {
00184     oacMinClearance                 = 0,
00185     oacMaxClearance                 = 1,
00186     oacMinSameNetClearance          = 2,
00187     oacMinExtension                 = 3,
00188     oacMaxExtension                 = 4,
00189     oacMinDualExtension             = 5,
00190     oacMinOverlap                   = 6,
00191     oacViaStackingAllowed           = 7,
00192     oacMinRedundantViaSetback       = 8,
00193     oacMinConcaveCornerOverlap      = 9,
00194     oacMinConcaveCornerExtension    = 10,
00195     oacKeepAlignedShapes            = 11,
00196     oacMinEndOfLineExtension        = 12,
00197     oacAllowedClearanceRange        = 13,
00198     oacMinViaClearance              = 14,
00199     oacIllegalHGatePattern          = 15,
00200     oacMaxTouchingDirectionLength   = 16,
00201     oacMinCutClassClearance         = 17,
00202     oacMinExtensionEdge             = 18,
00203     oacMinGateExtension             = 19,
00204     oacMinOuterVertexSpacing        = 20,
00205     oacMinViaExtension              = 21,
00206     oacMinVoltageClearance          = 22
00207 
00208 };
00209 
00210 
00211 
00212 // *****************************************************************************
00213 // oaLayerArrayConstraintTypeEnum
00214 // *****************************************************************************
00215 #define oavNumLayerArrayConstraintTypes     8
00216 #define oavNumDM4LayerArrayConstraintTypes  1
00217 
00218 enum oaLayerArrayConstraintTypeEnum {
00219     oacMinTouchingDirectionExtension    = 0,
00220     oacMinTouchingDirectionClearance    = 1,
00221     oacMinClearanceOverLayer            = 2,
00222     oacMinParallelViaClearance          = 3,
00223     oacDummyPolyExtension               = 4,
00224     oacMaxPolyLength                    = 5,
00225     oacMinInnerVertexSpacing            = 6,
00226     oacValidRoutingLPPs                 = 7
00227 };
00228 
00229 
00230 
00231 // *****************************************************************************
00232 // oaSimpleConstraintType
00233 // *****************************************************************************
00234 class OA_BASE_DLL_API oaSimpleConstraintType {
00235 public:
00236                                 oaSimpleConstraintType(oaSimpleConstraintTypeEnum typeIn);
00237                                 oaSimpleConstraintType(const oaString &name);
00238                                 ~oaSimpleConstraintType();
00239 
00240     const oaString              &getName() const;
00241                                 operator                    oaSimpleConstraintTypeEnum() const;
00242     static void                 validate(oaSimpleConstraintTypeEnum typeIn);
00243 
00244 private:
00245     static const oaString       *initNames();
00246 
00247     oaSimpleConstraintTypeEnum  type;
00248 
00249     static const oaString       names[];
00250 };
00251 
00252 
00253 
00254 // *****************************************************************************
00255 // oaLayerConstraintType
00256 // *****************************************************************************
00257 class OA_BASE_DLL_API oaLayerConstraintType {
00258 public:
00259                                 oaLayerConstraintType(oaLayerConstraintTypeEnum typeIn);
00260                                 oaLayerConstraintType(const oaString &name);
00261                                 ~oaLayerConstraintType();
00262 
00263     const oaString              &getName() const;
00264                                 operator                    oaLayerConstraintTypeEnum() const;
00265     static void                 validate(oaLayerConstraintTypeEnum typeIn);
00266 
00267 private:
00268     static const oaString       *initNames();
00269 
00270     oaLayerConstraintTypeEnum   type;
00271 
00272     static const oaString       names[];
00273 };
00274 
00275 
00276 
00277 // *****************************************************************************
00278 // oaLayerPairConstraintType
00279 // *****************************************************************************
00280 class OA_BASE_DLL_API oaLayerPairConstraintType {
00281 public:
00282                                     oaLayerPairConstraintType(oaLayerPairConstraintTypeEnum typeIn);
00283                                     oaLayerPairConstraintType(const oaString &name);
00284                                     ~oaLayerPairConstraintType();
00285 
00286     const oaString                  &getName() const;
00287                                     operator                oaLayerPairConstraintTypeEnum() const;
00288     static void                     validate(oaLayerPairConstraintTypeEnum typeIn);
00289 
00290 private:
00291     static const oaString           *initNames();
00292 
00293     oaLayerPairConstraintTypeEnum   type;
00294 
00295     static const oaString           names[];
00296 };
00297 
00298 
00299 
00300 // *****************************************************************************
00301 // oaLayerArrayConstraintType
00302 // *****************************************************************************
00303 class OA_BASE_DLL_API oaLayerArrayConstraintType {
00304 public:
00305                                     oaLayerArrayConstraintType(oaLayerArrayConstraintTypeEnum typeIn);
00306                                     oaLayerArrayConstraintType(const oaString &name);
00307                                     ~oaLayerArrayConstraintType();
00308 
00309     const oaString                  &getName() const;
00310                                     operator                oaLayerArrayConstraintTypeEnum() const;
00311     static void                     validate(oaLayerArrayConstraintTypeEnum typeIn);
00312 
00313 private:
00314     static const oaString           *initNames();
00315 
00316     oaLayerArrayConstraintTypeEnum  type;
00317 
00318     static const oaString           *names;
00319 };
00320 
00321 
00322 
00323 // *****************************************************************************
00324 // oaConstraintDef
00325 // *****************************************************************************
00326 class OA_BASE_DLL_API oaConstraintDef : public oaSessionObject {
00327 public:
00328     static oaConstraintDef  *find(const oaString &name);
00329 
00330     void                    getName(oaString &name) const;
00331     void                    getValueTypes(oaSubset<oaType> &allowedValues) const;
00332     void                    getObjectTypes(oaSubset<oaType> &allowedObjects) const;
00333     void                    getDatabaseTypes(oaSubset<oaDBType> &allowedDbs) const;
00334     oaBoolean               isBuiltIn() const;
00335 
00336     void                    destroy();
00337     void                    remove(oaObject *database);
00338 
00339     enum {dtIndex = oacBaseConstraintDefDataType};
00340 };
00341 
00342 
00343 
00344 // *****************************************************************************
00345 // oaSimpleConstraintDef
00346 // *****************************************************************************
00347 class OA_BASE_DLL_API oaSimpleConstraintDef : public oaConstraintDef {
00348 public:
00349     static oaSimpleConstraintDef    *create(const oaString              &name,
00350                                             const oaSubset<oaType>      &allowedValues,
00351                                             const oaSubset<oaType>      &allowedObjects,
00352                                             const oaSubset<oaDBType>    &allowedDB);
00353 
00354     static oaSimpleConstraintDef    *get(oaSimpleConstraintType type);
00355 };
00356 
00357 
00358 
00359 // *****************************************************************************
00360 // oaLayerConstraintDef
00361 // *****************************************************************************
00362 class OA_BASE_DLL_API oaLayerConstraintDef : public oaConstraintDef {
00363 public:
00364     static oaLayerConstraintDef *create(const oaString              &name,
00365                                         const oaSubset<oaType>      &allowedValues,
00366                                         const oaSubset<oaType>      &allowedObjects,
00367                                         const oaSubset<oaDBType>    &allowedDB);
00368 
00369     static oaLayerConstraintDef *get(oaLayerConstraintType type);
00370 };
00371 
00372 
00373 
00374 // *****************************************************************************
00375 // oaLayerPairConstraintDef
00376 // *****************************************************************************
00377 class OA_BASE_DLL_API oaLayerPairConstraintDef : public oaConstraintDef {
00378 public:
00379     static oaLayerPairConstraintDef *create(const oaString              &name,
00380                                             const oaSubset<oaType>      &allowedValues,
00381                                             const oaSubset<oaType>      &allowedObjects,
00382                                             const oaSubset<oaDBType>    &allowedDB,
00383                                             oaBoolean                   symmetric = false);
00384 
00385     static oaLayerPairConstraintDef *get(oaLayerPairConstraintType type);
00386 
00387     oaBoolean                       isSymmetric() const;
00388 };
00389 
00390 
00391 
00392 // *****************************************************************************
00393 // oaLayerArrayConstraintDef
00394 // *****************************************************************************
00395 class OA_BASE_DLL_API oaLayerArrayConstraintDef : public oaConstraintDef {
00396 public:
00397     static oaLayerArrayConstraintDef    *create(const oaString              &name,
00398                                                 const oaSubset<oaType>      &allowedValues,
00399                                                 const oaSubset<oaType>      &allowedObjects,
00400                                                 const oaSubset<oaDBType>    &allowedDB,
00401                                                 oaUInt4                     numLayers);
00402 
00403     static oaLayerArrayConstraintDef    *get(oaLayerArrayConstraintType type);
00404 
00405     oaUInt4                             getNumLayers() const;
00406 };
00407 
00408 
00409 
00410 // *****************************************************************************
00411 // Traits
00412 // *****************************************************************************
00413 template<>
00414 class oaTraits<oaConstraintDef> {
00415 public:
00416     typedef oaSessionObject             parentType;
00417     typedef oaConstraintDefModTypeEnum  modTypeType;
00418     enum {domain = oacNoDomain};
00419     enum {isMultiDomain = false};
00420     enum {isConcrete = false};
00421     enum {dbType = oacBaseDBType};
00422     enum {abstractTypeEnumVal = oacConstraintDefType};
00423 };
00424 
00425 template<>
00426 class oaTraits<oaSimpleConstraintDef> {
00427 public:
00428     typedef oaConstraintDef parentType;
00429     enum {domain = oacNoDomain};
00430     enum {isMultiDomain = false};
00431     enum {dbType = oacBaseDBType};
00432     enum {isConcrete = true};
00433     enum {objectTypeEnumVal = oacSimpleConstraintDefType};
00434     enum {dataTypeEnumVal = oacBaseConstraintDefDataType};
00435 };
00436 
00437 template<>
00438 class oaTraits<oaLayerConstraintDef> {
00439 public:
00440     typedef oaConstraintDef parentType;
00441     enum {domain = oacNoDomain};
00442     enum {isMultiDomain = false};
00443     enum {dbType = oacBaseDBType};
00444     enum {isConcrete = true};
00445     enum {objectTypeEnumVal = oacLayerConstraintDefType};
00446     enum {dataTypeEnumVal = oacBaseConstraintDefDataType};
00447 };
00448 
00449 template<>
00450 class oaTraits<oaLayerPairConstraintDef> {
00451 public:
00452     typedef oaConstraintDef parentType;
00453     enum {domain = oacNoDomain};
00454     enum {isMultiDomain = false};
00455     enum {dbType = oacBaseDBType};
00456     enum {isConcrete = true};
00457     enum {objectTypeEnumVal = oacLayerPairConstraintDefType};
00458     enum {dataTypeEnumVal = oacBaseConstraintDefDataType};
00459 };
00460 
00461 template<>
00462 class oaTraits<oaLayerArrayConstraintDef> {
00463 public:
00464     typedef oaConstraintDef parentType;
00465     enum {domain = oacNoDomain};
00466     enum {isMultiDomain = false};
00467     enum {dbType = oacBaseDBType};
00468     enum {isConcrete = true};
00469     enum {objectTypeEnumVal = oacLayerArrayConstraintDefType};
00470     enum {dataTypeEnumVal = oacBaseConstraintDefDataType};
00471 };
00472 
00473 
00474 
00475 END_OA_NAMESPACE
00476 
00477 #endif

Return to top of page