8#ifndef AIE_DIALECT_AIE_TRANSFORMS_AIECHANNELTURNS_H
9#define AIE_DIALECT_AIE_TRANSFORMS_AIECHANNELTURNS_H
13#include "llvm/ADT/ArrayRef.h"
14#include "llvm/ADT/SmallVector.h"
33 mlir::LogicalResult
read(llvm::ArrayRef<ObjectFifoCoreEndpointOp> ends,
37 mlir::LogicalResult
read(CoreOp core, llvm::ArrayRef<mlir::StringAttr> names,
38 bool coreDrains, std::string &reason);
42 llvm::ArrayRef<unsigned>
turns()
const {
return order; }
59 bool keepsUp(llvm::ArrayRef<int64_t> depths);
62 bool keepsUp(llvm::ArrayRef<unsigned> order,
63 llvm::ArrayRef<int64_t> depths)
const;
64 mlir::LogicalResult wholeRunKeepsTurns(
66 llvm::ArrayRef<std::pair<ObjectFifoReleaseOp, unsigned>> releases,
67 std::string &reason)
const;
76 llvm::SmallVector<Event> period;
77 llvm::SmallVector<unsigned> order;
78 mlir::Operation *loop =
nullptr;
80 bool coreDrains =
true;
The order one core moves objects through several pools, read off its program, so that one DMA channel...
mlir::LogicalResult read(llvm::ArrayRef< ObjectFifoCoreEndpointOp > ends, std::string &reason)
Reads the order off the program of the core working through ends, all draining (the channel fills the...
bool movesNone() const
Whether read found a steady state in which the period moves none of the objects: the core keeps what ...
bool keepsUp(llvm::ArrayRef< int64_t > depths)
Whether a channel moving objects in turns() order forever, through pools of depths,...
mlir::LogicalResult read(CoreOp core, llvm::ArrayRef< mlir::StringAttr > names, bool coreDrains, std::string &reason)
The same, before split: names are objectFIFOs core acquires from (coreDrains) or into.
mlir::Operation * periodAcquire() const
The first acquire the period runs, with its branches folded; null when it runs none.
llvm::ArrayRef< unsigned > turns() const
Indices into ends, one per object the channel moves in a period of the core's steady state.
mlir::Operation * periodLoop() const
The loop read took as the core's period, once it found one.