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

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

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

Public Member Functions

 AIE1TargetModel (TargetModelKind k)
 
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.
 
AIEArch getTargetArch () const override
 AIE1 TargetModel.
 
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 getNumMemTileRows () const override
 
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 uint32_t getAddressGenGranularity () const =0
 Return the data bus width of the device.
 
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 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.
 
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)
 

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 306 of file AIETargetModel.h.

Constructor & Destructor Documentation

◆ AIE1TargetModel()

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

Definition at line 308 of file AIETargetModel.h.

Member Function Documentation

◆ classof()

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

◆ getAccumulatorCascadeSize()

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

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 343 of file AIETargetModel.h.

◆ getColumnShift()

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 369 of file AIETargetModel.h.

◆ getLocalLockAddress()

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 299 of file AIETargetModel.cpp.

◆ getLocalMemorySize()

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

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 342 of file AIETargetModel.h.

◆ getMaxLockValue()

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

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 345 of file AIETargetModel.h.

◆ getMemEast()

std::optional< TileID > xilinx::AIE::AIE1TargetModel::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 42 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isValidTile(), and xilinx::AIE::src.

◆ getMemEastBaseAddress()

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

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 341 of file AIETargetModel.h.

Referenced by getMemInternalBaseAddress().

◆ getMemInternalBaseAddress()

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

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 330 of file AIETargetModel.h.

References getMemEastBaseAddress(), getMemWestBaseAddress(), and xilinx::AIE::src.

◆ getMemNorth()

std::optional< TileID > xilinx::AIE::AIE1TargetModel::getMemNorth ( TileID  src) const
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 55 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isValidTile(), and xilinx::AIE::src.

◆ getMemNorthBaseAddress()

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

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 340 of file AIETargetModel.h.

◆ getMemSouth()

std::optional< TileID > xilinx::AIE::AIE1TargetModel::getMemSouth ( TileID  src) const
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 62 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isValidTile(), and xilinx::AIE::src.

◆ getMemSouthBaseAddress()

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

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 338 of file AIETargetModel.h.

◆ getMemTileSize()

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

Return the size (in bytes) of a MemTile.

Implements xilinx::AIE::AIETargetModel.

Definition at line 354 of file AIETargetModel.h.

◆ getMemWest()

std::optional< TileID > xilinx::AIE::AIE1TargetModel::getMemWest ( TileID  src) const
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 29 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isValidTile(), and xilinx::AIE::src.

◆ getMemWestBaseAddress()

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

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 339 of file AIETargetModel.h.

Referenced by getMemInternalBaseAddress().

◆ getNumBanks()

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

Return the number of memory banks of a given tile.

Implements xilinx::AIE::AIETargetModel.

Definition at line 355 of file AIETargetModel.h.

◆ getNumBDs()

uint32_t xilinx::AIE::AIE1TargetModel::getNumBDs ( int  col,
int  row 
) const
inlineoverridevirtual

Return the number of buffer descriptors supported by the DMA in the given tile.

Implements xilinx::AIE::AIETargetModel.

Definition at line 348 of file AIETargetModel.h.

◆ getNumDestShimMuxConnections()

uint32_t xilinx::AIE::AIE1TargetModel::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 226 of file AIETargetModel.cpp.

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

◆ getNumDestSwitchboxConnections()

uint32_t xilinx::AIE::AIE1TargetModel::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 111 of file AIETargetModel.cpp.

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

Referenced by isLegalTileConnection().

◆ getNumLocks()

uint32_t xilinx::AIE::AIE1TargetModel::getNumLocks ( int  col,
int  row 
) const
inlineoverridevirtual

Return the number of lock objects.

Implements xilinx::AIE::AIETargetModel.

Definition at line 344 of file AIETargetModel.h.

◆ getNumMemTileRows()

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 353 of file AIETargetModel.h.

◆ getNumSourceShimMuxConnections()

uint32_t xilinx::AIE::AIE1TargetModel::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 244 of file AIETargetModel.cpp.

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

◆ getNumSourceSwitchboxConnections()

uint32_t xilinx::AIE::AIE1TargetModel::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 167 of file AIETargetModel.cpp.

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

Referenced by isLegalTileConnection().

◆ getRowShift()

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 370 of file AIETargetModel.h.

◆ getShimBurstEncodingsAndLengths()

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

Implements xilinx::AIE::AIETargetModel.

Definition at line 294 of file AIETargetModel.cpp.

◆ getTargetArch()

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

AIE1 TargetModel.

Implements xilinx::AIE::AIETargetModel.

Definition at line 26 of file AIETargetModel.cpp.

◆ isBdChannelAccessible()

bool xilinx::AIE::AIE1TargetModel::isBdChannelAccessible ( int  col,
int  row,
uint32_t  bd_id,
int  channel 
) const
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 349 of file AIETargetModel.h.

◆ isCoreTile()

bool xilinx::AIE::AIE1TargetModel::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 310 of file AIETargetModel.h.

References xilinx::AIE::row.

Referenced by isLegalTileConnection().

◆ isLegalMemAffinity()

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

◆ isLegalTileConnection()

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

◆ isMemEast()

bool xilinx::AIE::AIE1TargetModel::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 77 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isEast(), and xilinx::AIE::AIETargetModel::isInternal().

◆ isMemNorth()

bool xilinx::AIE::AIE1TargetModel::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 84 of file AIETargetModel.cpp.

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

◆ isMemSouth()

bool xilinx::AIE::AIE1TargetModel::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 89 of file AIETargetModel.cpp.

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

◆ isMemTile()

bool xilinx::AIE::AIE1TargetModel::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 311 of file AIETargetModel.h.

Referenced by isLegalTileConnection().

◆ isMemWest()

bool xilinx::AIE::AIE1TargetModel::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 70 of file AIETargetModel.cpp.

References xilinx::AIE::AIETargetModel::isInternal(), and xilinx::AIE::AIETargetModel::isWest().


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