From 3ade2e671e5ab463400813fc2846c57edf82bb10 Mon Sep 17 00:00:00 2001 From: Vinod Pangul <146476973+vipangul@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:38:03 -0800 Subject: [PATCH] Fixed GMIO trace config using partition shift in metadata (#8590) --- .../xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp | 9 ++++++--- .../xdp/profile/plugin/aie_trace/edge/aie_trace.cpp | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/runtime_src/xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp b/src/runtime_src/xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp index b0e91d105d6..8d494ab51c2 100644 --- a/src/runtime_src/xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp +++ b/src/runtime_src/xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp @@ -177,9 +177,12 @@ void AieTracePluginUnified::updateAIEDevice(void *handle) { if (device != nullptr) { for (auto &gmioEntry : AIEData.metadata->get_trace_gmios()) { auto gmio = gmioEntry.second; - (db->getStaticInfo()) - .addTraceGMIO(deviceID, gmio.id, gmio.shimColumn, gmio.channelNum, - gmio.streamId, gmio.burstLength); + // Get the column shift for partition + // NOTE: If partition is not used, this value is zero. + // This is later required for GMIO trace offload. + uint8_t startColShift = AIEData.metadata->getPartitionOverlayStartCols().front(); + (db->getStaticInfo()).addTraceGMIO(deviceID, gmio.id, gmio.shimColumn+startColShift, + gmio.channelNum, gmio.streamId, gmio.burstLength); } } diff --git a/src/runtime_src/xdp/profile/plugin/aie_trace/edge/aie_trace.cpp b/src/runtime_src/xdp/profile/plugin/aie_trace/edge/aie_trace.cpp index bbaff846d85..f748b801147 100755 --- a/src/runtime_src/xdp/profile/plugin/aie_trace/edge/aie_trace.cpp +++ b/src/runtime_src/xdp/profile/plugin/aie_trace/edge/aie_trace.cpp @@ -295,6 +295,8 @@ namespace xdp { auto configChannel0 = metadata->getConfigChannel0(); auto configChannel1 = metadata->getConfigChannel1(); + // Get the column shift for partition + // NOTE: If partition is not used, this value is zero. uint8_t startColShift = metadata->getPartitionOverlayStartCols().front(); aie::displayColShiftInfo(startColShift);