From ae875a029e0180164b055ea8a76bc1476802b30a Mon Sep 17 00:00:00 2001 From: Gianna Paulin Date: Mon, 7 Aug 2023 21:42:07 +0200 Subject: [PATCH] snRuntime: include global interrupts also for banshee --- sw/snRuntime/api/global_interrupt_decls.h | 2 ++ sw/snRuntime/src/global_interrupts.c | 2 ++ target/snitch_cluster/sw/runtime/banshee/src/snrt.h | 2 +- .../{rtl/src => common}/snitch_cluster_global_interrupts.h | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) rename target/snitch_cluster/sw/runtime/{rtl/src => common}/snitch_cluster_global_interrupts.h (99%) diff --git a/sw/snRuntime/api/global_interrupt_decls.h b/sw/snRuntime/api/global_interrupt_decls.h index b0281d2c6..4d0157cb2 100644 --- a/sw/snRuntime/api/global_interrupt_decls.h +++ b/sw/snRuntime/api/global_interrupt_decls.h @@ -5,3 +5,5 @@ inline void snrt_int_sw_clear(uint32_t hartid); inline void snrt_int_sw_set(uint32_t hartid); + +inline uint32_t snrt_int_sw_get(uint32_t hartid); diff --git a/sw/snRuntime/src/global_interrupts.c b/sw/snRuntime/src/global_interrupts.c index f2e2a2c28..e85843420 100644 --- a/sw/snRuntime/src/global_interrupts.c +++ b/sw/snRuntime/src/global_interrupts.c @@ -5,3 +5,5 @@ extern void snrt_int_sw_clear(uint32_t hartid); extern void snrt_int_sw_set(uint32_t hartid); + +extern uint32_t snrt_int_sw_get(uint32_t hartid); diff --git a/target/snitch_cluster/sw/runtime/banshee/src/snrt.h b/target/snitch_cluster/sw/runtime/banshee/src/snrt.h index 05e805518..ca221a79e 100644 --- a/target/snitch_cluster/sw/runtime/banshee/src/snrt.h +++ b/target/snitch_cluster/sw/runtime/banshee/src/snrt.h @@ -31,7 +31,7 @@ #include "perf_cnt.h" #include "printf.h" #include "riscv.h" -// #include "snitch_cluster_global_interrupts.h" # what is Banshee equivalent? +#include "snitch_cluster_global_interrupts.h" #include "ssr.h" #include "sync.h" #include "team.h" diff --git a/target/snitch_cluster/sw/runtime/rtl/src/snitch_cluster_global_interrupts.h b/target/snitch_cluster/sw/runtime/common/snitch_cluster_global_interrupts.h similarity index 99% rename from target/snitch_cluster/sw/runtime/rtl/src/snitch_cluster_global_interrupts.h rename to target/snitch_cluster/sw/runtime/common/snitch_cluster_global_interrupts.h index 9d5014a04..0f062df4f 100644 --- a/target/snitch_cluster/sw/runtime/rtl/src/snitch_cluster_global_interrupts.h +++ b/target/snitch_cluster/sw/runtime/common/snitch_cluster_global_interrupts.h @@ -6,6 +6,7 @@ inline void snrt_int_sw_clear(uint32_t hartid) { snrt_int_cluster_clr(1 << hartid); } + inline void snrt_int_sw_set(uint32_t hartid) { snrt_int_cluster_set(1 << hartid); }