oaModNet.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaModNet.h
00004 //
00005 // This file contains the definition for the oaModNet and oaModBitNet classes
00006 // and their public supporting classes. The oaModNet class is an abstract base
00007 // for all types of logical nets. The oaModBitNet class is the base class for
00008 // all single-bit nets.
00009 //
00010 // *****************************************************************************
00011 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00012 // Integration Initiative, this material may not be copied, modified,
00013 // re-published, uploaded, executed, or distributed in any way, in any medium,
00014 // in whole or in part, without prior written permission from Cadence.
00015 //
00016 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00017 //                           All Rights Reserved.
00018 //
00019 //  $Author: icftcm $
00020 //  $Revision: #1 $
00021 //  $Date: 2010/08/09 $
00022 //  $State: Exp $
00023 // *****************************************************************************
00024 // *****************************************************************************
00025 
00026 
00027 
00028 #if !defined(oaModNet_P)
00029 #define oaModNet_P
00030 
00031 
00032 
00033 // *****************************************************************************
00034 // Nested includes
00035 // *****************************************************************************
00036 #include "oaModule.h"
00037 
00038 
00039 
00040 // *****************************************************************************
00041 // Declare and define types in the OpenAccess namespace.
00042 // *****************************************************************************
00043 BEGIN_OA_NAMESPACE
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // oaModNet
00049 // *****************************************************************************
00050 class OA_DESIGN_DLL_API oaModNet : public oaModObject {
00051 public:
00052     static oaModNet                         *create(oaModule        *module,
00053                                                     const oaName    &name,
00054                                                     oaSigType       type = oacSignalSigType,
00055                                                     oaBoolean       isGlobal = false);
00056 
00057     static oaModNet                         *find(const oaModule    *module,
00058                                                   const oaName      &name);
00059 
00060     static oaBoolean                        isValidName(const oaModule  *module,
00061                                                         const oaName    &name);
00062 
00063     void                                    destroy();
00064 
00065     oaBoolean                               isEmpty() const;
00066     oaBoolean                               isImplicit() const;
00067     oaBoolean                               isGlobal() const;
00068 
00069     oaSigType                               getSigType() const;
00070     oaUInt4                                 getNumBits() const;
00071     void                                    getName(oaName &name) const;
00072     void                                    getName(const oaNameSpace   &ns,
00073                                                     oaString            &name) const;
00074     oaModBitNet                             *getBit(oaUInt4 bitIndex) const;
00075 
00076     void                                    setGlobal(oaBoolean isGlobal);
00077     void                                    setSigType(oaSigType sigType);
00078 
00079     void                                    scalarize();
00080 
00081     oaCollection<oaModInstTerm, oaModNet>   getInstTerms(oaUInt4 filterFlags = oacInstTermIterNotImplicit) const;
00082     oaModMemNetCollection                   getMemberNets(oaBoolean unique = true) const;
00083     oaCollection<oaOccNet, oaModNet>        getOccNets(const oaOccurrence *occ) const;
00084     oaCollection<oaModBitNet, oaModNet>     getSingleBitMembers() const;
00085     oaCollection<oaModTerm, oaModNet>       getTerms(oaUInt4 filterFlags = oacTermIterNotImplicit) const;
00086 
00087     enum {dtIndex = oacNetDataType};
00088 };
00089 
00090 
00091 
00092 // *****************************************************************************
00093 // oaModBitNet
00094 // *****************************************************************************
00095 class OA_DESIGN_DLL_API oaModBitNet : public oaModNet {
00096 public:
00097     oaBoolean                               isPreferredEquivalent() const;
00098 
00099     oaModNetConnectDef                      *getConnectDef() const;
00100     oaModBitNet                             *getPreferredEquivalent() const;
00101 
00102     void                                    setPreferredEquivalent();
00103 
00104     void                                    makeEquivalent(oaModBitNet *equivNet);
00105     void                                    breakEquivalence();
00106     oaBoolean                               hasImplicitEquivalence() const;
00107 
00108     oaCollection<oaModBitNet, oaModBitNet>  getEquivalentNets() const;
00109     oaCollection<oaModBitNet, oaModBitNet>  getEquivalentNets(oaUInt4 filterFlags) const;
00110 };
00111 
00112 
00113 
00114 // *****************************************************************************
00115 // Design Traits.
00116 // *****************************************************************************
00117 template<>
00118 class oaTraits<oaModNet> {
00119 public:
00120     typedef oaModObject         parentType;
00121     typedef oaNetModTypeEnum    modTypeType;
00122     enum {domain = oacModDomain};
00123     enum {isMultiDomain = true};
00124     enum {dbType = oacDesignDBType};
00125     enum {isConcrete = false};
00126     enum {dtIndex = oacNetDataType};
00127     enum {dataTypeEnumVal = oacNetDataType};
00128     enum {abstractTypeEnumVal = oacModNetType};
00129 };
00130 
00131 template<>
00132 class oaTraits<oaModBitNet> {
00133 public:
00134     typedef oaNetModTypeEnum    modTypeType;
00135     typedef oaModNet            parentType;
00136     enum {dtIndex = oacNetDataType};
00137     enum {dataTypeEnumVal = oacNetDataType};
00138     enum {domain = oacModDomain};
00139     enum {isMultiDomain = true};
00140     enum {dbType = oacDesignDBType};
00141     enum {isConcrete = false};
00142     enum {abstractTypeEnumVal = oacModBitNetType};
00143 };
00144 
00145 
00146 
00147 END_OA_NAMESPACE
00148 
00149 #endif
00150 

Return to top of page