Skip to content

Commit

Permalink
Advanced LayerSink
Browse files Browse the repository at this point in the history
  • Loading branch information
rwy7 committed Sep 18, 2024
1 parent 478e0db commit 5031be0
Show file tree
Hide file tree
Showing 7 changed files with 1,199 additions and 60 deletions.
2 changes: 1 addition & 1 deletion include/circt/Dialect/FIRRTL/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def LayerMerge : Pass<"firrtl-layer-merge", "firrtl::FModuleOp"> {
];
}

def LayerSink : Pass<"firrtl-layer-sink", "firrtl::FModuleOp"> {
def LayerSink : Pass<"firrtl-layer-sink", "firrtl::CircuitOp"> {
let summary = "Sink operations into layer blocks";
let description = [{

Expand Down
5 changes: 5 additions & 0 deletions lib/Conversion/FIRRTLToHW/LowerToHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,11 @@ Value FIRRTLLowering::getLoweredFmtOperand(Value operand) {
///
LogicalResult FIRRTLLowering::setLowering(Value orig, Value result) {
if (auto origType = dyn_cast<FIRRTLType>(orig.getType())) {

if (result && type_isa<FIRRTLType>(result.getType())) {
llvm::errs() << result.getType() << "\n";
}

assert((!result || !type_isa<FIRRTLType>(result.getType())) &&
"Lowering didn't turn a FIRRTL value into a non-FIRRTL value");

Expand Down
Loading

0 comments on commit 5031be0

Please sign in to comment.