CIRCT  19.0.0git
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
circt::ExportVerilog::GlobalNameTable Struct Reference

This class keeps track of global names at the module/interface level. More...

#include <ExportVerilogInternals.h>

Collaboration diagram for circt::ExportVerilog::GlobalNameTable:
Collaboration graph
[legend]

Public Member Functions

 GlobalNameTable (GlobalNameTable &&)=default
 
StringRef getParameterVerilogName (Operation *module, StringAttr paramName) const
 Return the string to use for the specified parameter name in the specified module. More...
 
StringAttr getEnumPrefix (Type type) const
 

Private Member Functions

 GlobalNameTable ()
 
 GlobalNameTable (const GlobalNameTable &)=delete
 
void operator= (const GlobalNameTable &)=delete
 
void addRenamedParam (Operation *module, StringAttr oldName, StringRef newName)
 

Private Attributes

DenseMap< std::pair< Operation *, Attribute >, StringAttr > renamedParams
 This contains entries for any parameters that got renamed. More...
 
DenseMap< Type, StringAttr > enumPrefixes
 

Friends

class GlobalNameResolver
 

Detailed Description

This class keeps track of global names at the module/interface level.

It is built in a global pass over the entire design and then frozen to allow concurrent accesses.

Definition at line 42 of file ExportVerilogInternals.h.

Constructor & Destructor Documentation

◆ GlobalNameTable() [1/3]

circt::ExportVerilog::GlobalNameTable::GlobalNameTable ( GlobalNameTable &&  )
default

◆ GlobalNameTable() [2/3]

circt::ExportVerilog::GlobalNameTable::GlobalNameTable ( )
inlineprivate

Definition at line 62 of file ExportVerilogInternals.h.

◆ GlobalNameTable() [3/3]

circt::ExportVerilog::GlobalNameTable::GlobalNameTable ( const GlobalNameTable )
privatedelete

Member Function Documentation

◆ addRenamedParam()

void circt::ExportVerilog::GlobalNameTable::addRenamedParam ( Operation *  module,
StringAttr  oldName,
StringRef  newName 
)
inlineprivate

◆ getEnumPrefix()

StringAttr circt::ExportVerilog::GlobalNameTable::getEnumPrefix ( Type  type) const
inline

Definition at line 55 of file ExportVerilogInternals.h.

References enumPrefixes.

◆ getParameterVerilogName()

StringRef circt::ExportVerilog::GlobalNameTable::getParameterVerilogName ( Operation *  module,
StringAttr  paramName 
) const
inline

Return the string to use for the specified parameter name in the specified module.

Parameters may be renamed for a variety of reasons (e.g. conflicting with ports or Verilog keywords), and this returns the legalized name to use.

Definition at line 49 of file ExportVerilogInternals.h.

References renamedParams.

Referenced by legalizeModuleLocalNames().

◆ operator=()

void circt::ExportVerilog::GlobalNameTable::operator= ( const GlobalNameTable )
privatedelete

Friends And Related Function Documentation

◆ GlobalNameResolver

friend class GlobalNameResolver
friend

Definition at line 61 of file ExportVerilogInternals.h.

Member Data Documentation

◆ enumPrefixes

DenseMap<Type, StringAttr> circt::ExportVerilog::GlobalNameTable::enumPrefixes
private

◆ renamedParams

DenseMap<std::pair<Operation *, Attribute>, StringAttr> circt::ExportVerilog::GlobalNameTable::renamedParams
private

This contains entries for any parameters that got renamed.

The key is a moduleop/paramName tuple, the value is the name to use.

Definition at line 74 of file ExportVerilogInternals.h.

Referenced by addRenamedParam(), and getParameterVerilogName().


The documentation for this struct was generated from the following file: