Skip to content

Commit

Permalink
[FIRRTL][NFC] Add clockgate instName to FirtoolOptions setters. (#6460)
Browse files Browse the repository at this point in the history
Add clockgate instName field and a convenient setter.
  • Loading branch information
prithayan authored Dec 1, 2023
1 parent 15b296c commit faf4dba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion include/circt/Firtool/Firtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,17 @@ class FirtoolOptions {

seq::ExternalizeClockGateOptions getClockGateOptions() const {
return {ckgModuleName, ckgInputName, ckgOutputName,
ckgEnableName, ckgTestEnableName, "ckg"};
ckgEnableName, ckgTestEnableName, ckgInstName};
}

FirtoolOptions &setClockGateOptions(seq::ExternalizeClockGateOptions &opts) {
ckgModuleName = opts.moduleName;
ckgInputName = opts.inputName;
ckgOutputName = opts.outputName;
ckgEnableName = opts.enableName;
ckgTestEnableName = opts.testEnableName;
ckgInstName = opts.instName;
return *this;
}

bool isDefaultOutputFilename() const { return outputFilename == "-"; }
Expand Down Expand Up @@ -373,6 +383,7 @@ class FirtoolOptions {
std::string ckgOutputName;
std::string ckgEnableName;
std::string ckgTestEnableName;
std::string ckgInstName;
bool exportModuleHierarchy;
bool stripFirDebugInfo;
bool stripDebugInfo;
Expand Down
2 changes: 1 addition & 1 deletion lib/Firtool/Firtool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ circt::firtool::FirtoolOptions::FirtoolOptions()
etcDisableModuleInlining(false),
addVivadoRAMAddressConflictSynthesisBugWorkaround(false),
ckgModuleName("EICG_wrapper"), ckgInputName("in"), ckgOutputName("out"),
ckgEnableName("en"), ckgTestEnableName("test_en"),
ckgEnableName("en"), ckgTestEnableName("test_en"), ckgInstName("ckg"),
exportModuleHierarchy(false), stripFirDebugInfo(true),
stripDebugInfo(false) {
if (!clOptions.isConstructed())
Expand Down

0 comments on commit faf4dba

Please sign in to comment.