File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
target/snitch_cluster/sw/apps/redmule Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 70
70
#define REDMULE_MCFG1_PTR 0x10
71
71
#define REDMULE_ARITH_PTR 0x14
72
72
73
+ #define HWPE_EVT_OFFS 0x94
73
74
#define CK_GATE_OFFS 0x9C
74
75
75
76
// OPs definition
@@ -138,6 +139,10 @@ static inline void hwpe_soft_clear() {
138
139
HWPE_WRITE (0 , REDMULE_SOFT_CLEAR );
139
140
}
140
141
142
+ static inline void hwpe_evt_clear (int value ) {
143
+ HWPE_WRITE (value , HWPE_EVT_OFFS );
144
+ }
145
+
141
146
static inline void hwpe_cg_enable () { HWPE_WRITE (1 , CK_GATE_OFFS ); }
142
147
143
148
static inline void hwpe_cg_disable () { HWPE_WRITE (0 , CK_GATE_OFFS ); }
Original file line number Diff line number Diff line change @@ -67,7 +67,11 @@ int main() {
67
67
snrt_cluster_hw_barrier ();
68
68
69
69
if (core_idx == 0 ) {
70
- printf ("Checking RedMulE from core %d\n" , core_idx );
70
+ int status ;
71
+ snrt_interrupt_enable (IRQ_M_HWPE );
72
+ while ((status = hwpe_get_status ()) != 0 ) snrt_wfi ();
73
+ hwpe_evt_clear (1 << core_idx );
74
+ snrt_interrupt_disable (IRQ_M_HWPE );
71
75
72
76
// Disable RedMulE
73
77
hwpe_cg_disable ();
You can’t perform that action at this time.
0 commit comments