oaVerilogNS.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // oaVerilogNS.h
00003 //
00004 // This file contains the definition for the oaVerilogNS class. This class
00005 // implements the Verilog NameSpace used in name mapping.  In conjunction with
00006 // the oaName object, the oaVerilogNS class facilitates mapping names to and
00007 // from Verilog.
00008 //
00009 // Note: At this time the Verilog NameSpace does not support stepped or
00010 // bundled names.  Verilog is case sensitive.
00011 //
00012 // *****************************************************************************
00013 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00014 // Integration Initiative, this material may not be copied, modified,
00015 // re-published, uploaded, executed, or distributed in any way, in any medium,
00016 // in whole or in part, without prior written permission from Cadence.
00017 //
00018 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00019 //                           All Rights Reserved.
00020 //
00021 //  $Author: icftcm $
00022 //  $Revision: #1 $
00023 //  $Date: 2010/08/09 $
00024 //  $State: Exp $
00025 // *****************************************************************************
00026 // *****************************************************************************
00027 
00028 
00029 
00030 #if !defined(oaVerilogNS_P)
00031 #define oaVerilogNS_P
00032 
00033 
00034 
00035 // *****************************************************************************
00036 // Nested includes
00037 // *****************************************************************************
00038 #include "oaName.h"
00039 
00040 
00041 
00042 // *****************************************************************************
00043 // Declare and define types in the OpenAccess namespace.
00044 // *****************************************************************************
00045 BEGIN_OA_NAMESPACE
00046 
00047 
00048 
00049 // *****************************************************************************
00050 // Forward Class Declarations
00051 // *****************************************************************************
00052 class oaKeywordTbl;
00053 class oaStringTbl;
00054 
00055 
00056 
00057 // *****************************************************************************
00058 // oaVerilogNS
00059 // *****************************************************************************
00060 class OA_BASE_DLL_API oaVerilogNS : public oaNameSpace {
00061 public:
00062                             oaVerilogNS();
00063                             oaVerilogNS(const oaVerilogNS &ns);
00064                             ~oaVerilogNS();
00065 
00066     oaVerilogNS             &operator=(const oaVerilogNS &ns);
00067 
00068     virtual oaBoolean       isEqual(const oaScalarName  &n1,
00069                                     const oaScalarName  &n2) const;
00070     virtual oaBoolean       isEqual(const oaVectorName  &n1,
00071                                     const oaVectorName  &n2) const;
00072     virtual oaBoolean       isEqual(const oaVectorBitName   &n1,
00073                                     const oaVectorBitName   &n2) const;
00074     virtual oaBoolean       isEqual(const oaBundleName  &n1,
00075                                     const oaBundleName  &n2) const;
00076     virtual oaBoolean       isEqual(const oaSimpleName  &n1,
00077                                     const oaSimpleName  &n2) const;
00078     virtual oaBoolean       isEqual(const oaName    &n1,
00079                                     const oaName    &n2) const;
00080 
00081     virtual oaNameType      getType(const oaChar *in) const;
00082 
00083 private:
00084     virtual oaBoolean       isEqual(const oaNameMem &n1,
00085                                     const oaNameMem &n2) const;
00086     virtual oaBoolean       isEqual(const oaVectorName      &n1,
00087                                     const oaVectorBitName   &n2) const;
00088 
00089     virtual void            getInternalMember(const oaChar  *in,
00090                                               oaString      &out,
00091                                               oaBoolean     &caseSensitive,
00092                                               oaUInt4       len,
00093                                               oaUInt4       flags = 0) const;
00094     virtual void            getInternalScalar(const oaChar  *in,
00095                                               oaScalarName  &out) const;
00096     virtual void            getInternalVBit(const oaChar    *in,
00097                                             oaVectorBitName &out,
00098                                             oaBoolean       baseOnly = false)
00099         const;
00100     virtual void            getInternalVector(const oaChar  *in,
00101                                               oaVectorName  &out,
00102                                               oaBoolean     baseOnly = false)
00103         const;
00104 
00105     virtual void            getMember(const oaChar  *in,
00106                                       oaBoolean     caseSensitive,
00107                                       oaString      &out,
00108                                       oaUInt4       &loc,
00109                                       oaUInt4       flags = 0) const;
00110     virtual void            getMemberArray(const oaNameMem  *in,
00111                                            oaUInt4          numMembers,
00112                                            oaString         &out,
00113                                            oaUInt4          &loc) const;
00114     virtual void            getVectorMember(const oaNameMem &in,
00115                                             oaUInt4         start,
00116                                             oaUInt4         stop,
00117                                             oaUInt4         step,
00118                                             oaString        &out,
00119                                             oaUInt4         &loc) const;
00120     virtual void            getScalarName(const oaScalarName    &in,
00121                                           oaString              &out,
00122                                           oaUInt4               &loc) const;
00123     virtual void            getVectorName(const oaVectorName    &in,
00124                                           oaString              &out,
00125                                           oaUInt4               &loc) const;
00126     virtual void            getVectorBitName(const oaVectorBitName  &in,
00127                                              oaString               &out,
00128                                              oaUInt4                &loc) const;
00129     virtual void            getVectorBitName(const oaNameMem    *in,
00130                                              oaUInt4            numMembers,
00131                                              oaUInt4            start,
00132                                              oaString           &out,
00133                                              oaUInt4            &loc) const;
00134 
00135     virtual void            get(const oaByte    *data,
00136                                 oaString        &out,
00137                                 oaUInt4         &loc) const;
00138 
00139     oaBoolean               isNormalChar(oaChar c) const;
00140     oaBoolean               isBusChar(oaChar c) const;
00141     oaBoolean               isHexDelimiter(oaChar c) const;
00142     oaBoolean               isEscChar(oaChar c) const;
00143     oaBoolean               isEscapableChar(oaChar c) const;
00144 
00145     void                    escapeStr(oaString  &str,
00146                                       oaUInt4   bgn,
00147                                       oaUInt4   &end) const;
00148 
00149     static oaKeywordTbl     *getKeywordTbl();
00150     static void             setKeywordTbl(oaKeywordTbl *keywordTblIn);
00151 
00152     oaChar                  hierDelimiter;
00153     oaChar                  hexDelimiter;
00154     oaChar                  openBus;
00155     oaChar                  closeBus;
00156     oaChar                  bitDelimiter;
00157     oaChar                  escDelimiter;
00158 
00159     static const oaString   _keywords[];
00160 
00161     static oaStringTbl      *keywordTbl;
00162 
00163     static oaUInt4          _keywordTblRef;
00164 
00165 
00166 
00167 };
00168 
00169 
00170 
00171 END_OA_NAMESPACE
00172 
00173 #endif

Return to top of page