Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions profile/device/aie_trace/aie_trace_offload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
* Only compile this on edge+versal build
*/
#if defined (XRT_ENABLE_AIE) && ! defined (XRT_X86_BUILD) && ! defined (XDP_CLIENT_BUILD)
#include <sys/mman.h>
#include "core/include/xrt.h"
#include "core/edge/user/shim.h"
#endif
Expand Down Expand Up @@ -213,10 +212,9 @@ bool AIETraceOffload::initReadTrace()
if(XRT_NULL_BO_EXPORT == boExportHandle) {
throw std::runtime_error("Unable to export BO while attaching to AIE Driver");
}
XAie_MemAttach(devInst, &memInst, 0, 0, 0, prop, boExportHandle);
XAie_MemAttach(devInst, &memInst, 0, 0, bufAllocSz, prop, boExportHandle);

char* vaddr = reinterpret_cast<char *>(mmap(NULL, bufAllocSz, PROT_READ | PROT_WRITE, MAP_SHARED, boExportHandle, 0));
XAie_DmaSetAddrLen(&(gmioDMAInsts[i].shimDmaInst), (uint64_t)vaddr, bufAllocSz);
XAie_DmaSetAddrOffsetLen(&(gmioDMAInsts[i].shimDmaInst), &memInst, 0, static_cast<u32>(bufAllocSz));

XAie_DmaEnableBd(&(gmioDMAInsts[i].shimDmaInst));

Expand Down
9 changes: 2 additions & 7 deletions profile/device/aie_trace/ve2/aie_trace_offload_ve2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@
#include "xdp/profile/plugin/aie_trace/x86/aie_trace_kernel_config.h"

#include <unistd.h>
#include <sys/mman.h>




namespace xdp {


Expand Down Expand Up @@ -152,10 +148,9 @@ bool AIETraceOffload::initReadTrace()
if(XRT_NULL_BO_EXPORT == boExportHandle) {
throw std::runtime_error("Unable to export BO while attaching to AIE Driver");
}
XAie_MemAttach(devInst, &memInst, 0, 0, 0, prop, boExportHandle);
XAie_MemAttach(devInst, &memInst, 0, 0, bufAllocSz, prop, boExportHandle);

char* vaddr = reinterpret_cast<char *>(mmap(NULL, bufAllocSz, PROT_READ | PROT_WRITE, MAP_SHARED, boExportHandle, 0));
XAie_DmaSetAddrLen(&(gmioDMAInsts[i].shimDmaInst), (uint64_t)vaddr, bufAllocSz);
XAie_DmaSetAddrOffsetLen(&(gmioDMAInsts[i].shimDmaInst), &memInst, 0, static_cast<u32>(bufAllocSz));

XAie_DmaEnableBd(&(gmioDMAInsts[i].shimDmaInst));

Expand Down
Loading