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

AIE4 (npu3) base model. More...

#include "aie/Dialect/AIE/IR/AIETargetModel.h"

Inheritance diagram for xilinx::AIE::AIE4TargetModel:
Collaboration diagram for xilinx::AIE::AIE4TargetModel:

Public Member Functions

 AIE4TargetModel (TargetModelKind k)
AIEArch getTargetArch () const override
 Return the target architecture.
llvm::ArrayRef< std::pair< int, int > > getCascadeSteps () const override
 The steps (destination column - source column, destination row - source row) from one core's cascade output to the next core's input.
uint32_t getAddressGenGranularity () const override
 Return the data bus width of the device.
uint32_t getNumSlaveSlots () const override
 Return the number of packet-rule slots per stream-switch slave port.
uint32_t getNumArbiters () const override
 Return the number of arbiters per stream switch.
uint32_t getNumMselsPerArbiter () const override
 Return the number of master select values per stream-switch arbiter.
uint32_t getMaxPacketId () const override
 Return the largest packet id the stream switch can route.
uint32_t getMaxOutOfOrderId () const override
 4-bit index into the receiving channel's 16-BD bank.
uint32_t getMaxRepeatCount () const override
 Return the largest DMA task repeat count (unsupported = 0).
uint32_t getDmaTaskQueueDepth () const override
 Not modelled yet.
uint32_t getNumControllersPerColumn () const override
 Number of microcontrollers (uC) per column.
std::optional< TileID > getMemWest (TileID) const override
 A core reaches only its own data memory, through the east window.
std::optional< TileID > getMemEast (TileID src) const override
 Return the tile ID of the memory to the east of the given tile, if it exists.
std::optional< TileID > getMemNorth (TileID) const override
 Return the tile ID of the memory to the north of the given tile, if it exists.
std::optional< TileID > getMemSouth (TileID) const override
 Return the tile ID of the memory to the south of the given tile, if it exists.
bool isMemWest (int srcCol, int srcRow, int dstCol, int dstRow) const override
 Return true if src has a memory tile which is West of dst.
bool isMemEast (int srcCol, int srcRow, int dstCol, int dstRow) const override
 Return true if src has a memory tile which is East of dst.
bool isMemNorth (int srcCol, int srcRow, int dstCol, int dstRow) const override
 Return true if src has a memory tile which is North of dst.
bool isMemSouth (int srcCol, int srcRow, int dstCol, int dstRow) const override
 Return true if src has a memory tile which is South of dst.
bool isLegalMemAffinity (int coreCol, int coreRow, int memCol, int memRow) const override
 Return true if core can access the memory in mem.
uint32_t getMemInternalBaseAddress (TileID src) const override
 Return the base address in the local address map for a core.
uint32_t getMemSouthBaseAddress () const override
 Return the base address in the local address map for a core.
uint32_t getMemWestBaseAddress () const override
 Return the base address in the local address map for a core.
uint32_t getMemNorthBaseAddress () const override
 Return the base address in the local address map for a core.
uint32_t getMemEastBaseAddress () const override
 Return the base address in the local address map for a core.
uint32_t getLocalMemorySize () const override
 Return the size (in bytes) of the local data memory of a core.
uint32_t getProgramMemorySize () const override
 Return the size (in bytes) of a core's program memory.
uint32_t getCoreDataAddressSpaceSize () const override
 Return the size (in bytes) of the address space a core can issue data accesses into.
uint32_t getComputeTileLoadStoreBusWidth () const override
 Return the data bus width (in bits) for load/store operations of a compute core.
uint32_t getAccumulatorCascadeSize () const override
 Return the size (in bits) of the accumulator/cascade.
uint32_t getNumLocks (AIETileType tileType) const override
 Return the number of lock objects for a given tile type.
uint32_t getMaxLockValue () const override
 Return the maximum value that can be stored in a lock register.
std::optional< uint32_t > getLocalLockAddress (uint32_t lockId, TileID tile) const override
std::optional< uint32_t > getLockLocalBaseIndex (int localCol, int localRow, int lockCol, int lockRow) const override
 A memtile DMA reaches the locks and memory of the 15 memtiles within seven columns, westmost first; data windows start at 0xB00000.
std::optional< uint32_t > getMemLocalBaseAddress (int localCol, int localRow, int memCol, int memRow) const override
 Return the memory base address (or offset) in the local tile when accessing a neighbor's memory or an empty optional if an invalid neighbor is given Takes into account differences between Memory and Core tiles.
uint32_t getNumBDs (AIETileType tileType) const override
 16 ids per core tile or memtile channel pool; 32 across two shim banks.
uint32_t getTotalNumBDs (AIETileType tileType) const override
 Memtile: 16 BDs per each of 10 MM2S + 8 S2MM channels.
uint32_t getBdPoolId (int col, int row, int channel, DMAChannelDir dir) const override
 Shim: MM2S 0-1 and S2MM 0 use BDs 0-15, MM2S 2-3 and S2MM 1 BDs 16-31; ControlMM2S (8) and TraceS2MM (4) have private pools.
uint32_t getBdPoolStartId (int col, int row, uint32_t poolId) const override
uint32_t getNumBDsInPool (int col, int row, uint32_t poolId) const override
bool hasChannelLocalBdIds (int col, int row) const override
 True if data BD ids are channel-local, so a BD's address depends on its channel and direction.
uint32_t getBDMaxDims (AIETileType tileType) const override
 Return the maximum number of addressing dimensions (wraps/strides) a single buffer descriptor supports for a given tile type.
const DmaBdLayout * getDmaBdLayout (AIETileType tileType) const override
 Return the register layout of a buffer descriptor on the given tile type, or null if the target has none modeled for it.
const DmaBdLayout * getDmaBdLayout (AIETileType tileType, DMAChannelDir direction) const override
 Return the BD layout for direction; control and trace BDs may differ.
const DmaBdLayout & getDmaBdLimits (AIETileType tileType) const
 Field limits from the BD layout; the shim's for tiles without one.
uint64_t getDmaBdMaxLen (AIETileType tileType) const override
 Return the maximum transfer length, measured in address-generation granules (see getAddressGenGranularity(), 32-bit words on AIE2), that fits in the buffer_length field of a DMA buffer descriptor for the given tile type.
uint32_t getDmaBdWrapBits (AIETileType tileType) const override
 Return the bit width of the wrap (size) field in a DMA buffer descriptor for the given tile type.
uint32_t getDmaBdStepBits (AIETileType tileType) const override
 Return the bit width of the step (stride) field in a DMA buffer descriptor for the given tile type.
uint32_t getDmaBdIterBits (AIETileType tileType) const override
 Return the bit width of the iteration (repeat) wrap/stride fields in a DMA buffer descriptor for the given tile type.
uint64_t getDmaBdAddress (int col, int row, uint32_t bd_id, int channel, AIE::DMAChannelDir direction) const override
 Shim data BDs need no channel; control, trace and memtile BDs do (fatal error without one).
uint32_t getDmaBdAddressOffset (int col, int row) const override
 Return the offset of the base address field within the shim dma buffer descriptor.
uint32_t getDmaControlAddress (int col, int row, int channel, AIE::DMAChannelDir direction) const override
 Return the array address of the dma task queue register for the given col, row, channel and direction.
uint32_t getMemTileSize () const override
 Return the size (in bytes) of a MemTile.
uint32_t getNumBanks (int col, int row) const override
 Return the number of memory banks of a given tile.
uint32_t getMaxChannelNumForAdjacentMemTile (int col, int row) const override
uint32_t getNumDestSwitchboxConnections (int col, int row, WireBundle bundle) const override
 Return the number of destinations of connections inside a switchbox.
uint32_t getNumSourceSwitchboxConnections (int col, int row, WireBundle bundle) const override
 Return the number of sources of connections inside a switchbox.
uint32_t getNumDestShimMuxConnections (int col, int row, WireBundle bundle) const override
 Return the number of destinations of connections inside a shimmux.
uint32_t getNumSourceShimMuxConnections (int col, int row, WireBundle bundle) const override
 Return the number of sources of connections inside a shimmux.
bool hasShimMux (int col, int row) const override
 True if the tile's DMA/NOC/PLIO ports sit behind an aie.shim_mux; otherwise its DMA is routed in the switchbox like any other tile's.
bool isLegalTileConnection (int col, int row, WireBundle srcBundle, int srcChan, WireBundle dstBundle, int dstChan) const override
std::optional< uint32_t > getStreamSwitchPortIndex (int col, int row, WireBundle bundle, uint32_t channel, bool master) const override
 Not modelled yet.
uint32_t getColumnShift () const override
uint32_t getRowShift () const override
std::vector< std::pair< uint32_t, uint32_t > > getShimBurstEncodingsAndLengths () const override
uint32_t getDefaultAxCache () const override
 AxCACHE 0 is the hardware-proven value on AIE4.
uint32_t getTileAddress (int col, int row) const override
 A memtile spans five address rows (registers, then 4 MiB of data), so memtile row m starts at address row 5m-4 and core row r at r + 4 * the number of memtile rows.
uint32_t getRowFromAddress (uint32_t address) const override
 Inverse of getTileAddress() for any address in the tile's window.
uint32_t getDataMemoryOffset (int col, int row) const override
 A memtile's data memory starts 1 MiB into its window.
uint32_t getNumLocks (int col, int row) const
 Return the number of lock objects for a tile at the given coordinates.
const DmaBdLayout * getDmaBdLayout (int col, int row) const
 Core BDs are 6 words, memtile 11, shim 9.
const DmaBdLayout * getDmaBdLayout (int col, int row, DMAChannelDir direction) const
 Core BDs are 6 words, memtile 11, shim 9.
Public Member Functions inherited from xilinx::AIE::AIETargetModel
TargetModelKind getKind () const
 AIETargetModel (TargetModelKind k)
virtual ~AIETargetModel ()
virtual int columns () const =0
 Return the number of columns in the device.
virtual int physicalColumns () const
 Width of the physical array this (possibly virtualized) device is carved from.
virtual int firstPlaceableColumn () const
 First physical column at which a partition may be anchored.
std::vector< int > partitionStartColumns (int numCols) const
 Every physical column offset at which a numCols-wide partition still fits.
virtual int rows () const =0
 Return the number of rows in the device.
virtual uint32_t getNumControllers () const
 Total number of microcontrollers (uC) in the device.
virtual AIETileType getTileType (int col, int row) const =0
 Return the tile type for the given tile coordinates.
bool isCoreTile (int col, int row) const
 Return true if the given tile is a Core tile.
bool isMemTile (int col, int row) const
 Return true if the given tile is a Mem tile.
bool isShimNOCTile (int col, int row) const
 Return true if the given tile is a ShimNOC tile.
bool isShimPLTile (int col, int row) const
 Return true if the given tile is a ShimPL tile.
bool isShimNOCorPLTile (int col, int row) const
 Return true if the given tile is either a ShimNOC or ShimPL tile.
virtual bool isValidTile (TileID src) const
 Return true if the given tile ID is valid.
bool isInternal (int srcCol, int srcRow, int dstCol, int dstRow) const
 Return true if src is the internal memory of dst.
bool isWest (int srcCol, int srcRow, int dstCol, int dstRow) const
 Return true if src is West of dst.
bool isEast (int srcCol, int srcRow, int dstCol, int dstRow) const
 Return true if src is East of dst.
bool isNorth (int srcCol, int srcRow, int dstCol, int dstRow) const
 Return true if src is North of dst.
bool isSouth (int srcCol, int srcRow, int dstCol, int dstRow) const
 Return true if src is South of dst.
bool isLegalCascade (int srcCol, int srcRow, int dstCol, int dstRow) const
 Return true if a cascade can run from src to dst.
SharedMemory getSharedMemory (TileID a, TileID b) const
 Return the memory module a and b can both reach, if any.
virtual uint32_t getDefaultCoreStackSize () const
 Return the default stack reservation (in bytes) for a core that does not state one.
uint32_t getCoreStackAlignment () const
 Stack-pointer alignment in bytes, matching Peano's AIE frame lowering: AIE1/AIE2 require 32B; AIE2P/AIE2PS require 64B, not their 32B data bus.
virtual uint32_t getComputeTileMaxVectorAlignBits () const
 Return the alignment (in bits) required by the widest vector load/store a compute core can issue.
virtual uint32_t getMemTileLoadStoreBusWidth () const
 Return the data bus width (in bits) for load/store operations of a memory tile.
uint32_t getNumLocks (int col, int row) const
 Return the number of lock objects for a tile at the given coordinates.
uint32_t getNumBDs (int col, int row) const
 Return the number of buffer descriptors supported by the DMA in the given tile.
uint32_t getBDMaxDims (int col, int row) const
 Return the maximum number of BD addressing dimensions for the tile at (col, row).
uint64_t getDmaBdMaxLen (int col, int row) const
uint32_t getDmaBdWrapBits (int col, int row) const
uint32_t getDmaBdStepBits (int col, int row) const
uint32_t getDmaBdIterBits (int col, int row) const
uint32_t getTotalNumBDs (int col, int row) const
std::pair< uint32_t, uint32_t > getBdIdRangeForChannel (int col, int row, int channel, DMAChannelDir dir) const
 Return the half-open range of BD ids channel in dir can submit.
uint32_t getNumBDsForChannel (int col, int row, int channel, DMAChannelDir dir) const
bool isBdInChannelPool (int col, int row, uint32_t bd_id, int channel, DMAChannelDir dir) const
 True iff bd_id is in the channel's pool, whether or not it exists.
bool isBdChannelAccessible (int col, int row, uint32_t bd_id, int channel, DMAChannelDir dir) const
bool isBdChannelAccessible (int col, int row, uint32_t bd_id, int channel) const
 True iff the channel exists and can submit bd_id in every direction it has.
uint32_t getNumBDsForChannel (int col, int row, int channel) const
const DmaBdLayout * getDmaBdLayout (int col, int row) const
const DmaBdLayout * getDmaBdLayout (int col, int row, DMAChannelDir direction) const
uint32_t getDmaBdStepBias (AIETileType tileType) const
 DmaBdLayout::stepBias, or 1 without a layout.
uint32_t getDmaBdStepBias (int col, int row) const
bool usesChannelLocalBdIds (int col, int row, DMAChannelDir direction) const
 Control and trace channels always have private, channel-local pools.
virtual std::optional< uint32_t > getDmaStatusAddress (int, int, int, AIE::DMAChannelDir) const
 Return the address of the DMA status register for a channel, or nullopt when this target's layout has not been verified.
virtual uint32_t getDmaTaskQueueSizeMask () const
 Return the mask selecting the live task-queue occupancy field within the getDmaStatusAddress() register (0 when unsupported).
virtual uint32_t getDmaChannelIdleMask () const
 Return the bits of the getDmaStatusAddress() register that are all clear exactly when the channel has finished every task pushed to it: nothing queued, nothing running, nothing stalled (0 when unsupported).
uint32_t getDmaQueueAddress (int col, int row, int channel, AIE::DMAChannelDir direction) const
 Return the array address of the task queue register a push writes, the word after the channel's control register.
uint32_t getLocalDmaControlAddress (int col, int row, int channel, AIE::DMAChannelDir direction) const
 Return the DMA task-queue register address relative to its tile.
virtual uint32_t getNumMemTileRows () const =0
uint32_t getNumDMAChannels (int col, int row, AIE::DMAChannelDir dir) const
 Return the number of DMA channels a tile has in one direction.
bool isDmaChannelSupported (TileID tile, AIE::DMAChannelDir dir, int channel) const
int getPacketIdBits () const
 Bits a packet id spans, and the mask a switch's id match uses.
int getPacketIdMask () const
uint32_t getDmaTaskQueueDepth (int, int, int, AIE::DMAChannelDir) const
 Return the task-queue depth for one channel.
void validate () const
uint32_t getModelProperties () const
void addModelProperty (uint32_t prop)
bool hasProperty (ModelProperty Prop) const
uint32_t getRowFieldMask () const
uint32_t getColumnFromAddress (uint32_t address) const
virtual bool isSupportedBlockFormat (std::string const &format) const
virtual bool isMemTilePadValueSupported () const
const RegisterInfo * lookupRegister (llvm::StringRef name, TileID tile, bool isMem=false) const
 Register Database API - provides access to register and event information for trace configuration and low-level register access.
bool isOrdinaryWriteAddress (TileID tile, uint32_t offset) const
std::optional< uint32_t > lookupEvent (llvm::StringRef name, TileID tile, bool isMem=false) const
 Lookup event number by name and tile.
std::optional< uint32_t > encodeFieldValue (const BitFieldInfo &field, uint32_t value) const
 Encode a field value with proper bit shifting.
std::optional< uint32_t > getFieldMask (const BitFieldInfo &field) const
 Compute a 32-bit mask for a register field.
llvm::DenseMap< TileID, int > getTileToControllerIdMap (bool columnWiseUniqueIDs=true) const
 Return a mapping from tile coordinates to controller IDs.
std::optional< uint32_t > resolvePortValue (llvm::StringRef value, TileID tile, bool master) const
 Resolve stream switch port specification to port index.

Static Public Member Functions

static bool classof (const AIETargetModel *model)

Protected Member Functions

std::unique_ptr< RegisterDatabase > loadRegisterDatabase () const override
 AIE4 TargetModel.
Protected Member Functions inherited from xilinx::AIE::AIETargetModel
const RegisterDatabase * getRegisterDatabase () const
 Get the register database, loading it lazily on first access.

Additional Inherited Members

Public Types inherited from xilinx::AIE::AIETargetModel
enum  TargetModelKind {
  TK_AIE1_VC1902 , TK_AIE1_Last , TK_AIE2_VE2302 , TK_AIE2_VE2802 ,
  TK_AIE2_NPU1_1Col , TK_AIE2_NPU1_2Col , TK_AIE2_NPU1_3Col , TK_AIE2_NPU1_4Col ,
  TK_AIE2_NPU1_Last , TK_AIE2_NPU2 = TK_AIE2_NPU1_Last , TK_AIE2_NPU2_1Col , TK_AIE2_NPU2_2Col ,
  TK_AIE2_NPU2_3Col , TK_AIE2_NPU2_4Col , TK_AIE2_NPU2_5Col , TK_AIE2_NPU2_6Col ,
  TK_AIE2_NPU2_7Col , TK_AIE2_NPU2_Last , TK_AIE2PS_VE3858 = TK_AIE2_NPU2_Last , TK_AIE2PS_Last ,
  TK_AIE2_Last = TK_AIE2PS_Last , TK_AIE4_NPU3 , TK_AIE4_NPU3_1Col , TK_AIE4_NPU3_2Col ,
  TK_AIE4_NPU3_Last , TK_AIE4_Last = TK_AIE4_NPU3_Last
}
enum  ModelProperty {
  UsesSemaphoreLocks = 1U << 0 , IsNPU = 1U << 1 , IsVirtualized = 1U << 2 , UsesMultiDimensionalBDs = 1U << 3 ,
  UsesBDIteration = 1U << 4 , SupportsOutOfOrderDMA = 1U << 5 , SupportsControlPackets = 1U << 6
}
enum class  SharedMemory { None , First , Second , Either }
 Which of two tiles' memory modules both of them can address. More...

Detailed Description

AIE4 (npu3) base model.

Reports "unsupported" where the API cannot yet describe AIE4 rather than an AIE2-shaped answer.

Definition at line 1489 of file AIETargetModel.h.

Constructor & Destructor Documentation

◆ AIE4TargetModel()

Member Function Documentation

◆ classof()

◆ getAccumulatorCascadeSize()

uint32_t xilinx::AIE::AIE4TargetModel::getAccumulatorCascadeSize ( ) const
inlineoverridevirtual

Return the size (in bits) of the accumulator/cascade.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1556 of file AIETargetModel.h.

◆ getAddressGenGranularity()

uint32_t xilinx::AIE::AIE4TargetModel::getAddressGenGranularity ( ) const
inlineoverridevirtual

Return the data bus width of the device.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1509 of file AIETargetModel.h.

◆ getBDMaxDims()

uint32_t xilinx::AIE::AIE4TargetModel::getBDMaxDims ( AIETileType tileType) const
inlineoverridevirtual

Return the maximum number of addressing dimensions (wraps/strides) a single buffer descriptor supports for a given tile type.

This is the hardware ND access-pattern limit; it does not count the separate shim iteration/repeat dimension that runtime-sequence BD tasks hoist the leading tap dimension into.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1603 of file AIETargetModel.h.

◆ getBdPoolId()

uint32_t xilinx::AIE::AIE4TargetModel::getBdPoolId ( int col,
int row,
int channel,
DMAChannelDir dir ) const
overridevirtual

Shim: MM2S 0-1 and S2MM 0 use BDs 0-15, MM2S 2-3 and S2MM 1 BDs 16-31; ControlMM2S (8) and TraceS2MM (4) have private pools.

Memtile: a private 16-BD pool per channel and direction.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1961 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::isMM2S(), and xilinx::AIE::AIETargetModel::isShimNOCTile().

Referenced by getDmaBdAddress().

◆ getBdPoolStartId()

uint32_t xilinx::AIE::AIE4TargetModel::getBdPoolStartId ( int col,
int row,
uint32_t poolId ) const
overridevirtual

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1976 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isShimNOCTile().

◆ getCascadeSteps()

llvm::ArrayRef< std::pair< int, int > > xilinx::AIE::AIE4TargetModel::getCascadeSteps ( ) const
inlineoverridevirtual

The steps (destination column - source column, destination row - source row) from one core's cascade output to the next core's input.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1504 of file AIETargetModel.h.

◆ getColumnShift()

uint32_t xilinx::AIE::AIE4TargetModel::getColumnShift ( ) const
inlineoverridevirtual

Implements xilinx::AIE::AIETargetModel.

Definition at line 1667 of file AIETargetModel.h.

Referenced by getTileAddress().

◆ getComputeTileLoadStoreBusWidth()

uint32_t xilinx::AIE::AIE4TargetModel::getComputeTileLoadStoreBusWidth ( ) const
inlineoverridevirtual

Return the data bus width (in bits) for load/store operations of a compute core.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1555 of file AIETargetModel.h.

◆ getCoreDataAddressSpaceSize()

uint32_t xilinx::AIE::AIE4TargetModel::getCoreDataAddressSpaceSize ( ) const
inlineoverridevirtual

Return the size (in bytes) of the address space a core can issue data accesses into.

The neighbour memory windows sit at the bottom of it; the span above them reaches no memory and is reserved so nothing is placed there.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1554 of file AIETargetModel.h.

◆ getDataMemoryOffset()

uint32_t xilinx::AIE::AIE4TargetModel::getDataMemoryOffset ( int col,
int row ) const
overridevirtual

A memtile's data memory starts 1 MiB into its window.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1914 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isMemTile().

◆ getDefaultAxCache()

uint32_t xilinx::AIE::AIE4TargetModel::getDefaultAxCache ( ) const
inlineoverridevirtual

AxCACHE 0 is the hardware-proven value on AIE4.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1673 of file AIETargetModel.h.

◆ getDmaBdAddress()

uint64_t xilinx::AIE::AIE4TargetModel::getDmaBdAddress ( int col,
int row,
uint32_t bd_id,
int channel,
AIE::DMAChannelDir direction ) const
overridevirtual

◆ getDmaBdAddressOffset()

uint32_t xilinx::AIE::AIE4TargetModel::getDmaBdAddressOffset ( int col,
int row ) const
overridevirtual

Return the offset of the base address field within the shim dma buffer descriptor.

Implements xilinx::AIE::AIETargetModel.

Definition at line 2199 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isShimNOCTile().

◆ getDmaBdIterBits()

uint32_t xilinx::AIE::AIE4TargetModel::getDmaBdIterBits ( AIETileType tileType) const
inlineoverridevirtual

Return the bit width of the iteration (repeat) wrap/stride fields in a DMA buffer descriptor for the given tile type.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1626 of file AIETargetModel.h.

References getDmaBdLimits(), xilinx::AIE::DmaBdLayout::iterationSize, and xilinx::AIE::DmaBdField::width.

◆ getDmaBdLayout() [1/4]

const DmaBdLayout * xilinx::AIE::AIE4TargetModel::getDmaBdLayout ( AIETileType tileType) const
overridevirtual

Return the register layout of a buffer descriptor on the given tile type, or null if the target has none modeled for it.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 2117 of file AIETargetModel.cpp.

Referenced by getDmaBdLayout(), and getDmaBdLimits().

◆ getDmaBdLayout() [2/4]

const DmaBdLayout * xilinx::AIE::AIE4TargetModel::getDmaBdLayout ( AIETileType tileType,
DMAChannelDir direction ) const
overridevirtual

Return the BD layout for direction; control and trace BDs may differ.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 2134 of file AIETargetModel.cpp.

References getDmaBdLayout().

◆ getDmaBdLayout() [3/4]

const DmaBdLayout * xilinx::AIE::AIETargetModel::getDmaBdLayout ( int col,
int row ) const
inline

Core BDs are 6 words, memtile 11, shim 9.

Steps are unbiased and there is no d0 step. Control/trace BDs are shim BDs without dimensions or locks.

Definition at line 621 of file AIETargetModel.h.

◆ getDmaBdLayout() [4/4]

const DmaBdLayout * xilinx::AIE::AIETargetModel::getDmaBdLayout ( int col,
int row,
DMAChannelDir direction ) const
inline

Core BDs are 6 words, memtile 11, shim 9.

Steps are unbiased and there is no d0 step. Control/trace BDs are shim BDs without dimensions or locks.

Definition at line 633 of file AIETargetModel.h.

◆ getDmaBdLimits()

const DmaBdLayout & xilinx::AIE::AIE4TargetModel::getDmaBdLimits ( AIETileType tileType) const
inline

Field limits from the BD layout; the shim's for tiles without one.

Definition at line 1613 of file AIETargetModel.h.

References getDmaBdLayout().

Referenced by getDmaBdIterBits(), getDmaBdMaxLen(), getDmaBdStepBits(), and getDmaBdWrapBits().

◆ getDmaBdMaxLen()

uint64_t xilinx::AIE::AIE4TargetModel::getDmaBdMaxLen ( AIETileType tileType) const
inlineoverridevirtual

Return the maximum transfer length, measured in address-generation granules (see getAddressGenGranularity(), 32-bit words on AIE2), that fits in the buffer_length field of a DMA buffer descriptor for the given tile type.

The field width is tile-type specific (e.g. on AIE2 the shim field is 32 bits, the mem-tile field 17 bits and the core-tile field 14 bits).

Implements xilinx::AIE::AIETargetModel.

Definition at line 1617 of file AIETargetModel.h.

References xilinx::AIE::DmaBdLayout::bufferLength, getDmaBdLimits(), and xilinx::AIE::DmaBdField::mask().

◆ getDmaBdStepBits()

uint32_t xilinx::AIE::AIE4TargetModel::getDmaBdStepBits ( AIETileType tileType) const
inlineoverridevirtual

Return the bit width of the step (stride) field in a DMA buffer descriptor for the given tile type.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1623 of file AIETargetModel.h.

References xilinx::AIE::DmaBdLayout::d1Stride, getDmaBdLimits(), and xilinx::AIE::DmaBdField::width.

◆ getDmaBdWrapBits()

uint32_t xilinx::AIE::AIE4TargetModel::getDmaBdWrapBits ( AIETileType tileType) const
inlineoverridevirtual

Return the bit width of the wrap (size) field in a DMA buffer descriptor for the given tile type.

Used to compute the maximum legal wrap value per dimension.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1620 of file AIETargetModel.h.

References xilinx::AIE::DmaBdLayout::d0Size, getDmaBdLimits(), and xilinx::AIE::DmaBdField::width.

◆ getDmaControlAddress()

uint32_t xilinx::AIE::AIE4TargetModel::getDmaControlAddress ( int col,
int row,
int channel,
AIE::DMAChannelDir direction ) const
overridevirtual

Return the array address of the dma task queue register for the given col, row, channel and direction.

Implements xilinx::AIE::AIETargetModel.

Definition at line 2206 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::getNumDMAChannels(), getTileAddress(), xilinx::AIE::AIETargetModel::isCoreTile(), xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::isMM2S(), and xilinx::AIE::AIETargetModel::isShimNOCTile().

◆ getDmaTaskQueueDepth()

uint32_t xilinx::AIE::AIE4TargetModel::getDmaTaskQueueDepth ( ) const
inlineoverridevirtual

Not modelled yet.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1519 of file AIETargetModel.h.

◆ getLocalLockAddress()

std::optional< uint32_t > xilinx::AIE::AIE4TargetModel::getLocalLockAddress ( uint32_t lockId,
TileID tile ) const
overridevirtual

◆ getLocalMemorySize()

uint32_t xilinx::AIE::AIE4TargetModel::getLocalMemorySize ( ) const
inlineoverridevirtual

Return the size (in bytes) of the local data memory of a core.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1552 of file AIETargetModel.h.

◆ getLockLocalBaseIndex()

std::optional< uint32_t > xilinx::AIE::AIE4TargetModel::getLockLocalBaseIndex ( int localCol,
int localRow,
int lockCol,
int lockRow ) const
overridevirtual

A memtile DMA reaches the locks and memory of the 15 memtiles within seven columns, westmost first; data windows start at 0xB00000.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 2274 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::getLockLocalBaseIndex(), getNumLocks(), and xilinx::AIE::AIETargetModel::isMemTile().

◆ getMaxChannelNumForAdjacentMemTile()

uint32_t xilinx::AIE::AIE4TargetModel::getMaxChannelNumForAdjacentMemTile ( int col,
int row ) const
inlineoverridevirtual

Implements xilinx::AIE::AIETargetModel.

Definition at line 1642 of file AIETargetModel.h.

◆ getMaxLockValue()

uint32_t xilinx::AIE::AIE4TargetModel::getMaxLockValue ( ) const
inlineoverridevirtual

Return the maximum value that can be stored in a lock register.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1566 of file AIETargetModel.h.

◆ getMaxOutOfOrderId()

uint32_t xilinx::AIE::AIE4TargetModel::getMaxOutOfOrderId ( ) const
inlineoverridevirtual

4-bit index into the receiving channel's 16-BD bank.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1516 of file AIETargetModel.h.

◆ getMaxPacketId()

uint32_t xilinx::AIE::AIE4TargetModel::getMaxPacketId ( ) const
inlineoverridevirtual

Return the largest packet id the stream switch can route.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1514 of file AIETargetModel.h.

◆ getMaxRepeatCount()

uint32_t xilinx::AIE::AIE4TargetModel::getMaxRepeatCount ( ) const
inlineoverridevirtual

Return the largest DMA task repeat count (unsupported = 0).

Implements xilinx::AIE::AIETargetModel.

Definition at line 1517 of file AIETargetModel.h.

◆ getMemEast()

std::optional< TileID > xilinx::AIE::AIE4TargetModel::getMemEast ( TileID src) const
overridevirtual

Return the tile ID of the memory to the east of the given tile, if it exists.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1918 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isValidTile().

◆ getMemEastBaseAddress()

uint32_t xilinx::AIE::AIE4TargetModel::getMemEastBaseAddress ( ) const
inlineoverridevirtual

Return the base address in the local address map for a core.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1551 of file AIETargetModel.h.

Referenced by getMemInternalBaseAddress().

◆ getMemInternalBaseAddress()

uint32_t xilinx::AIE::AIE4TargetModel::getMemInternalBaseAddress ( TileID src) const
inlineoverridevirtual

Return the base address in the local address map for a core.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1545 of file AIETargetModel.h.

References getMemEastBaseAddress().

◆ getMemLocalBaseAddress()

std::optional< uint32_t > xilinx::AIE::AIE4TargetModel::getMemLocalBaseAddress ( int localCol,
int localRow,
int memCol,
int memRow ) const
overridevirtual

Return the memory base address (or offset) in the local tile when accessing a neighbor's memory or an empty optional if an invalid neighbor is given Takes into account differences between Memory and Core tiles.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 2286 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::getMemLocalBaseAddress(), getMemTileSize(), and xilinx::AIE::AIETargetModel::isMemTile().

◆ getMemNorth()

std::optional< TileID > xilinx::AIE::AIE4TargetModel::getMemNorth ( TileID src) const
inlineoverridevirtual

Return the tile ID of the memory to the north of the given tile, if it exists.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1528 of file AIETargetModel.h.

◆ getMemNorthBaseAddress()

uint32_t xilinx::AIE::AIE4TargetModel::getMemNorthBaseAddress ( ) const
inlineoverridevirtual

Return the base address in the local address map for a core.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1550 of file AIETargetModel.h.

◆ getMemSouth()

std::optional< TileID > xilinx::AIE::AIE4TargetModel::getMemSouth ( TileID src) const
inlineoverridevirtual

Return the tile ID of the memory to the south of the given tile, if it exists.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1531 of file AIETargetModel.h.

◆ getMemSouthBaseAddress()

uint32_t xilinx::AIE::AIE4TargetModel::getMemSouthBaseAddress ( ) const
inlineoverridevirtual

Return the base address in the local address map for a core.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1548 of file AIETargetModel.h.

◆ getMemTileSize()

uint32_t xilinx::AIE::AIE4TargetModel::getMemTileSize ( ) const
inlineoverridevirtual

Return the size (in bytes) of a MemTile.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1638 of file AIETargetModel.h.

Referenced by getMemLocalBaseAddress().

◆ getMemWest()

std::optional< TileID > xilinx::AIE::AIE4TargetModel::getMemWest ( TileID ) const
inlineoverridevirtual

A core reaches only its own data memory, through the east window.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1524 of file AIETargetModel.h.

◆ getMemWestBaseAddress()

uint32_t xilinx::AIE::AIE4TargetModel::getMemWestBaseAddress ( ) const
inlineoverridevirtual

Return the base address in the local address map for a core.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1549 of file AIETargetModel.h.

◆ getNumArbiters()

uint32_t xilinx::AIE::AIE4TargetModel::getNumArbiters ( ) const
inlineoverridevirtual

Return the number of arbiters per stream switch.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1512 of file AIETargetModel.h.

◆ getNumBanks()

uint32_t xilinx::AIE::AIE4TargetModel::getNumBanks ( int col,
int row ) const
inlineoverridevirtual

Return the number of memory banks of a given tile.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1639 of file AIETargetModel.h.

References xilinx::AIE::AIETargetModel::isMemTile().

◆ getNumBDs()

uint32_t xilinx::AIE::AIE4TargetModel::getNumBDs ( AIETileType tileType) const
inlineoverridevirtual

16 ids per core tile or memtile channel pool; 32 across two shim banks.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1580 of file AIETargetModel.h.

Referenced by getDmaBdAddress(), and getTotalNumBDs().

◆ getNumBDsInPool()

uint32_t xilinx::AIE::AIE4TargetModel::getNumBDsInPool ( int col,
int row,
uint32_t poolId ) const
overridevirtual

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1981 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isShimNOCTile().

◆ getNumControllersPerColumn()

uint32_t xilinx::AIE::AIE4TargetModel::getNumControllersPerColumn ( ) const
inlineoverridevirtual

Number of microcontrollers (uC) per column.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1521 of file AIETargetModel.h.

◆ getNumDestShimMuxConnections()

uint32_t xilinx::AIE::AIE4TargetModel::getNumDestShimMuxConnections ( int col,
int row,
WireBundle bundle ) const
overridevirtual

Return the number of destinations of connections inside a shimmux.

These are the targets of connect operations in the switchbox.

Implements xilinx::AIE::AIETargetModel.

Definition at line 2516 of file AIETargetModel.cpp.

◆ getNumDestSwitchboxConnections()

uint32_t xilinx::AIE::AIE4TargetModel::getNumDestSwitchboxConnections ( int col,
int row,
WireBundle bundle ) const
overridevirtual

Return the number of destinations of connections inside a switchbox.

These are the targets of connect operations in the switchbox.

Implements xilinx::AIE::AIETargetModel.

Definition at line 2306 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::columns(), xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::AIETargetModel::isShimNOCTile(), and xilinx::AIE::AIETargetModel::rows().

Referenced by isLegalTileConnection().

◆ getNumLocks() [1/2]

uint32_t xilinx::AIE::AIE4TargetModel::getNumLocks ( AIETileType tileType) const
inlineoverridevirtual

Return the number of lock objects for a given tile type.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1559 of file AIETargetModel.h.

Referenced by getLocalLockAddress(), and getLockLocalBaseIndex().

◆ getNumLocks() [2/2]

uint32_t xilinx::AIE::AIETargetModel::getNumLocks ( int col,
int row ) const
inline

Return the number of lock objects for a tile at the given coordinates.

Definition at line 461 of file AIETargetModel.h.

◆ getNumMselsPerArbiter()

uint32_t xilinx::AIE::AIE4TargetModel::getNumMselsPerArbiter ( ) const
inlineoverridevirtual

Return the number of master select values per stream-switch arbiter.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1513 of file AIETargetModel.h.

◆ getNumSlaveSlots()

uint32_t xilinx::AIE::AIE4TargetModel::getNumSlaveSlots ( ) const
inlineoverridevirtual

Return the number of packet-rule slots per stream-switch slave port.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1511 of file AIETargetModel.h.

◆ getNumSourceShimMuxConnections()

uint32_t xilinx::AIE::AIE4TargetModel::getNumSourceShimMuxConnections ( int col,
int row,
WireBundle bundle ) const
overridevirtual

Return the number of sources of connections inside a shimmux.

These are the origins of connect operations in the switchbox.

Implements xilinx::AIE::AIETargetModel.

Definition at line 2521 of file AIETargetModel.cpp.

◆ getNumSourceSwitchboxConnections()

uint32_t xilinx::AIE::AIE4TargetModel::getNumSourceSwitchboxConnections ( int col,
int row,
WireBundle bundle ) const
overridevirtual

Return the number of sources of connections inside a switchbox.

These are the origins of connect operations in the switchbox.

Implements xilinx::AIE::AIETargetModel.

Definition at line 2410 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::columns(), xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::AIETargetModel::isShimNOCTile(), and xilinx::AIE::AIETargetModel::rows().

Referenced by isLegalTileConnection().

◆ getProgramMemorySize()

uint32_t xilinx::AIE::AIE4TargetModel::getProgramMemorySize ( ) const
inlineoverridevirtual

Return the size (in bytes) of a core's program memory.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1553 of file AIETargetModel.h.

◆ getRowFromAddress()

uint32_t xilinx::AIE::AIE4TargetModel::getRowFromAddress ( uint32_t address) const
overridevirtual

Inverse of getTileAddress() for any address in the tile's window.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1904 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::getNumMemTileRows(), xilinx::AIE::AIETargetModel::getRowFieldMask(), and getRowShift().

◆ getRowShift()

uint32_t xilinx::AIE::AIE4TargetModel::getRowShift ( ) const
inlineoverridevirtual

Implements xilinx::AIE::AIETargetModel.

Definition at line 1668 of file AIETargetModel.h.

Referenced by getRowFromAddress(), and getTileAddress().

◆ getShimBurstEncodingsAndLengths()

std::vector< std::pair< uint32_t, uint32_t > > xilinx::AIE::AIE4TargetModel::getShimBurstEncodingsAndLengths ( ) const
overridevirtual

Implements xilinx::AIE::AIETargetModel.

Definition at line 2299 of file AIETargetModel.cpp.

◆ getStreamSwitchPortIndex()

std::optional< uint32_t > xilinx::AIE::AIE4TargetModel::getStreamSwitchPortIndex ( int col,
int row,
WireBundle bundle,
uint32_t channel,
bool master ) const
inlineoverridevirtual

Not modelled yet.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1660 of file AIETargetModel.h.

◆ getTargetArch()

AIEArch xilinx::AIE::AIE4TargetModel::getTargetArch ( ) const
overridevirtual

Return the target architecture.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1892 of file AIETargetModel.cpp.

◆ getTileAddress()

uint32_t xilinx::AIE::AIE4TargetModel::getTileAddress ( int col,
int row ) const
overridevirtual

A memtile spans five address rows (registers, then 4 MiB of data), so memtile row m starts at address row 5m-4 and core row r at r + 4 * the number of memtile rows.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1894 of file AIETargetModel.cpp.

References getColumnShift(), xilinx::AIE::AIETargetModel::getNumMemTileRows(), getRowShift(), xilinx::AIE::AIETargetModel::isCoreTile(), and xilinx::AIE::AIETargetModel::isMemTile().

Referenced by getDmaBdAddress(), and getDmaControlAddress().

◆ getTotalNumBDs()

uint32_t xilinx::AIE::AIE4TargetModel::getTotalNumBDs ( AIETileType tileType) const
inlineoverridevirtual

Memtile: 16 BDs per each of 10 MM2S + 8 S2MM channels.

Shim: 32 data, 8 per ControlMM2S channel and 4 for TraceS2MM.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1585 of file AIETargetModel.h.

References getNumBDs().

◆ hasChannelLocalBdIds()

bool xilinx::AIE::AIE4TargetModel::hasChannelLocalBdIds ( int col,
int row ) const
inlineoverridevirtual

True if data BD ids are channel-local, so a BD's address depends on its channel and direction.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1600 of file AIETargetModel.h.

References xilinx::AIE::AIETargetModel::isMemTile().

◆ hasShimMux()

bool xilinx::AIE::AIE4TargetModel::hasShimMux ( int col,
int row ) const
inlineoverridevirtual

True if the tile's DMA/NOC/PLIO ports sit behind an aie.shim_mux; otherwise its DMA is routed in the switchbox like any other tile's.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1654 of file AIETargetModel.h.

◆ isLegalMemAffinity()

bool xilinx::AIE::AIE4TargetModel::isLegalMemAffinity ( int coreCol,
int coreRow,
int memCol,
int memRow ) const
overridevirtual

◆ isLegalTileConnection()

bool xilinx::AIE::AIE4TargetModel::isLegalTileConnection ( int col,
int row,
WireBundle srcBundle,
int srcChan,
WireBundle dstBundle,
int dstChan ) const
overridevirtual

◆ isMemEast()

bool xilinx::AIE::AIE4TargetModel::isMemEast ( int srcCol,
int srcRow,
int dstCol,
int dstRow ) const
overridevirtual

Return true if src has a memory tile which is East of dst.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1930 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isInternal().

Referenced by isLegalMemAffinity().

◆ isMemNorth()

bool xilinx::AIE::AIE4TargetModel::isMemNorth ( int srcCol,
int srcRow,
int dstCol,
int dstRow ) const
overridevirtual

Return true if src has a memory tile which is North of dst.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1935 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isNorth().

◆ isMemSouth()

bool xilinx::AIE::AIE4TargetModel::isMemSouth ( int srcCol,
int srcRow,
int dstCol,
int dstRow ) const
overridevirtual

Return true if src has a memory tile which is South of dst.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1940 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isSouth().

◆ isMemWest()

bool xilinx::AIE::AIE4TargetModel::isMemWest ( int srcCol,
int srcRow,
int dstCol,
int dstRow ) const
overridevirtual

Return true if src has a memory tile which is West of dst.

Implements xilinx::AIE::AIETargetModel.

Definition at line 1925 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isWest().

◆ loadRegisterDatabase()

std::unique_ptr< RegisterDatabase > xilinx::AIE::AIE4TargetModel::loadRegisterDatabase ( ) const
overrideprotectedvirtual

AIE4 TargetModel.

Reimplemented from xilinx::AIE::AIETargetModel.

Definition at line 1888 of file AIETargetModel.cpp.

References xilinx::AIE::RegisterDatabase::loadAIE4().


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