MLIR-AIE
1.4.6.dev
runtime_lib
test_lib
target.h
Go to the documentation of this file.
1
//===- target.h ------------------------------------------------*- C++ -*-===//
2
//
3
// Copyright (C) 2023 Advanced Micro Devices, Inc.
4
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5
//
6
//===----------------------------------------------------------------------===//
7
8
#ifndef AIE_TARGET_H
9
#define AIE_TARGET_H
10
11
#include <list>
12
// See add_aiert_headers for why prebuilt installs need this fallback.
13
#if __has_include(<aie_codegen.h>)
14
#include <aie_codegen.h>
15
#else
16
#include <xaiengine.h>
17
#endif
18
19
struct
ext_mem_model_t
{
20
void
*
virtualAddr
;
21
uint64_t
physicalAddr
;
22
size_t
size
;
23
int
fd
;
// The file descriptor used during allocation
24
XAie_MemInst
MemInst
;
// LibXAIE handle if necessary. This should go away.
25
};
26
27
struct
aie_libxaie_ctx_t
{
28
XAie_Config *
XAieConfig
;
29
XAie_DevInst *
XAieDevInst
;
30
// Some device memory allocators need this to keep track of VA->PA mappings
31
std::list<ext_mem_model_t>
allocations
;
32
};
33
34
#endif
aie_libxaie_ctx_t
Definition
target.h:27
aie_libxaie_ctx_t::XAieDevInst
XAie_DevInst * XAieDevInst
Definition
target.h:29
aie_libxaie_ctx_t::XAieConfig
XAie_Config * XAieConfig
Definition
target.h:28
aie_libxaie_ctx_t::allocations
std::list< ext_mem_model_t > allocations
Definition
target.h:31
ext_mem_model_t
Definition
target.h:19
ext_mem_model_t::MemInst
XAie_MemInst MemInst
Definition
target.h:24
ext_mem_model_t::fd
int fd
Definition
target.h:23
ext_mem_model_t::physicalAddr
uint64_t physicalAddr
Definition
target.h:21
ext_mem_model_t::size
size_t size
Definition
target.h:22
ext_mem_model_t::virtualAddr
void * virtualAddr
Definition
target.h:20
Generated by
1.15.0