diff --git a/profile/plugin/aie_profile/client/aie_profile.cpp b/profile/plugin/aie_profile/client/aie_profile.cpp index a3749953..7f030ab1 100644 --- a/profile/plugin/aie_profile/client/aie_profile.cpp +++ b/profile/plugin/aie_profile/client/aie_profile.cpp @@ -154,7 +154,7 @@ namespace xdp { auto iter0 = configChannel0.find(tile); auto iter1 = configChannel1.find(tile); uint8_t channel0 = (iter0 == configChannel0.end()) ? 0 : iter0->second; - uint8_t channel1 = (iter1 == configChannel1.end()) ? channel0 : iter1->second; + uint8_t channel1 = (iter1 == configChannel1.end()) ? 1 : iter1->second; // Modify events as needed aie::profile::modifyEvents(type, subtype, channel0, startEvents, metadata->getHardwareGen()); diff --git a/profile/plugin/aie_profile/edge/aie_profile.cpp b/profile/plugin/aie_profile/edge/aie_profile.cpp index afc78315..a0ecffbd 100644 --- a/profile/plugin/aie_profile/edge/aie_profile.cpp +++ b/profile/plugin/aie_profile/edge/aie_profile.cpp @@ -339,7 +339,7 @@ namespace xdp { auto iter0 = configChannel0.find(tile); auto iter1 = configChannel1.find(tile); uint8_t channel0 = (iter0 == configChannel0.end()) ? 0 : iter0->second; - uint8_t channel1 = (iter1 == configChannel1.end()) ? channel0 : iter1->second; + uint8_t channel1 = (iter1 == configChannel1.end()) ? 1 : iter1->second; // Modify events as needed aie::profile::modifyEvents(type, subtype, channel0, startEvents, metadata->getHardwareGen()); diff --git a/profile/plugin/aie_profile/ve2/aie_profile.cpp b/profile/plugin/aie_profile/ve2/aie_profile.cpp index 86bb0fc0..1c8b9c11 100644 --- a/profile/plugin/aie_profile/ve2/aie_profile.cpp +++ b/profile/plugin/aie_profile/ve2/aie_profile.cpp @@ -394,7 +394,7 @@ namespace xdp { auto iter0 = configChannel0.find(tile); auto iter1 = configChannel1.find(tile); uint8_t channel0 = (iter0 == configChannel0.end()) ? 0 : iter0->second; - uint8_t channel1 = (iter1 == configChannel1.end()) ? channel0 : iter1->second; + uint8_t channel1 = (iter1 == configChannel1.end()) ? 1 : iter1->second; // Modify events as needed aie::profile::modifyEvents(type, subtype, channel0, startEvents, metadata->getHardwareGen()); @@ -957,7 +957,7 @@ namespace xdp { auto iter0 = configChannel0.find(tile); auto iter1 = configChannel1.find(tile); uint8_t channel0 = (iter0 == configChannel0.end()) ? 0 : iter0->second; - uint8_t channel1 = (iter1 == configChannel1.end()) ? channel0 : iter1->second; + uint8_t channel1 = (iter1 == configChannel1.end()) ? 1 : iter1->second; std::vector channels = {channel0, channel1}; // Modify events as needed diff --git a/profile/plugin/aie_trace/edge/aie_trace.cpp b/profile/plugin/aie_trace/edge/aie_trace.cpp index 3590cf7f..c4959a13 100755 --- a/profile/plugin/aie_trace/edge/aie_trace.cpp +++ b/profile/plugin/aie_trace/edge/aie_trace.cpp @@ -105,7 +105,10 @@ namespace xdp { // Memory/interface tile trace is flushed at end of run memoryTileTraceStartEvent = XAIE_EVENT_TRUE_MEM_TILE; memoryTileTraceEndEvent = XAIE_EVENT_USER_EVENT_1_MEM_TILE; - interfaceTileTraceStartEvent = XAIE_EVENT_TRUE_PL; + // Start on a user event so trace doesn't restart after the end-of-run flush + // Only apply this for VCK190 as VEK280 only has user events 0 and 1 + interfaceTileTraceStartEvent = xdp::aie::isAIE1(hwGen) ? XAIE_EVENT_USER_EVENT_2_PL + : XAIE_EVENT_TRUE_PL; interfaceTileTraceEndEvent = XAIE_EVENT_USER_EVENT_1_PL; } @@ -943,6 +946,12 @@ namespace xdp { (db->getStaticInfo()).addAIECfgTile(deviceId, cfgTile); } // For tiles + // Start interface tile trace now that all tiles are configured + if (interfaceTileTraceStartEvent != XAIE_EVENT_TRUE_PL) { + for (const auto& loc : interfaceTileTraceFlushLocs) + XAie_EventGenerate(aieDevInst, loc, XAIE_PL_MOD, interfaceTileTraceStartEvent); + } + // Report and store trace events per tile for (int m = 0; m < static_cast(module_type::num_types); ++m) { aie::trace::printTraceEventStats(m, mNumTileTraceEvents[m]);