From 52f614207976a76d3d04adc189d5f2412011b572 Mon Sep 17 00:00:00 2001 From: Paul Keller Date: Thu, 12 Dec 2024 21:08:07 +0000 Subject: [PATCH] Minor tweaks for BH cache invalidate --- tt_metal/hw/inc/dataflow_api.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tt_metal/hw/inc/dataflow_api.h b/tt_metal/hw/inc/dataflow_api.h index 9de53728082..5fe53ab5eb0 100644 --- a/tt_metal/hw/inc/dataflow_api.h +++ b/tt_metal/hw/inc/dataflow_api.h @@ -1696,9 +1696,8 @@ inline void noc_async_write_multicast_exclude_region( */ void noc_async_read_barrier(uint8_t noc = noc_index) { WAYPOINT("NRBW"); - do { - invalidate_l1_cache(); - } while (!ncrisc_noc_reads_flushed(noc)); + while (!ncrisc_noc_reads_flushed(noc)); + invalidate_l1_cache(); WAYPOINT("NRBD"); } @@ -1992,10 +1991,9 @@ FORCE_INLINE void noc_async_read_barrier_with_trid(uint32_t trid, uint8_t noc = noc_index) { WAYPOINT("NBTW"); #ifndef ARCH_GRAYSKULL - do { - invalidate_l1_cache(); - } while (!ncrisc_noc_read_with_transaction_id_flushed(noc, trid)); + while (!ncrisc_noc_read_with_transaction_id_flushed(noc, trid)); #endif + invalidate_l1_cache(); WAYPOINT("NBTD"); }