oaModAssignment.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaModAssignment.h
00004 //
00005 // The oaModAssignment class is the base class for all types of logical
00006 // assignments. The oaModAssignment object specifies the value to be
00007 // interpreted as the replacement (or "assignment") of the data specified in
00008 // an oaModNetConnectDef or oaModTermConnectDef object that may exist in a
00009 // logical design hierarchy.
00010 //
00011 // The derived classes include:
00012 //
00013 //  oaModAssignValue
00014 //      This class implements an assignment that specifies the name of a
00015 //      single-bit, explicit net to use as logical replacements for the nets
00016 //      associated with corresponding oaNetConnectDefs or oaTermConnectDefs
00017 //      found in the logical design hierarchy.
00018 //
00019 //  oaModAssignAssignment
00020 //      This class implements an assignment that has an assignmentDef as
00021 //      its value. 
00022 //
00023 // Applications knowing how to traverse the logical hierarchy can search for an
00024 // oaModAssignment on an instance and use the defined value. If no assignment
00025 // is found, the default name specified on the assignmentDef on the
00026 // corresponding oaConnectDef object is to be used. If an oaModAssignValue is
00027 // found, it specifies the name of the net to use with the oaConnectDef. If
00028 // an oaModAssignAssignment is found, the traversal is to continue looking up
00029 // the logical hierarchy using the assignmentDef of the oaAssignAssignment.
00030 //
00031 // *****************************************************************************
00032 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00033 // Integration Initiative, this material may not be copied, modified,
00034 // re-published, uploaded, executed, or distributed in any way, in any medium,
00035 // in whole or in part, without prior written permission from Cadence.
00036 //
00037 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00038 //                           All Rights Reserved.
00039 //
00040 //  $Author: icftcm $
00041 //  $Revision: #1 $
00042 //  $Date: 2010/08/09 $
00043 //  $State: Exp $
00044 // *****************************************************************************
00045 // *****************************************************************************
00046 
00047 
00048 
00049 #if !defined(oaModAssignment_P)
00050 #define oaModAssignment_P
00051 
00052 
00053 
00054 // *****************************************************************************
00055 // Nested includes
00056 // *****************************************************************************
00057 #include "oaAssignmentDef.h"
00058 #include "oaModInst.h"
00059 
00060 
00061 
00062 // *****************************************************************************
00063 // Declare and define types in the OpenAccess namespace.
00064 // *****************************************************************************
00065 BEGIN_OA_NAMESPACE
00066 
00067 
00068 
00069 // *****************************************************************************
00070 // oaModAssignment
00071 // *****************************************************************************
00072 class OA_DESIGN_DLL_API oaModAssignment : public oaModObject {
00073 public:
00074     void                    destroy();
00075 
00076     static oaModAssignment  *find(const oaModInst   *inst,
00077                                   const oaString    &name);
00078 
00079     void                    getName(oaString &name) const;
00080     oaModInst               *getInst() const;
00081 
00082     void                    setName(const oaString &name);
00083     void                    setInst(oaModInst *inst);
00084 
00085     enum {dtIndex = oacAssignmentDataType};
00086 };
00087 
00088 
00089 
00090 // *****************************************************************************
00091 // oaModAssignValue
00092 // *****************************************************************************
00093 class OA_DESIGN_DLL_API oaModAssignValue : public oaModAssignment {
00094 public:
00095     static oaModAssignValue *create(const oaModInst     *inst,
00096                                     const oaString      &name,
00097                                     const oaScalarName  &netName);
00098     static oaModAssignValue *create(const oaModInst         *inst,
00099                                     const oaString          &name,
00100                                     const oaVectorBitName   &netName);
00101 
00102     void                    getValue(oaSimpleName &netName) const;
00103 
00104     void                    setValue(const oaScalarName &netName);
00105     void                    setValue(const oaVectorBitName &netName);
00106 };
00107 
00108 
00109 
00110 // *****************************************************************************
00111 // oaModAssignAssignment
00112 // *****************************************************************************
00113 class OA_DESIGN_DLL_API oaModAssignAssignment : public oaModAssignment {
00114 public:
00115     static oaModAssignAssignment    *create(const oaModInst         *inst,
00116                                             const oaString          &name,
00117                                             const oaAssignmentDef   &aDef);
00118 
00119     void                            getAssignmentDef(oaAssignmentDef &aDef) const;
00120 
00121     void                            setAssignmentDef(const oaAssignmentDef &aDef);
00122 };
00123 
00124 
00125 
00126 // *****************************************************************************
00127 // Design Traits.
00128 // *****************************************************************************
00129 template<>
00130 class oaTraits<oaModAssignment> {
00131 public:
00132     typedef oaModObject             parentType;
00133     typedef oaAssignmentModTypeEnum modTypeType;
00134     enum {domain = oacModDomain};
00135     enum {isMultiDomain = true};
00136     enum {dbType = oacDesignDBType};
00137     enum {isConcrete = false};
00138     enum {dtIndex = oacAssignmentDataType};
00139     enum {dataTypeEnumVal = oacAssignmentDataType};
00140     enum {abstractTypeEnumVal = oacModAssignmentType};
00141 };
00142 
00143 template<>
00144 class oaTraits<oaModAssignValue> {
00145 public:
00146     typedef oaAssignmentModTypeEnum modTypeType;
00147     typedef oaModAssignment         parentType;
00148     enum {dtIndex = oacAssignmentDataType};
00149     enum {dataTypeEnumVal = oacAssignmentDataType};
00150     enum {domain = oacModDomain};
00151     enum {isMultiDomain = true};
00152     enum {dbType = oacDesignDBType};
00153     enum {isConcrete = true};
00154     enum {objectTypeEnumVal = oacModAssignValueType};
00155 };
00156 
00157 template<>
00158 class oaTraits<oaModAssignAssignment> {
00159 public:
00160     typedef oaAssignmentModTypeEnum modTypeType;
00161     typedef oaModAssignment         parentType;
00162     enum {dtIndex = oacAssignmentDataType};
00163     enum {dataTypeEnumVal = oacAssignmentDataType};
00164     enum {domain = oacModDomain};
00165     enum {isMultiDomain = true};
00166     enum {dbType = oacDesignDBType};
00167     enum {isConcrete = true};
00168     enum {objectTypeEnumVal = oacModAssignAssignmentType};
00169 };
00170 
00171 
00172 
00173 END_OA_NAMESPACE
00174 
00175 #endif

Return to top of page