MLIR-AIE 1.4.5.dev
TargetModel.h File Reference
#include "mlir-c/IR.h"
Include dependency graph for TargetModel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEFINE_C_API_STRUCT(name, storage)

Functions

 DEFINE_C_API_STRUCT (AieTargetModel, uint64_t)
MLIR_CAPI_EXPORTED AieTargetModel aieGetTargetModel (uint32_t device)
MLIR_CAPI_EXPORTED uint32_t aieGetTargetModelAddressGenGranularity (AieTargetModel targetModel)
 Returns the data bus width for the target model.
MLIR_CAPI_EXPORTED int aieTargetModelColumns (AieTargetModel targetModel)
 Returns the number of columns in the target model.
MLIR_CAPI_EXPORTED int aieTargetModelRows (AieTargetModel targetModel)
 Returns the number of rows in the target model.
MLIR_CAPI_EXPORTED bool aieTargetModelIsNPU (AieTargetModel targetModel)
 Returns true if this is an NPU target model.
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetTargetArch (AieTargetModel targetModel)
 Returns the AIE architecture (as the underlying value of xilinx::AIE::AIEArch: AIE1=1, AIE2=2, AIE2p=3).
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetTileType (AieTargetModel targetModel, int col, int row)
 Returns the tile type for the given coordinates.
MLIR_CAPI_EXPORTED bool aieTargetModelIsCoreTile (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsMemTile (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsShimNOCTile (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsShimPLTile (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsShimNOCorPLTile (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsInternal (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsWest (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsEast (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsNorth (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsSouth (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsMemWest (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsMemEast (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsMemNorth (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsMemSouth (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED bool aieTargetModelIsLegalMemAffinity (AieTargetModel targetModel, int src_col, int src_row, int dst_col, int dst_row)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemSouthBaseAddress (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemNorthBaseAddress (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemEastBaseAddress (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemWestBaseAddress (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetLocalMemorySize (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDefaultCoreStackSize (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumLocks (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumBDs (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMaxLockValue (AieTargetModel targetModel)
 Largest value a lock register holds.
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMaxRepeatCount (AieTargetModel targetModel)
 Largest repeat count one DMA task queue push can carry (unsupported = 0).
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDmaTaskQueueDepth (AieTargetModel targetModel)
 How many tasks one DMA channel's task queue holds (unsupported = 0).
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDmaBdWrapBits (AieTargetModel targetModel, int col, int row)
 Field widths of a DMA buffer descriptor, which differ by tile type.
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDmaBdStepBits (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDmaBdIterBits (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumMemTileRows (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemTileSize (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumBanks (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED bool aieDmaBdFits (uint32_t device, int col, int row, MlirType elementType, int64_t offset, const int64_t *sizes, const int64_t *strides, int64_t len)
 Whether one DMA buffer descriptor of tile (col, row) on device holds the pattern, as aie-normalize-dma-bd-dims and the DMA lowerings take it.
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMaxChannelNumForAdjacentTile (AieTargetModel targetModel, int col, int row)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumDestSwitchboxConnections (AieTargetModel targetModel, int col, int row, uint32_t bundle)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumSourceSwitchboxConnections (AieTargetModel targetModel, int col, int row, uint32_t bundle)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumDestShimMuxConnections (AieTargetModel targetModel, int col, int row, uint32_t bundle)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumSourceShimMuxConnections (AieTargetModel targetModel, int col, int row, uint32_t bundle)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetColumnShift (AieTargetModel targetModel)
MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetRowShift (AieTargetModel targetModel)

Macro Definition Documentation

◆ DEFINE_C_API_STRUCT

#define DEFINE_C_API_STRUCT ( name,
storage )
Value:
struct name { \
storage d; \
}; \
typedef struct name name

Definition at line 30 of file TargetModel.h.

Function Documentation

◆ aieDmaBdFits()

MLIR_CAPI_EXPORTED bool aieDmaBdFits ( uint32_t device,
int col,
int row,
MlirType elementType,
int64_t offset,
const int64_t * sizes,
const int64_t * strides,
int64_t len )

Whether one DMA buffer descriptor of tile (col, row) on device holds the pattern, as aie-normalize-dma-bd-dims and the DMA lowerings take it.

sizes and strides are four dimensions, outermost first, and len the descriptor's length, all in elements of elementType.

Definition at line 199 of file TargetModel.cpp.

References xilinx::AIE::AIETargetModel::getAddressGenGranularity(), xilinx::AIE::AIETargetModel::getDmaBdMaxLen(), xilinx::AIEX::isLinearModeTransfer(), xilinx::AIE::normalizedBDDims(), xilinx::AIEX::NdDmaPattern::offsets, xilinx::AIEX::patternPassesVerification(), xilinx::AIEX::NdDmaPattern::sizes, and xilinx::AIEX::NdDmaPattern::strides.

◆ aieGetTargetModel()

MLIR_CAPI_EXPORTED AieTargetModel aieGetTargetModel ( uint32_t device)

Definition at line 32 of file TargetModel.cpp.

References xilinx::AIE::getTargetModel().

◆ aieGetTargetModelAddressGenGranularity()

MLIR_CAPI_EXPORTED uint32_t aieGetTargetModelAddressGenGranularity ( AieTargetModel targetModel)

Returns the data bus width for the target model.

Definition at line 37 of file TargetModel.cpp.

◆ aieTargetModelColumns()

MLIR_CAPI_EXPORTED int aieTargetModelColumns ( AieTargetModel targetModel)

Returns the number of columns in the target model.

Definition at line 41 of file TargetModel.cpp.

◆ aieTargetModelGetColumnShift()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetColumnShift ( AieTargetModel targetModel)

Definition at line 303 of file TargetModel.cpp.

◆ aieTargetModelGetDefaultCoreStackSize()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDefaultCoreStackSize ( AieTargetModel targetModel)

Definition at line 146 of file TargetModel.cpp.

◆ aieTargetModelGetDmaBdIterBits()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDmaBdIterBits ( AieTargetModel targetModel,
int col,
int row )

Definition at line 181 of file TargetModel.cpp.

◆ aieTargetModelGetDmaBdStepBits()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDmaBdStepBits ( AieTargetModel targetModel,
int col,
int row )

Definition at line 176 of file TargetModel.cpp.

◆ aieTargetModelGetDmaBdWrapBits()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDmaBdWrapBits ( AieTargetModel targetModel,
int col,
int row )

Field widths of a DMA buffer descriptor, which differ by tile type.

The step field counts address granules, not elements – see aieGetTargetModelAddressGenGranularity.

Definition at line 171 of file TargetModel.cpp.

◆ aieTargetModelGetDmaTaskQueueDepth()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetDmaTaskQueueDepth ( AieTargetModel targetModel)

How many tasks one DMA channel's task queue holds (unsupported = 0).

Definition at line 167 of file TargetModel.cpp.

◆ aieTargetModelGetLocalMemorySize()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetLocalMemorySize ( AieTargetModel targetModel)

Definition at line 142 of file TargetModel.cpp.

◆ aieTargetModelGetMaxChannelNumForAdjacentTile()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMaxChannelNumForAdjacentTile ( AieTargetModel targetModel,
int col,
int row )

◆ aieTargetModelGetMaxLockValue()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMaxLockValue ( AieTargetModel targetModel)

Largest value a lock register holds.

Definition at line 159 of file TargetModel.cpp.

◆ aieTargetModelGetMaxRepeatCount()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMaxRepeatCount ( AieTargetModel targetModel)

Largest repeat count one DMA task queue push can carry (unsupported = 0).

Definition at line 163 of file TargetModel.cpp.

◆ aieTargetModelGetMemEastBaseAddress()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemEastBaseAddress ( AieTargetModel targetModel)

Definition at line 134 of file TargetModel.cpp.

◆ aieTargetModelGetMemNorthBaseAddress()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemNorthBaseAddress ( AieTargetModel targetModel)

Definition at line 130 of file TargetModel.cpp.

◆ aieTargetModelGetMemSouthBaseAddress()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemSouthBaseAddress ( AieTargetModel targetModel)

Definition at line 126 of file TargetModel.cpp.

◆ aieTargetModelGetMemTileSize()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemTileSize ( AieTargetModel targetModel)

Definition at line 190 of file TargetModel.cpp.

◆ aieTargetModelGetMemWestBaseAddress()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetMemWestBaseAddress ( AieTargetModel targetModel)

Definition at line 138 of file TargetModel.cpp.

◆ aieTargetModelGetNumBanks()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumBanks ( AieTargetModel targetModel,
int col,
int row )

Definition at line 194 of file TargetModel.cpp.

◆ aieTargetModelGetNumBDs()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumBDs ( AieTargetModel targetModel,
int col,
int row )

Definition at line 155 of file TargetModel.cpp.

◆ aieTargetModelGetNumDestShimMuxConnections()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumDestShimMuxConnections ( AieTargetModel targetModel,
int col,
int row,
uint32_t bundle )

Definition at line 279 of file TargetModel.cpp.

◆ aieTargetModelGetNumDestSwitchboxConnections()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumDestSwitchboxConnections ( AieTargetModel targetModel,
int col,
int row,
uint32_t bundle )

Definition at line 263 of file TargetModel.cpp.

◆ aieTargetModelGetNumLocks()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumLocks ( AieTargetModel targetModel,
int col,
int row )

Definition at line 150 of file TargetModel.cpp.

◆ aieTargetModelGetNumMemTileRows()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumMemTileRows ( AieTargetModel targetModel)

Definition at line 186 of file TargetModel.cpp.

◆ aieTargetModelGetNumSourceShimMuxConnections()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumSourceShimMuxConnections ( AieTargetModel targetModel,
int col,
int row,
uint32_t bundle )

Definition at line 287 of file TargetModel.cpp.

◆ aieTargetModelGetNumSourceSwitchboxConnections()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetNumSourceSwitchboxConnections ( AieTargetModel targetModel,
int col,
int row,
uint32_t bundle )

Definition at line 271 of file TargetModel.cpp.

◆ aieTargetModelGetRowShift()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetRowShift ( AieTargetModel targetModel)

Definition at line 307 of file TargetModel.cpp.

◆ aieTargetModelGetTargetArch()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetTargetArch ( AieTargetModel targetModel)

Returns the AIE architecture (as the underlying value of xilinx::AIE::AIEArch: AIE1=1, AIE2=2, AIE2p=3).

Definition at line 299 of file TargetModel.cpp.

◆ aieTargetModelGetTileType()

MLIR_CAPI_EXPORTED uint32_t aieTargetModelGetTileType ( AieTargetModel targetModel,
int col,
int row )

Returns the tile type for the given coordinates.

Definition at line 49 of file TargetModel.cpp.

◆ aieTargetModelIsCoreTile()

MLIR_CAPI_EXPORTED bool aieTargetModelIsCoreTile ( AieTargetModel targetModel,
int col,
int row )

Definition at line 54 of file TargetModel.cpp.

◆ aieTargetModelIsEast()

MLIR_CAPI_EXPORTED bool aieTargetModelIsEast ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 85 of file TargetModel.cpp.

◆ aieTargetModelIsInternal()

MLIR_CAPI_EXPORTED bool aieTargetModelIsInternal ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 75 of file TargetModel.cpp.

◆ aieTargetModelIsLegalMemAffinity()

MLIR_CAPI_EXPORTED bool aieTargetModelIsLegalMemAffinity ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 120 of file TargetModel.cpp.

◆ aieTargetModelIsMemEast()

MLIR_CAPI_EXPORTED bool aieTargetModelIsMemEast ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 105 of file TargetModel.cpp.

◆ aieTargetModelIsMemNorth()

MLIR_CAPI_EXPORTED bool aieTargetModelIsMemNorth ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 110 of file TargetModel.cpp.

◆ aieTargetModelIsMemSouth()

MLIR_CAPI_EXPORTED bool aieTargetModelIsMemSouth ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 115 of file TargetModel.cpp.

◆ aieTargetModelIsMemTile()

MLIR_CAPI_EXPORTED bool aieTargetModelIsMemTile ( AieTargetModel targetModel,
int col,
int row )

Definition at line 58 of file TargetModel.cpp.

◆ aieTargetModelIsMemWest()

MLIR_CAPI_EXPORTED bool aieTargetModelIsMemWest ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 100 of file TargetModel.cpp.

◆ aieTargetModelIsNorth()

MLIR_CAPI_EXPORTED bool aieTargetModelIsNorth ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 90 of file TargetModel.cpp.

◆ aieTargetModelIsNPU()

MLIR_CAPI_EXPORTED bool aieTargetModelIsNPU ( AieTargetModel targetModel)

Returns true if this is an NPU target model.

Definition at line 295 of file TargetModel.cpp.

References xilinx::AIE::AIETargetModel::IsNPU.

◆ aieTargetModelIsShimNOCorPLTile()

MLIR_CAPI_EXPORTED bool aieTargetModelIsShimNOCorPLTile ( AieTargetModel targetModel,
int col,
int row )

Definition at line 70 of file TargetModel.cpp.

◆ aieTargetModelIsShimNOCTile()

MLIR_CAPI_EXPORTED bool aieTargetModelIsShimNOCTile ( AieTargetModel targetModel,
int col,
int row )

Definition at line 62 of file TargetModel.cpp.

◆ aieTargetModelIsShimPLTile()

MLIR_CAPI_EXPORTED bool aieTargetModelIsShimPLTile ( AieTargetModel targetModel,
int col,
int row )

Definition at line 66 of file TargetModel.cpp.

◆ aieTargetModelIsSouth()

MLIR_CAPI_EXPORTED bool aieTargetModelIsSouth ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 95 of file TargetModel.cpp.

◆ aieTargetModelIsWest()

MLIR_CAPI_EXPORTED bool aieTargetModelIsWest ( AieTargetModel targetModel,
int src_col,
int src_row,
int dst_col,
int dst_row )

Definition at line 80 of file TargetModel.cpp.

◆ aieTargetModelRows()

MLIR_CAPI_EXPORTED int aieTargetModelRows ( AieTargetModel targetModel)

Returns the number of rows in the target model.

Definition at line 45 of file TargetModel.cpp.

◆ DEFINE_C_API_STRUCT()

DEFINE_C_API_STRUCT ( AieTargetModel ,
uint64_t  )