From 84a604876faefa16828913d4613775dca7fc4c91 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 dab7df9b1..bcf6a8234 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();