Skip to content

Commit

Permalink
Fixes to objFifo ops (#567)
Browse files Browse the repository at this point in the history
* Fix lowering for objectFifos that have producer and consumer on the same core

* Small fixes. Correctly identify shared tile in LinkOp when there is a broadcast objFifo.

* Clang format and fix test output

---------

Co-authored-by: abisca <[email protected]>
  • Loading branch information
AndraBisca and abisca authored Aug 7, 2023
1 parent 109566c commit 1cf0528
Show file tree
Hide file tree
Showing 5 changed files with 420 additions and 122 deletions.
9 changes: 8 additions & 1 deletion lib/Dialect/AIE/IR/AIEDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ std::optional<Value> xilinx::AIE::ObjectFifoLinkOp::getOptionalSharedTile() {
return {};
}
return {fifoOut.getProducerTile()};
} else {
} else if (isDistribute()) {
auto fifoIn = getFifoIns()[0].getDefiningOp<ObjectFifoCreateOp>();
for (auto fifoOut : getFifoOuts()) {
ObjectFifoCreateOp fifoOutOp =
Expand All @@ -507,6 +507,13 @@ std::optional<Value> xilinx::AIE::ObjectFifoLinkOp::getOptionalSharedTile() {
return {};
}
return {fifoIn.getConsumerTiles()[0]};
} else {
auto fifoIn = getFifoIns()[0].getDefiningOp<ObjectFifoCreateOp>();
auto fifoOut = getFifoOuts()[0].getDefiningOp<ObjectFifoCreateOp>();
for (auto consumerIn : fifoIn.getConsumerTiles())
if (consumerIn == fifoOut.getProducerTile())
return {fifoOut.getProducerTile()};
return {};
}
return {};
}
Expand Down
Loading

0 comments on commit 1cf0528

Please sign in to comment.