diff --git a/src/runtime_src/xdp/profile/plugin/aie_trace/client/aie_trace.cpp b/src/runtime_src/xdp/profile/plugin/aie_trace/client/aie_trace.cpp index 9fb3e155a38..b4e31358b86 100644 --- a/src/runtime_src/xdp/profile/plugin/aie_trace/client/aie_trace.cpp +++ b/src/runtime_src/xdp/profile/plugin/aie_trace/client/aie_trace.cpp @@ -502,6 +502,7 @@ namespace xdp { /**************************************************************************** * Get channel number based on event + * NOTE: This only covers AIE Tiles and Interface Tiles ***************************************************************************/ int8_t AieTrace_WinImpl::getChannelNumberFromEvent(XAie_Events event) { @@ -518,6 +519,18 @@ namespace xdp { case XAIE_EVENT_DMA_MM2S_0_STALLED_LOCK_MEM: case XAIE_EVENT_DMA_MM2S_0_STREAM_BACKPRESSURE_MEM: case XAIE_EVENT_DMA_MM2S_0_MEMORY_STARVATION_MEM: + case XAIE_EVENT_DMA_S2MM_0_FINISHED_BD_PL: + case XAIE_EVENT_DMA_S2MM_0_START_TASK_PL: + case XAIE_EVENT_DMA_S2MM_0_FINISHED_TASK_PL: + case XAIE_EVENT_DMA_S2MM_0_STALLED_LOCK_PL: + case XAIE_EVENT_DMA_S2MM_0_STREAM_STARVATION_PL: + case XAIE_EVENT_DMA_S2MM_0_MEMORY_BACKPRESSURE_PL: + case XAIE_EVENT_DMA_MM2S_0_FINISHED_BD_PL: + case XAIE_EVENT_DMA_MM2S_0_START_TASK_PL: + case XAIE_EVENT_DMA_MM2S_0_FINISHED_TASK_PL: + case XAIE_EVENT_DMA_MM2S_0_STALLED_LOCK_PL: + case XAIE_EVENT_DMA_MM2S_0_STREAM_BACKPRESSURE_PL: + case XAIE_EVENT_DMA_MM2S_0_MEMORY_STARVATION_PL: return 0; case XAIE_EVENT_DMA_S2MM_1_START_TASK_MEM: case XAIE_EVENT_DMA_S2MM_1_FINISHED_BD_MEM: @@ -531,6 +544,18 @@ namespace xdp { case XAIE_EVENT_DMA_MM2S_1_STALLED_LOCK_MEM: case XAIE_EVENT_DMA_MM2S_1_STREAM_BACKPRESSURE_MEM: case XAIE_EVENT_DMA_MM2S_1_MEMORY_STARVATION_MEM: + case XAIE_EVENT_DMA_S2MM_1_FINISHED_BD_PL: + case XAIE_EVENT_DMA_S2MM_1_START_TASK_PL: + case XAIE_EVENT_DMA_S2MM_1_FINISHED_TASK_PL: + case XAIE_EVENT_DMA_S2MM_1_STALLED_LOCK_PL: + case XAIE_EVENT_DMA_S2MM_1_STREAM_STARVATION_PL: + case XAIE_EVENT_DMA_S2MM_1_MEMORY_BACKPRESSURE_PL: + case XAIE_EVENT_DMA_MM2S_1_FINISHED_BD_PL: + case XAIE_EVENT_DMA_MM2S_1_START_TASK_PL: + case XAIE_EVENT_DMA_MM2S_1_FINISHED_TASK_PL: + case XAIE_EVENT_DMA_MM2S_1_STALLED_LOCK_PL: + case XAIE_EVENT_DMA_MM2S_1_STREAM_BACKPRESSURE_PL: + case XAIE_EVENT_DMA_MM2S_1_MEMORY_STARVATION_PL: return 1; default: return -1; @@ -1349,6 +1374,13 @@ namespace xdp { if (XAie_TraceStopEvent(&aieDevInst, loc, mod, interfaceTileTraceEndEvent) != XAIE_OK) break; cfgTile->interface_tile_trace_config.packet_type = packetType; + auto channelNum = getChannelNumberFromEvent(interfaceEvents.at(0)); + if (channelNum >= 0) { + if (aie::isInputSet(type, metricSet)) + cfgTile->interface_tile_trace_config.mm2s_channels[channelNum] = channelNum; + else + cfgTile->interface_tile_trace_config.s2mm_channels[channelNum] = channelNum; + } } // Interface tiles if (xrt_core::config::get_verbosity() >= static_cast(severity_level::debug)) { 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 de7468fa166..4bbddf8ce55 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 @@ -892,6 +892,13 @@ namespace xdp { if (shimTrace->start() != XAIE_OK) break; cfgTile->interface_tile_trace_config.packet_type = packetType; + auto channelNum = aie::trace::getChannelNumberFromEvent(interfaceEvents.at(0)); + if (channelNum >= 0) { + if (aie::isInputSet(type, metricSet)) + cfgTile->interface_tile_trace_config.mm2s_channels[channelNum] = channelNum; + else + cfgTile->interface_tile_trace_config.s2mm_channels[channelNum] = channelNum; + } } // interface tiles if (aie::isDebugVerbosity()) { diff --git a/src/runtime_src/xdp/profile/plugin/aie_trace/util/aie_trace_util.cpp b/src/runtime_src/xdp/profile/plugin/aie_trace/util/aie_trace_util.cpp index 82ad839c7e8..218c2821b16 100755 --- a/src/runtime_src/xdp/profile/plugin/aie_trace/util/aie_trace_util.cpp +++ b/src/runtime_src/xdp/profile/plugin/aie_trace/util/aie_trace_util.cpp @@ -454,6 +454,7 @@ namespace xdp::aie::trace { /**************************************************************************** * Get channel number based on event + * NOTE: This only covers AIE Tiles and Interface Tiles ***************************************************************************/ int8_t getChannelNumberFromEvent(XAie_Events event) { @@ -470,6 +471,20 @@ namespace xdp::aie::trace { case XAIE_EVENT_DMA_MM2S_0_STALLED_LOCK_MEM: case XAIE_EVENT_DMA_MM2S_0_STREAM_BACKPRESSURE_MEM: case XAIE_EVENT_DMA_MM2S_0_MEMORY_STARVATION_MEM: + case XAIE_EVENT_DMA_S2MM_0_START_BD_PL: + case XAIE_EVENT_DMA_S2MM_0_FINISHED_BD_PL: + case XAIE_EVENT_DMA_S2MM_0_START_TASK_PL: + case XAIE_EVENT_DMA_S2MM_0_FINISHED_TASK_PL: + case XAIE_EVENT_DMA_S2MM_0_STALLED_LOCK_PL: + case XAIE_EVENT_DMA_S2MM_0_STREAM_STARVATION_PL: + case XAIE_EVENT_DMA_S2MM_0_MEMORY_BACKPRESSURE_PL: + case XAIE_EVENT_DMA_MM2S_0_START_BD_PL: + case XAIE_EVENT_DMA_MM2S_0_FINISHED_BD_PL: + case XAIE_EVENT_DMA_MM2S_0_START_TASK_PL: + case XAIE_EVENT_DMA_MM2S_0_FINISHED_TASK_PL: + case XAIE_EVENT_DMA_MM2S_0_STALLED_LOCK_PL: + case XAIE_EVENT_DMA_MM2S_0_STREAM_BACKPRESSURE_PL: + case XAIE_EVENT_DMA_MM2S_0_MEMORY_STARVATION_PL: return 0; case XAIE_EVENT_DMA_S2MM_1_START_TASK_MEM: case XAIE_EVENT_DMA_S2MM_1_FINISHED_BD_MEM: @@ -483,6 +498,20 @@ namespace xdp::aie::trace { case XAIE_EVENT_DMA_MM2S_1_STALLED_LOCK_MEM: case XAIE_EVENT_DMA_MM2S_1_STREAM_BACKPRESSURE_MEM: case XAIE_EVENT_DMA_MM2S_1_MEMORY_STARVATION_MEM: + case XAIE_EVENT_DMA_S2MM_1_START_BD_PL: + case XAIE_EVENT_DMA_S2MM_1_FINISHED_BD_PL: + case XAIE_EVENT_DMA_S2MM_1_START_TASK_PL: + case XAIE_EVENT_DMA_S2MM_1_FINISHED_TASK_PL: + case XAIE_EVENT_DMA_S2MM_1_STALLED_LOCK_PL: + case XAIE_EVENT_DMA_S2MM_1_STREAM_STARVATION_PL: + case XAIE_EVENT_DMA_S2MM_1_MEMORY_BACKPRESSURE_PL: + case XAIE_EVENT_DMA_MM2S_1_START_BD_PL: + case XAIE_EVENT_DMA_MM2S_1_FINISHED_BD_PL: + case XAIE_EVENT_DMA_MM2S_1_START_TASK_PL: + case XAIE_EVENT_DMA_MM2S_1_FINISHED_TASK_PL: + case XAIE_EVENT_DMA_MM2S_1_STALLED_LOCK_PL: + case XAIE_EVENT_DMA_MM2S_1_STREAM_BACKPRESSURE_PL: + case XAIE_EVENT_DMA_MM2S_1_MEMORY_STARVATION_PL: return 1; default: return -1;