MLIR-AIE
Public Member Functions | Static Public Member Functions | List of all members
xilinx::AIE::BaseNPUTargetModel Class Reference

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

+ Inheritance diagram for xilinx::AIE::BaseNPUTargetModel:
+ Collaboration diagram for xilinx::AIE::BaseNPUTargetModel:

Public Member Functions

 BaseNPUTargetModel (TargetModelKind k)
 
int rows () const override
 Return the number of rows in the device.
 
bool isCoreTile (int col, int row) const override
 Return true if the given tile is a 'Core' tile.
 
bool isMemTile (int col, int row) const override
 Return true if the given tile is an AIE2 'Memory' tile.
 
bool isShimPLTile (int col, int row) const override
 Return true if the given tile is a Shim PL interface tile.
 
bool isShimNOCorPLTile (int col, int row) const override
 Return true if the given tile is either a Shim NOC or a Shim PL interface tile.
 
uint32_t getNumMemTileRows () const override
 
- Public Member Functions inherited from xilinx::AIE::AIE2TargetModel
 AIE2TargetModel (TargetModelKind k)
 
AIEArch getTargetArch () const override
 AIE2 TargetModel.
 
uint32_t getAddressGenGranularity () const override
 Return the data bus width of the device.
 
std::optional< TileIDgetMemWest (TileID src) const override
 Return the tile ID of the memory to the west of the given tile, if it exists.
 
std::optional< TileIDgetMemEast (TileID src) const override
 Return the tile ID of the memory to the east of the given tile, if it exists.
 
std::optional< TileIDgetMemNorth (TileID src) const override
 Return the tile ID of the memory to the north of the given tile, if it exists.
 
std::optional< TileIDgetMemSouth (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.
 
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 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 bool isShimNOCTile (int col, int row) const =0
 Return true if the given tile is a Shim NOC 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.
 
void validate () const
 
uint32_t getModelProperties () const
 
void addModelProperty (uint32_t prop)
 
bool hasProperty (ModelProperty Prop) const
 

Static Public Member Functions

static bool classof (const AIETargetModel *model)
 
- Static Public Member Functions inherited from xilinx::AIE::AIE2TargetModel
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 , 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 }
 

Detailed Description

Definition at line 577 of file AIETargetModel.h.

Constructor & Destructor Documentation

◆ BaseNPUTargetModel()

xilinx::AIE::BaseNPUTargetModel::BaseNPUTargetModel ( TargetModelKind  k)
inline

Member Function Documentation

◆ classof()

static bool xilinx::AIE::BaseNPUTargetModel::classof ( const AIETargetModel model)
inlinestatic

◆ getNumMemTileRows()

uint32_t xilinx::AIE::BaseNPUTargetModel::getNumMemTileRows ( ) const
inlineoverridevirtual

Implements xilinx::AIE::AIETargetModel.

Definition at line 599 of file AIETargetModel.h.

Referenced by xilinx::AIE::AIERTControl::AIERTControl().

◆ isCoreTile()

bool xilinx::AIE::BaseNPUTargetModel::isCoreTile ( int  col,
int  row 
) const
inlineoverridevirtual

Return true if the given tile is a 'Core' tile.

These tiles include a Core, TileDMA, tile memory, and stream connections.

Implements xilinx::AIE::AIETargetModel.

Definition at line 588 of file AIETargetModel.h.

References xilinx::AIE::row.

◆ isMemTile()

bool xilinx::AIE::BaseNPUTargetModel::isMemTile ( int  col,
int  row 
) const
inlineoverridevirtual

Return true if the given tile is an AIE2 'Memory' tile.

These tiles include a TileDMA, tile memory, and stream connections, but no core.

Implements xilinx::AIE::AIETargetModel.

Definition at line 589 of file AIETargetModel.h.

References xilinx::AIE::row.

Referenced by xilinx::AIE::AIERTControl::configureBdInBlock(), and xilinx::AIE::AIERTControl::configureLocksInBdBlock().

◆ isShimNOCorPLTile()

bool xilinx::AIE::BaseNPUTargetModel::isShimNOCorPLTile ( int  col,
int  row 
) const
inlineoverridevirtual

Return true if the given tile is either a Shim NOC or a Shim PL interface tile.

Implements xilinx::AIE::AIETargetModel.

Definition at line 595 of file AIETargetModel.h.

References xilinx::AIE::col, xilinx::AIE::AIETargetModel::isShimNOCTile(), isShimPLTile(), and xilinx::AIE::row.

◆ isShimPLTile()

bool xilinx::AIE::BaseNPUTargetModel::isShimPLTile ( int  col,
int  row 
) const
inlineoverridevirtual

Return true if the given tile is a Shim PL interface tile.

These tiles do not include a ShimDMA and instead include connections to the PL. They do not contain any memory.

Implements xilinx::AIE::AIETargetModel.

Reimplemented in xilinx::AIE::NPUTargetModel, and xilinx::AIE::NPU2TargetModel.

Definition at line 591 of file AIETargetModel.h.

Referenced by isShimNOCorPLTile().

◆ rows()

int xilinx::AIE::BaseNPUTargetModel::rows ( ) const
inlineoverridevirtual

Return the number of rows in the device.

Implements xilinx::AIE::AIETargetModel.

Definition at line 584 of file AIETargetModel.h.

Referenced by xilinx::AIE::AIERTControl::AIERTControl().


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