MLIR-AIE 1.4.6.dev
xilinx::AIE::DMAChannelAnalysis Class Reference

Which DMA channels of each tile are already spoken for, so that a channel is handed out at most once across everything that programs one. More...

#include "aie/Dialect/AIE/Transforms/AIEDMAChannelAnalysis.h"

Public Member Functions

 DMAChannelAnalysis (DeviceOp &device)
int getDMAChannelIndex (TileLike tile, DMAChannelDir dir, bool requiresAdjacentTileAccessChannels, mlir::Operation *owner=nullptr)
 Next free channel of tile in dir, or -1 when the tile has none left.
bool isChannelFree (TileLike tile, DMAChannelDir dir, int channel)
 Whether first-free assignment could hand out channel: nothing reserves it and no explicit flow routes it.
int reservePinnedChannel (TileLike tile, DMAChannelDir dir, int channel, mlir::Operation *owner=nullptr, bool shareable=false)
 Claim channel for (tile, dir) so first-free assignment cannot take it.
mlir::Operation * getDMAChannelOwner (TileLike tile, DMAChannelDir dir, int channel)
 Operation reserving or routing this channel; null if none.
mlir::LogicalResult checkAIEStreamIndex (TileLike tile, DMAChannel chan, mlir::Operation *user, bool packet=false)
 Claim a raw stream port for user, reporting on it when the port is taken; packet users may share it with other packets.

Static Public Member Functions

static int getDMAChannelLimit (TileLike tile, DMAChannelDir dir, bool requiresAdjacentTileAccessChannels)
 Exclusive upper bound on channel indices eligible for this transfer.

Detailed Description

Which DMA channels of each tile are already spoken for, so that a channel is handed out at most once across everything that programs one.

Definition at line 20 of file AIEDMAChannelAnalysis.h.

Constructor & Destructor Documentation

◆ DMAChannelAnalysis()

DMAChannelAnalysis::DMAChannelAnalysis ( DeviceOp & device)

Definition at line 25 of file AIEDMAChannelAnalysis.cpp.

Member Function Documentation

◆ checkAIEStreamIndex()

LogicalResult DMAChannelAnalysis::checkAIEStreamIndex ( TileLike tile,
DMAChannel chan,
mlir::Operation * user,
bool packet = false )

Claim a raw stream port for user, reporting on it when the port is taken; packet users may share it with other packets.

Definition at line 219 of file AIEDMAChannelAnalysis.cpp.

◆ getDMAChannelIndex()

int DMAChannelAnalysis::getDMAChannelIndex ( TileLike tile,
DMAChannelDir dir,
bool requiresAdjacentTileAccessChannels,
mlir::Operation * owner = nullptr )

Next free channel of tile in dir, or -1 when the tile has none left.

A channel an explicit flow routes is not free. A channel reaching an adjacent MemTile's memory must come from the target's restricted range at every compatible physical position.

Definition at line 154 of file AIEDMAChannelAnalysis.cpp.

References getDMAChannelLimit(), isChannelFree(), and reservePinnedChannel().

◆ getDMAChannelLimit()

int DMAChannelAnalysis::getDMAChannelLimit ( TileLike tile,
DMAChannelDir dir,
bool requiresAdjacentTileAccessChannels )
static

Exclusive upper bound on channel indices eligible for this transfer.

Definition at line 115 of file AIEDMAChannelAnalysis.cpp.

References xilinx::AIE::getTargetModel().

Referenced by getDMAChannelIndex(), and reservePinnedChannel().

◆ getDMAChannelOwner()

Operation * DMAChannelAnalysis::getDMAChannelOwner ( TileLike tile,
DMAChannelDir dir,
int channel )

Operation reserving or routing this channel; null if none.

Definition at line 208 of file AIEDMAChannelAnalysis.cpp.

◆ isChannelFree()

bool DMAChannelAnalysis::isChannelFree ( TileLike tile,
DMAChannelDir dir,
int channel )

Whether first-free assignment could hand out channel: nothing reserves it and no explicit flow routes it.

Definition at line 167 of file AIEDMAChannelAnalysis.cpp.

Referenced by getDMAChannelIndex().

◆ reservePinnedChannel()

int DMAChannelAnalysis::reservePinnedChannel ( TileLike tile,
DMAChannelDir dir,
int channel,
mlir::Operation * owner = nullptr,
bool shareable = false )

Claim channel for (tile, dir) so first-free assignment cannot take it.

Returns the channel, or -1 when it is out of range or already claimed; the caller reports, since it knows which endpoint asked. shareable claimants join a channel other shareable ones hold.

Definition at line 174 of file AIEDMAChannelAnalysis.cpp.

References getDMAChannelLimit().

Referenced by getDMAChannelIndex().


The documentation for this class was generated from the following files: