oaArrayInst.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaArrayInst.h
00004 //
00005 // This file contains the definition for the oaArrayInst class. This class
00006 // implements an object that represents an array of instances of one master
00007 // design. Every cell in the array has the same orientation. The arrayInst is
00008 // primarily used in the physical layout design as it can be used to represent
00009 // an array of memory cells.
00010 //
00011 // The oaArrayInst object should not be used to represent logical connectivity
00012 // as it is considered a single-bit instance.
00013 //
00014 // *****************************************************************************
00015 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00016 // Integration Initiative, this material may not be copied, modified,
00017 // re-published, uploaded, executed, or distributed in any way, in any medium,
00018 // in whole or in part, without prior written permission from Cadence.
00019 //
00020 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00021 //                           All Rights Reserved.
00022 //
00023 //  $Author: icftcm $
00024 //  $Revision: #1 $
00025 //  $Date: 2010/08/09 $
00026 //  $State: Exp $
00027 // *****************************************************************************
00028 // *****************************************************************************
00029 
00030 
00031 
00032 #if !defined(oaArrayInst_P)
00033 #define oaArrayInst_P
00034 
00035 
00036 
00037 // *****************************************************************************
00038 // Nested includes
00039 // *****************************************************************************
00040 #include "oaInst.h"
00041 
00042 
00043 
00044 // *****************************************************************************
00045 // Declare and define types in the OpenAccess namespace.
00046 // *****************************************************************************
00047 BEGIN_OA_NAMESPACE
00048 
00049 
00050 
00051 // *****************************************************************************
00052 // oaArrayInst
00053 // *****************************************************************************
00054 class OA_DESIGN_DLL_API oaArrayInst : public oaBitInst {
00055 public:
00056     static oaArrayInst      *create(oaBlock             *block,
00057                                     oaDesign            *master,
00058                                     const oaScalarName  &name,
00059                                     const oaTransform   &xform,
00060                                     oaOffset            dX,
00061                                     oaOffset            dY,
00062                                     oaUInt4             numRows,
00063                                     oaUInt4             numCols,
00064                                     const oaParamArray  *params = NULL,
00065                                     oaPlacementStatus   status = oacNonePlacementStatus);
00066     static oaArrayInst      *create(oaBlock             *block,
00067                                     oaDesign            *master,
00068                                     const oaTransform   &xform,
00069                                     oaOffset            dX,
00070                                     oaOffset            dY,
00071                                     oaUInt4             numRows,
00072                                     oaUInt4             numCols,
00073                                     const oaParamArray  *params = NULL,
00074                                     oaPlacementStatus   status = oacNonePlacementStatus);
00075     static oaArrayInst      *create(oaBlock             *block,
00076                                     const oaScalarName  &libName,
00077                                     const oaScalarName  &cellName,
00078                                     const oaScalarName  &viewName,
00079                                     const oaScalarName  &name,
00080                                     const oaTransform   &xform,
00081                                     oaOffset            dX,
00082                                     oaOffset            dY,
00083                                     oaUInt4             numRows,
00084                                     oaUInt4             numCols,
00085                                     const oaParamArray  *params = NULL,
00086                                     oaPlacementStatus   status = oacNonePlacementStatus);
00087     static oaArrayInst      *create(oaBlock             *block,
00088                                     const oaScalarName  &libName,
00089                                     const oaScalarName  &cellName,
00090                                     const oaScalarName  &viewName,
00091                                     const oaTransform   &xform,
00092                                     oaOffset            dX,
00093                                     oaOffset            dY,
00094                                     oaUInt4             numRows,
00095                                     oaUInt4             numCols,
00096                                     const oaParamArray  *params = NULL,
00097                                     oaPlacementStatus   status = oacNonePlacementStatus);
00098 
00099     static oaArrayInst      *find(const oaBlock         *block,
00100                                   const oaScalarName    &name);
00101     static oaBoolean        isValidName(oaBlock             *block,
00102                                         const oaScalarName  &name);
00103 
00104     oaOffset                getDX() const;
00105     oaOffset                getDY() const;
00106     oaUInt4                 getNumRows() const;
00107     oaUInt4                 getNumCols() const;
00108     void                    getName(oaScalarName &name) const;
00109     void                    getName(const oaNameSpace   &ns,
00110                                     oaString            &name) const;
00111 
00112     using                   oaBitInst::getBBox;
00113     void                    getBBox(oaUInt4 row,
00114                                     oaUInt4 col,
00115                                     oaBox   &bBox) const;
00116 
00117     void                    getTransform(oaUInt4        row,
00118                                          oaUInt4        col,
00119                                          oaTransform    &xform) const;
00120     void                    getOverlap(const oaBox  &region,
00121                                        oaDist       &xMin,
00122                                        oaDist       &xMax,
00123                                        oaDist       &yMin,
00124                                        oaDist       &yMax) const;
00125 
00126     void                    setDX(oaOffset dX);
00127     void                    setDY(oaOffset dY);
00128     void                    setNumRows(oaUInt4 numRows);
00129     void                    setNumCols(oaUInt4 numCols);
00130     void                    setName(const oaScalarName &name);
00131 
00132     using                   oaInst::copy;
00133     oaArrayInst             *copy(const oaScalarName    &name,
00134                                   const oaTransform     &xform);
00135     oaArrayInst             *copy(const oaScalarName    &name,
00136                                   const oaTransform     &xform,
00137                                   oaBlock               *block);
00138 };
00139 
00140 
00141 
00142 // *****************************************************************************
00143 // Design Traits.
00144 // *****************************************************************************
00145 template<>
00146 class oaTraits<oaArrayInst> {
00147 public:
00148     typedef oaInstModTypeEnum   modTypeType;
00149     typedef oaBitInst           parentType;
00150     enum {isMultiDomain = true};
00151     enum {dtIndex = oacInstDataType};
00152     enum {dataTypeEnumVal = oacInstDataType};
00153     enum {domain = oacBlockDomain};
00154     enum {dbType = oacDesignDBType};
00155     enum {isConcrete = true};
00156     enum {objectTypeEnumVal = oacArrayInstType};
00157 };
00158 
00159 
00160 
00161 END_OA_NAMESPACE
00162 
00163 #endif

Return to top of page