|
CIRCT 24.0.0git
|
#include <ExportVerilogInternals.h>

Public Member Functions | |
| FieldNameResolver (const GlobalNameTable &globalNames, const LoweringOptions &options) | |
| StringAttr | getRenamedFieldName (StringAttr fieldName) |
| std::string | getEnumFieldName (hw::EnumFieldAttr attr, Operation *currentPackage=nullptr) |
| Returns the field name for an enum field of a given enum field attr. | |
Private Member Functions | |
| void | setRenamedFieldName (StringAttr fieldName, StringAttr newFieldName) |
Private Attributes | |
| DenseMap< StringAttr, StringAttr > | renamedFieldNames |
| Those contain entries for field names and types respectively. | |
| llvm::StringMap< size_t > | nextGeneratedNameIDs |
| A map from used names to numeric suffix used as uniquification agent when resolving conflicts. | |
| const GlobalNameTable & | globalNames |
| const LoweringOptions & | options |
Definition at line 131 of file ExportVerilogInternals.h.
|
inline |
Definition at line 132 of file ExportVerilogInternals.h.
| std::string FieldNameResolver::getEnumFieldName | ( | hw::EnumFieldAttr | attr, |
| Operation * | currentPackage = nullptr |
||
| ) |
Returns the field name for an enum field of a given enum field attr.
In case a prefix can be inferred for the provided enum type (the enum type is a type alias), the prefix will be applied. If not, the raw field name is returned.
Definition at line 94 of file LegalizeNames.cpp.
References circt::ExportVerilog::GlobalNameTable::getEnumPrefix(), circt::ExportVerilog::GlobalNameTable::getPackageEnumField(), circt::ExportVerilog::getSymOpName(), and globalNames.
| StringAttr FieldNameResolver::getRenamedFieldName | ( | StringAttr | fieldName | ) |
Definition at line 69 of file LegalizeNames.cpp.
References circt::LoweringOptions::caseInsensitiveKeywords, circt::sv::isNameValid(), circt::sv::legalizeName(), nextGeneratedNameIDs, options, renamedFieldNames, and setRenamedFieldName().
|
private |
Definition at line 63 of file LegalizeNames.cpp.
References nextGeneratedNameIDs, and renamedFieldNames.
Referenced by getRenamedFieldName().
|
private |
Definition at line 158 of file ExportVerilogInternals.h.
Referenced by getEnumFieldName().
|
private |
A map from used names to numeric suffix used as uniquification agent when resolving conflicts.
Definition at line 155 of file ExportVerilogInternals.h.
Referenced by getRenamedFieldName(), and setRenamedFieldName().
|
private |
Definition at line 161 of file ExportVerilogInternals.h.
Referenced by getRenamedFieldName().
|
private |
Those contain entries for field names and types respectively.
Struct types have names as field names, which must be renamed if they conflict with verilog keywords.
Definition at line 151 of file ExportVerilogInternals.h.
Referenced by getRenamedFieldName(), and setRenamedFieldName().