Skip to content

Commit

Permalink
[FIRRTL] Replaced 'replicate' to correctly named 'replace' flags (#7442)
Browse files Browse the repository at this point in the history
Renamed and replaced shouldReplicateSequentialMemories to shouldReplaceSequentialMemories per issue #7384
  • Loading branch information
jpien13 authored Aug 6, 2024
1 parent 1645d71 commit 1a8f82e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/circt/Firtool/Firtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class FirtoolOptions {
return allowAddingPortsOnPublic;
}
bool shouldConvertProbesToSignals() const { return probesToSignals; }
bool shouldReplicateSequentialMemories() const { return replSeqMem; }
bool shouldReplaceSequentialMemories() const { return replSeqMem; }
bool shouldDisableOptimization() const { return disableOptimization; }
bool shouldLowerMemories() const { return lowerMemories; }
bool shouldDedup() const { return !noDedup; }
Expand Down
8 changes: 4 additions & 4 deletions lib/Firtool/Firtool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ LogicalResult firtool::populateCHIRRTLToLowFIRRTL(mlir::PassManager &pm,
pm.nest<firrtl::CircuitOp>().addPass(firrtl::createInferWidthsPass());

pm.nest<firrtl::CircuitOp>().addPass(
firrtl::createMemToRegOfVecPass(opt.shouldReplicateSequentialMemories(),
firrtl::createMemToRegOfVecPass(opt.shouldReplaceSequentialMemories(),
opt.shouldIgnoreReadEnableMemories()));

pm.nest<firrtl::CircuitOp>().addPass(firrtl::createInferResetsPass());
Expand Down Expand Up @@ -161,7 +161,7 @@ LogicalResult firtool::populateCHIRRTLToLowFIRRTL(mlir::PassManager &pm,
pm.nest<firrtl::CircuitOp>().nest<firrtl::FModuleOp>().addPass(
firrtl::createInferReadWritePass());

if (opt.shouldReplicateSequentialMemories())
if (opt.shouldReplaceSequentialMemories())
pm.nest<firrtl::CircuitOp>().addPass(firrtl::createLowerMemoryPass());

pm.nest<firrtl::CircuitOp>().addPass(firrtl::createPrefixModulesPass());
Expand All @@ -176,7 +176,7 @@ LogicalResult firtool::populateCHIRRTLToLowFIRRTL(mlir::PassManager &pm,
pm.addNestedPass<firrtl::CircuitOp>(firrtl::createAddSeqMemPortsPass());

pm.addPass(firrtl::createCreateSiFiveMetadataPass(
opt.shouldReplicateSequentialMemories(),
opt.shouldReplaceSequentialMemories(),
opt.getReplaceSequentialMemoriesFile()));

pm.addNestedPass<firrtl::CircuitOp>(firrtl::createExtractInstancesPass());
Expand Down Expand Up @@ -303,7 +303,7 @@ LogicalResult firtool::populateHWToSV(mlir::PassManager &pm,
FirtoolOptions::RandomKind::Mem),
/*disableRegRandomization=*/
!opt.isRandomEnabled(FirtoolOptions::RandomKind::Reg),
/*replSeqMem=*/opt.shouldReplicateSequentialMemories(),
/*replSeqMem=*/opt.shouldReplaceSequentialMemories(),
/*readEnableMode=*/opt.shouldIgnoreReadEnableMemories()
? seq::ReadEnableMode::Ignore
: seq::ReadEnableMode::Undefined,
Expand Down

0 comments on commit 1a8f82e

Please sign in to comment.