MLIR-AIE
Classes | Macros | Functions
AIERT.cpp File Reference
#include "aie/Targets/AIERT.h"
#include "aie/Targets/AIETargetShared.h"
#include "mlir/Support/LogicalResult.h"
#include "xaiengine/xaie_core.h"
#include "xaiengine/xaie_dma.h"
#include "xaiengine/xaie_elfloader.h"
#include "xaiengine/xaie_interrupt.h"
#include "xaiengine/xaie_locks.h"
#include "xaiengine/xaie_mem.h"
#include "xaiengine/xaie_plif.h"
#include "xaiengine/xaie_ss.h"
#include "xaiengine/xaie_txn.h"
#include "xaiengine/xaiegbl.h"
#include "xaiengine/xaiegbl_defs.h"
#include <filesystem>
+ Include dependency graph for AIERT.cpp:

Go to the source code of this file.

Classes

struct  xilinx::AIE::AIERTControl::AIERtImpl
 

Macros

#define AIERC_STR(x)   x, #x
 
#define SHOW_AIERT_ARGS(os, ...)   showAIEXRTArgs(os, #__VA_ARGS__, __VA_ARGS__)
 
#define TRY_XAIE_API_FATAL_ERROR(API, ...)
 
#define TRY_XAIE_API_EMIT_ERROR(OP, API, ...)
 
#define TRY_XAIE_API_LOGICAL_RESULT(API, ...)
 
#define DEBUG_TYPE   "aie-aiert"
 
#define XAIE_BASE_ADDR   0x40000000
 
#define XAIE_SHIM_ROW   0
 
#define XAIE_MEM_TILE_ROW_START   1
 
#define XAIE_PARTITION_BASE_ADDR   0x0
 
#define NPI_ADDR   0x0
 
#define NUM_LOCKS   16
 
#define EVEN_BD_NUM_START   0
 
#define ODD_BD_NUM_START   24
 

Functions

template<typename H1 >
llvm::raw_ostream & showAIEXRTArgs (llvm::raw_ostream &out, const char *label, H1 &&value)
 
template<typename H1 , typename... T>
llvm::raw_ostream & showAIEXRTArgs (llvm::raw_ostream &out, const char *label, H1 &&value, T &&...rest)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const XAie_LocType &loc)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const XAie_Lock &lock)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const XAie_Packet &packet)
 
LogicalResult configureLocksInBdBlock (const AIE::AIETargetModel &targetModel, XAie_DmaDesc &dmaTileBd, Block &block, int col, int row)
 
LogicalResult configureBdInBlock (const AIE::AIETargetModel &targetModel, XAie_DevInst *devInst, XAie_DmaDesc &dmaTileBd, Block &block, int col, int row, int bdId, std::optional< int > nextBdId)
 

Macro Definition Documentation

◆ AIERC_STR

#define AIERC_STR (   x)    x, #x

Definition at line 32 of file AIERT.cpp.

◆ DEBUG_TYPE

#define DEBUG_TYPE   "aie-aiert"

Definition at line 166 of file AIERT.cpp.

◆ EVEN_BD_NUM_START

#define EVEN_BD_NUM_START   0

Definition at line 194 of file AIERT.cpp.

◆ NPI_ADDR

#define NPI_ADDR   0x0

Definition at line 192 of file AIERT.cpp.

◆ NUM_LOCKS

#define NUM_LOCKS   16

Definition at line 193 of file AIERT.cpp.

◆ ODD_BD_NUM_START

#define ODD_BD_NUM_START   24

Definition at line 195 of file AIERT.cpp.

◆ SHOW_AIERT_ARGS

#define SHOW_AIERT_ARGS (   os,
  ... 
)    showAIEXRTArgs(os, #__VA_ARGS__, __VA_ARGS__)

Definition at line 102 of file AIERT.cpp.

◆ TRY_XAIE_API_EMIT_ERROR

#define TRY_XAIE_API_EMIT_ERROR (   OP,
  API,
  ... 
)
Value:
do { \
LLVM_DEBUG(llvm::dbgs() << "trying XAIE API: " << #API << " with args: "); \
LLVM_DEBUG(SHOW_AIERT_ARGS(llvm::dbgs(), __VA_ARGS__)); \
LLVM_DEBUG(llvm::dbgs() << "\n"); \
if (auto r = API(__VA_ARGS__)) \
return OP.emitOpError() << #API " failed with " << AIERCTOSTR.at(r); \
} while (0)
#define SHOW_AIERT_ARGS(os,...)
Definition AIERT.cpp:102

Definition at line 118 of file AIERT.cpp.

◆ TRY_XAIE_API_FATAL_ERROR

#define TRY_XAIE_API_FATAL_ERROR (   API,
  ... 
)
Value:
do { \
LLVM_DEBUG(llvm::dbgs() << "trying XAIE API: " << #API << " with args: "); \
LLVM_DEBUG(SHOW_AIERT_ARGS(llvm::dbgs(), __VA_ARGS__)); \
LLVM_DEBUG(llvm::dbgs() << "\n"); \
if (auto r = API(__VA_ARGS__)) \
llvm::report_fatal_error(llvm::Twine(#API " failed with ") + \
AIERCTOSTR.at(r)); \
} while (0)

Definition at line 108 of file AIERT.cpp.

◆ TRY_XAIE_API_LOGICAL_RESULT

#define TRY_XAIE_API_LOGICAL_RESULT (   API,
  ... 
)
Value:
do { \
LLVM_DEBUG(llvm::dbgs() << "trying XAIE API: " << #API << " with args: "); \
LLVM_DEBUG(SHOW_AIERT_ARGS(llvm::dbgs(), __VA_ARGS__)); \
LLVM_DEBUG(llvm::dbgs() << "\n"); \
if (auto r = API(__VA_ARGS__)) { \
llvm::errs() << #API " failed with " << AIERCTOSTR.at(r); \
return failure(); \
} \
} while (0)

Definition at line 127 of file AIERT.cpp.

◆ XAIE_BASE_ADDR

#define XAIE_BASE_ADDR   0x40000000

Definition at line 187 of file AIERT.cpp.

◆ XAIE_MEM_TILE_ROW_START

#define XAIE_MEM_TILE_ROW_START   1

Definition at line 189 of file AIERT.cpp.

◆ XAIE_PARTITION_BASE_ADDR

#define XAIE_PARTITION_BASE_ADDR   0x0

Definition at line 190 of file AIERT.cpp.

◆ XAIE_SHIM_ROW

#define XAIE_SHIM_ROW   0

Definition at line 188 of file AIERT.cpp.

Function Documentation

◆ configureBdInBlock()

LogicalResult configureBdInBlock ( const AIE::AIETargetModel targetModel,
XAie_DevInst *  devInst,
XAie_DmaDesc &  dmaTileBd,
Block &  block,
int  col,
int  row,
int  bdId,
std::optional< int >  nextBdId 
)

◆ configureLocksInBdBlock()

LogicalResult configureLocksInBdBlock ( const AIE::AIETargetModel targetModel,
XAie_DmaDesc &  dmaTileBd,
Block &  block,
int  col,
int  row 
)

◆ operator<<() [1/3]

llvm::raw_ostream & operator<< ( llvm::raw_ostream &  os,
const XAie_Lock &  lock 
)

Definition at line 174 of file AIERT.cpp.

◆ operator<<() [2/3]

llvm::raw_ostream & operator<< ( llvm::raw_ostream &  os,
const XAie_LocType &  loc 
)

Definition at line 168 of file AIERT.cpp.

◆ operator<<() [3/3]

llvm::raw_ostream & operator<< ( llvm::raw_ostream &  os,
const XAie_Packet &  packet 
)

Definition at line 180 of file AIERT.cpp.

◆ showAIEXRTArgs() [1/2]

template<typename H1 >
llvm::raw_ostream & showAIEXRTArgs ( llvm::raw_ostream &  out,
const char *  label,
H1 &&  value 
)

Definition at line 82 of file AIERT.cpp.

Referenced by showAIEXRTArgs().

◆ showAIEXRTArgs() [2/2]

template<typename H1 , typename... T>
llvm::raw_ostream & showAIEXRTArgs ( llvm::raw_ostream &  out,
const char *  label,
H1 &&  value,
T &&...  rest 
)

Definition at line 88 of file AIERT.cpp.

References showAIEXRTArgs().