|
MLIR-AIE
|
#include "aie/Dialect/AIE/IR/AIETargetModel.h"
Inheritance diagram for xilinx::AIE::AIE2TargetModel:
Collaboration diagram for xilinx::AIE::AIE2TargetModel:Public Member Functions | |
| AIE2TargetModel (TargetModelKind k) | |
| AIEArch | getTargetArch () const override |
| AIE2 TargetModel. | |
| uint32_t | getAddressGenGranularity () const override |
| Return the data bus width of the device. | |
| std::optional< TileID > | getMemWest (TileID src) const override |
| Return the tile ID of the memory to the west of the given tile, if it exists. | |
| 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 src) const override |
| Return the tile ID of the memory to the north of the given tile, if it exists. | |
| std::optional< TileID > | getMemSouth (TileID src) 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 | getAccumulatorCascadeSize () const override |
| Return the size (in bits) of the accumulator/cascade. | |
| uint32_t | getNumLocks (int col, int row) const override |
| Return the number of lock objects. | |
| 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 |
| uint32_t | getNumBDs (int col, int row) const override |
| Return the number of buffer descriptors supported by the DMA in the given tile. | |
| bool | isBdChannelAccessible (int col, int row, uint32_t bd_id, int channel) const override |
Return true iff buffer descriptor bd_id on tile (col, row) can be submitted on channel channel. | |
| uint64_t | getDmaBdAddress (int col, int row, uint32_t bd_id, int channel, AIE::DMAChannelDir direction) const override |
| Return the array address of the dma buffer descriptor for the given col, row, buffer descriptor id, channel and direction. | |
| 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 | isLegalTileConnection (int col, int row, WireBundle srcBundle, int srcChan, WireBundle dstBundle, int dstChan) const override |
| uint32_t | getColumnShift () const override |
| uint32_t | getRowShift () const override |
| std::vector< std::pair< uint32_t, uint32_t > > | getShimBurstEncodingsAndLengths () const override |
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 | rows () const =0 |
| Return the number of rows in the device. | |
| virtual bool | isCoreTile (int col, int row) const =0 |
| Return true if the given tile is a 'Core' tile. | |
| virtual bool | isMemTile (int col, int row) const =0 |
| Return true if the given tile is an AIE2 'Memory' tile. | |
| virtual bool | isShimNOCTile (int col, int row) const =0 |
| Return true if the given tile is a Shim NOC tile. | |
| virtual bool | isShimPLTile (int col, int row) const =0 |
| Return true if the given tile is a Shim PL interface tile. | |
| virtual bool | isShimNOCorPLTile (int col, int row) const =0 |
| Return true if the given tile is either a Shim NOC or a Shim PL interface 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. | |
| std::optional< uint32_t > | getLockLocalBaseIndex (int localCol, int localRow, int lockCol, int lockRow) const |
| Return the lock base index (or offset) in the local tile when accessing a neighbor's lock or an empty optional if an invalid neighbor is given Takes into account differences between Memory and Core tiles. | |
| std::optional< uint32_t > | getMemLocalBaseAddress (int localCol, int localRow, int memCol, int memRow) const |
| 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. | |
| virtual uint32_t | getNumMemTileRows () const =0 |
| void | validate () const |
| uint32_t | getModelProperties () const |
| void | addModelProperty (uint32_t prop) |
| bool | hasProperty (ModelProperty Prop) const |
| virtual bool | isSupportedBlockFormat (std::string const &format) const |
Static Public Member Functions | |
| static bool | classof (const AIETargetModel *model) |
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_AIE2_Last = TK_AIE2_NPU2_Last } |
| enum | ModelProperty { UsesSemaphoreLocks = 1U << 0 , IsNPU = 1U << 1 , IsVirtualized = 1U << 2 , UsesMultiDimensionalBDs = 1U << 3 } |
Definition at line 418 of file AIETargetModel.h.
|
inline |
Definition at line 420 of file AIETargetModel.h.
References xilinx::AIE::AIETargetModel::addModelProperty(), xilinx::AIE::AIETargetModel::UsesMultiDimensionalBDs, and xilinx::AIE::AIETargetModel::UsesSemaphoreLocks.
|
inlinestatic |
Definition at line 515 of file AIETargetModel.h.
References xilinx::AIE::AIETargetModel::getKind(), xilinx::AIE::AIETargetModel::TK_AIE2_Last, and xilinx::AIE::AIETargetModel::TK_AIE2_VE2302.
|
inlineoverridevirtual |
Return the size (in bits) of the accumulator/cascade.
Implements xilinx::AIE::AIETargetModel.
Definition at line 454 of file AIETargetModel.h.
|
inlineoverridevirtual |
Return the data bus width of the device.
Implements xilinx::AIE::AIETargetModel.
Definition at line 428 of file AIETargetModel.h.
|
inlineoverridevirtual |
Implements xilinx::AIE::AIETargetModel.
Definition at line 512 of file AIETargetModel.h.
Referenced by getDmaBdAddress(), and getDmaControlAddress().
|
overridevirtual |
Return the array address of the dma buffer descriptor for the given col, row, buffer descriptor id, channel and direction.
Not all architecture variants will use channel and direction so these have default values.
Implements xilinx::AIE::AIETargetModel.
Definition at line 426 of file AIETargetModel.cpp.
References xilinx::AIE::col, getColumnShift(), getRowShift(), xilinx::AIE::AIETargetModel::isCoreTile(), xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::AIETargetModel::isShimNOCTile(), and xilinx::AIE::row.
|
overridevirtual |
Return the offset of the base address field within the shim dma buffer descriptor.
Implements xilinx::AIE::AIETargetModel.
Definition at line 444 of file AIETargetModel.cpp.
References xilinx::AIE::col, xilinx::AIE::AIETargetModel::isCoreTile(), and xilinx::AIE::row.
|
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 451 of file AIETargetModel.cpp.
References xilinx::AIE::channel, xilinx::AIE::col, getColumnShift(), getRowShift(), xilinx::AIE::AIETargetModel::isCoreTile(), xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::AIETargetModel::isShimNOCTile(), and xilinx::AIE::row.
|
overridevirtual |
Implements xilinx::AIE::AIETargetModel.
Definition at line 764 of file AIETargetModel.cpp.
References getNumLocks(), xilinx::AIE::AIETargetModel::isCoreTile(), xilinx::AIE::AIETargetModel::isMemTile(), and xilinx::AIE::AIETargetModel::isShimNOCorPLTile().
|
inlineoverridevirtual |
Return the size (in bytes) of the local data memory of a core.
Implements xilinx::AIE::AIETargetModel.
Definition at line 453 of file AIETargetModel.h.
|
inlineoverridevirtual |
Implements xilinx::AIE::AIETargetModel.
Definition at line 496 of file AIETargetModel.h.
|
inlineoverridevirtual |
Return the maximum value that can be stored in a lock register.
Implements xilinx::AIE::AIETargetModel.
Definition at line 460 of file AIETargetModel.h.
|
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 365 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isValidTile(), and xilinx::AIE::src.
|
inlineoverridevirtual |
Return the base address in the local address map for a core.
Implements xilinx::AIE::AIETargetModel.
Definition at line 452 of file AIETargetModel.h.
Referenced by getMemInternalBaseAddress().
|
inlineoverridevirtual |
Return the base address in the local address map for a core.
Implements xilinx::AIE::AIETargetModel.
Definition at line 445 of file AIETargetModel.h.
References getMemEastBaseAddress().
|
overridevirtual |
Return the tile ID of the memory to the north of the given tile, if it exists.
Implements xilinx::AIE::AIETargetModel.
Definition at line 374 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isValidTile(), and xilinx::AIE::src.
|
inlineoverridevirtual |
Return the base address in the local address map for a core.
Implements xilinx::AIE::AIETargetModel.
Definition at line 451 of file AIETargetModel.h.
|
overridevirtual |
Return the tile ID of the memory to the south of the given tile, if it exists.
Implements xilinx::AIE::AIETargetModel.
Definition at line 381 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::AIETargetModel::isValidTile(), and xilinx::AIE::src.
|
inlineoverridevirtual |
Return the base address in the local address map for a core.
Implements xilinx::AIE::AIETargetModel.
Definition at line 449 of file AIETargetModel.h.
|
inlineoverridevirtual |
Return the size (in bytes) of a MemTile.
Implements xilinx::AIE::AIETargetModel.
Definition at line 490 of file AIETargetModel.h.
|
overridevirtual |
Return the tile ID of the memory to the west of the given tile, if it exists.
Implements xilinx::AIE::AIETargetModel.
Definition at line 356 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isValidTile(), and xilinx::AIE::src.
|
inlineoverridevirtual |
Return the base address in the local address map for a core.
Implements xilinx::AIE::AIETargetModel.
Definition at line 450 of file AIETargetModel.h.
|
inlineoverridevirtual |
Return the number of memory banks of a given tile.
Implements xilinx::AIE::AIETargetModel.
Definition at line 492 of file AIETargetModel.h.
References xilinx::AIE::col, xilinx::AIE::AIETargetModel::isMemTile(), and xilinx::AIE::row.
|
inlineoverridevirtual |
Return the number of buffer descriptors supported by the DMA in the given tile.
Implements xilinx::AIE::AIETargetModel.
Definition at line 465 of file AIETargetModel.h.
References xilinx::AIE::col, xilinx::AIE::AIETargetModel::isMemTile(), and xilinx::AIE::row.
|
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 626 of file AIETargetModel.cpp.
References xilinx::AIE::col, xilinx::AIE::AIETargetModel::isShimNOCorPLTile(), and xilinx::AIE::row.
|
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 476 of file AIETargetModel.cpp.
References xilinx::AIE::col, xilinx::AIE::AIETargetModel::columns(), xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::AIETargetModel::isShimNOCTile(), xilinx::AIE::AIETargetModel::isShimPLTile(), xilinx::AIE::row, and xilinx::AIE::AIETargetModel::rows().
Referenced by isLegalTileConnection().
|
inlineoverridevirtual |
Return the number of lock objects.
Implements xilinx::AIE::AIETargetModel.
Definition at line 456 of file AIETargetModel.h.
References xilinx::AIE::col, xilinx::AIE::AIETargetModel::isMemTile(), and xilinx::AIE::row.
Referenced by getLocalLockAddress().
|
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 646 of file AIETargetModel.cpp.
References xilinx::AIE::col, xilinx::AIE::AIETargetModel::isShimNOCorPLTile(), and xilinx::AIE::row.
|
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 547 of file AIETargetModel.cpp.
References xilinx::AIE::col, xilinx::AIE::AIETargetModel::columns(), xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::AIETargetModel::isShimNOCTile(), xilinx::AIE::AIETargetModel::isShimPLTile(), xilinx::AIE::row, and xilinx::AIE::AIETargetModel::rows().
Referenced by isLegalTileConnection().
|
inlineoverridevirtual |
Implements xilinx::AIE::AIETargetModel.
Definition at line 513 of file AIETargetModel.h.
Referenced by getDmaBdAddress(), and getDmaControlAddress().
|
overridevirtual |
Implements xilinx::AIE::AIETargetModel.
Reimplemented in xilinx::AIE::BaseNPU2TargetModel.
Definition at line 759 of file AIETargetModel.cpp.
|
overridevirtual |
AIE2 TargetModel.
Implements xilinx::AIE::AIETargetModel.
Reimplemented in xilinx::AIE::BaseNPU2TargetModel.
Definition at line 353 of file AIETargetModel.cpp.
References xilinx::AIE2.
|
inlineoverridevirtual |
Return true iff buffer descriptor bd_id on tile (col, row) can be submitted on channel channel.
Implements xilinx::AIE::AIETargetModel.
Definition at line 469 of file AIETargetModel.h.
References xilinx::AIE::channel, xilinx::AIE::col, xilinx::AIE::AIETargetModel::isMemTile(), and xilinx::AIE::row.
|
overridevirtual |
Return true if core can access the memory in mem.
Implements xilinx::AIE::AIETargetModel.
Definition at line 410 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isEast(), xilinx::AIE::AIETargetModel::isInternal(), isMemEast(), isMemNorth(), isMemSouth(), xilinx::AIE::AIETargetModel::isMemTile(), isMemWest(), and xilinx::AIE::AIETargetModel::isWest().
|
overridevirtual |
Implements xilinx::AIE::AIETargetModel.
Definition at line 665 of file AIETargetModel.cpp.
References xilinx::AIE::col, getNumDestSwitchboxConnections(), getNumSourceSwitchboxConnections(), xilinx::AIE::AIETargetModel::isCoreTile(), xilinx::AIE::AIETargetModel::isMemTile(), xilinx::AIE::AIETargetModel::isShimNOCorPLTile(), and xilinx::AIE::row.
|
overridevirtual |
Return true if src has a memory tile which is East of dst.
Implements xilinx::AIE::AIETargetModel.
Definition at line 395 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isInternal().
Referenced by isLegalMemAffinity().
|
overridevirtual |
Return true if src has a memory tile which is North of dst.
Implements xilinx::AIE::AIETargetModel.
Definition at line 400 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isNorth().
Referenced by isLegalMemAffinity().
|
overridevirtual |
Return true if src has a memory tile which is South of dst.
Implements xilinx::AIE::AIETargetModel.
Definition at line 405 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isSouth().
Referenced by isLegalMemAffinity().
|
overridevirtual |
Return true if src has a memory tile which is West of dst.
Implements xilinx::AIE::AIETargetModel.
Definition at line 390 of file AIETargetModel.cpp.
References xilinx::AIE::AIETargetModel::isWest().
Referenced by isLegalMemAffinity().