MLIR-AIE 1.4.5.dev
xilinx::AIE::RegisterDatabase Class Reference

Register and event database for a specific architecture. More...

#include "aie/Dialect/AIE/Util/AIERegisterDatabase.h"

Public Member Functions

const RegisterInfo * lookupRegister (llvm::StringRef name, llvm::StringRef module) const
 Lookup register by name and module.
const RegisterInfo * lookupRegisterByOffset (uint32_t offset, llvm::StringRef module) const
 Lookup register by tile-relative offset and module name.
std::optional< uint32_t > lookupEvent (llvm::StringRef name, llvm::StringRef module) const
 Lookup event by name and module.
std::optional< uint32_t > encodeFieldValue (const BitFieldInfo &field, uint32_t value) const
 Encode a value for a specific bitfield.

Static Public Member Functions

static std::unique_ptr< RegisterDatabase > loadAIE2 ()
 Load database for AIE2 architecture.

Detailed Description

Register and event database for a specific architecture.

Definition at line 60 of file AIERegisterDatabase.h.

Member Function Documentation

◆ encodeFieldValue()

std::optional< uint32_t > RegisterDatabase::encodeFieldValue ( const BitFieldInfo & field,
uint32_t value ) const

Encode a value for a specific bitfield.

Return nullopt if value does not fit in the field's bit width.

Definition at line 298 of file AIERegisterDatabase.cpp.

References xilinx::AIE::BitFieldInfo::bit_start, and xilinx::AIE::BitFieldInfo::getWidth().

◆ loadAIE2()

std::unique_ptr< RegisterDatabase > RegisterDatabase::loadAIE2 ( )
static

Load database for AIE2 architecture.

Definition at line 68 of file AIERegisterDatabase.cpp.

Referenced by xilinx::AIE::AIE2TargetModel::loadRegisterDatabase().

◆ lookupEvent()

std::optional< uint32_t > RegisterDatabase::lookupEvent ( llvm::StringRef name,
llvm::StringRef module ) const

Lookup event by name and module.

Definition at line 286 of file AIERegisterDatabase.cpp.

◆ lookupRegister()

const RegisterInfo * RegisterDatabase::lookupRegister ( llvm::StringRef name,
llvm::StringRef module ) const

Lookup register by name and module.

Definition at line 255 of file AIERegisterDatabase.cpp.

◆ lookupRegisterByOffset()

const RegisterInfo * RegisterDatabase::lookupRegisterByOffset ( uint32_t offset,
llvm::StringRef module ) const

Lookup register by tile-relative offset and module name.

Used by the transaction-binary locmap to decorate each transaction word with its semantic register name. Module names are the JSON keys in aie_registers_aie2.json: "core", "memory", "memory_tile", "shim". Returns nullptr if no register matches.

Definition at line 274 of file AIERegisterDatabase.cpp.


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