From aa30d6a1a1b083927b5b63e48e39646dc544538b Mon Sep 17 00:00:00 2001 From: Luca Colagrande Date: Tue, 7 Nov 2023 11:46:15 +0100 Subject: [PATCH] sw: Add fence ensuring Snitch entry point is programmed --- target/sim/sw/host/apps/offload/src/offload.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/sim/sw/host/apps/offload/src/offload.c b/target/sim/sw/host/apps/offload/src/offload.c index 4717d1b83..2b1fc9751 100644 --- a/target/sim/sw/host/apps/offload/src/offload.c +++ b/target/sim/sw/host/apps/offload/src/offload.c @@ -15,6 +15,10 @@ int main() { // Program Snitch entry point and communication buffer program_snitches(); + // Compiler fence to ensure Snitch entry point is + // programmed before Snitches are woken up + asm volatile("" ::: "memory"); + // Start Snitches wakeup_snitches_cl();