Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced LayerSink #7548

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/circt/Dialect/FIRRTL/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ std::unique_ptr<mlir::Pass> createLayerMergePass();

std::unique_ptr<mlir::Pass> createLayerSinkPass();

std::unique_ptr<mlir::Pass> createAdvancedLayerSinkPass();

std::unique_ptr<mlir::Pass> createMaterializeDebugInfoPass();

std::unique_ptr<mlir::Pass> createLintingPass();
Expand Down
9 changes: 9 additions & 0 deletions include/circt/Dialect/FIRRTL/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,15 @@ def LayerSink : Pass<"firrtl-layer-sink", "firrtl::FModuleOp"> {
];
}

def AdvancedLayerSink : Pass<"firrtl-advanced-layer-sink", "firrtl::CircuitOp"> {
let summary = "Sink operations into layer blocks";
let description = [{
This pass sinks ops into layers, whenever possible, to minimize unused
hardware in the design.
}];
let constructor = "::circt::firrtl::createAdvancedLayerSinkPass()";
}

def MaterializeDebugInfo :
Pass<"firrtl-materialize-debug-info", "firrtl::FModuleOp"> {
let summary = "Generate debug ops to track FIRRTL values";
Expand Down
7 changes: 7 additions & 0 deletions include/circt/Firtool/Firtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class FirtoolOptions {
bool shouldConvertProbesToSignals() const { return probesToSignals; }
bool shouldReplaceSequentialMemories() const { return replSeqMem; }
bool shouldDisableOptimization() const { return disableOptimization; }
bool shouldAdvancedLayerSink() const { return advancedLayerSink; }
bool shouldLowerMemories() const { return lowerMemories; }
bool shouldDedup() const { return !noDedup; }
bool shouldEnableDebugInfo() const { return enableDebugInfo; }
Expand Down Expand Up @@ -231,6 +232,11 @@ class FirtoolOptions {
return *this;
}

FirtoolOptions &setAdvancedLayerSink(bool value) {
advancedLayerSink = value;
return *this;
}

FirtoolOptions &setLowerMemories(bool value) {
lowerMemories = value;
return *this;
Expand Down Expand Up @@ -382,6 +388,7 @@ class FirtoolOptions {
bool disableAggressiveMergeConnections;
bool emitOMIR;
std::string omirOutFile;
bool advancedLayerSink;
bool lowerMemories;
std::string blackBoxRootPath;
bool replSeqMem;
Expand Down
Loading
Loading