Skip to content

Commit 014bf9c

Browse files
committed
wake up snicth core at host
1 parent a082b3e commit 014bf9c

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

sw/lib/kultest/snax-kul-cluster-gemmx-test.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,11 @@ uint32_t check_gemmx_result_D32(int32_t* output, int32_t* output_golden,
310310
extern uint32_t __global_pointer$;
311311

312312
int kul_cluster_gemmx_test() {
313-
// wake up the dma core
314-
volatile uint32_t *interruptTarget = ((uint32_t *)CLINT_CTRL_BASE) + 6 + 1;
315-
*interruptTarget = 1;
316-
313+
// wake up the dma core, not work...
314+
// if (snrt_cluster_core_idx() == 0) {
315+
// volatile uint32_t *interruptTarget = ((uint32_t *)CLINT_CTRL_BASE) + 6 + 1;
316+
// *interruptTarget = 1;
317+
// }
317318
// !!! set the stack pointer and global pointer !!!
318319
// set it to the end of the KUL cluster TCDM (size = 128KB) address - 4
319320
uint32_t stack_start = snrt_cluster_base_addrl() + 128 * 1024 - 4;

sw/lib/kultest/snax-kul-cluster-xdma-test.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,11 @@ void xdma_wait(unsigned int task_id) {
184184
extern unsigned int __global_pointer$;
185185

186186
int kul_cluster_xdma_test() {
187-
// wake up the dma core
188-
volatile uint32_t *interruptTarget = ((uint32_t *)CLINT_CTRL_BASE) + 6 + 1;
189-
*interruptTarget = 1;
187+
// wake up the dma core, not work...
188+
// if (snrt_cluster_core_idx() == 0) {
189+
// volatile uint32_t *interruptTarget = ((uint32_t *)CLINT_CTRL_BASE) + 6 + 1;
190+
// *interruptTarget = 1;
191+
// }
190192

191193
// !!! set the stack pointer and global pointer !!!
192194
// set it to the end of the KUL cluster TCDM (size = 128KB) address - 4

sw/lib/offload.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ void offloadToCluster(void *function, uint8_t clusterId) {
5454
hartId += _chimera_numCores[i];
5555
}
5656

57-
volatile uint32_t *interruptTarget = ((uint32_t *)CLINT_CTRL_BASE) + hartId;
5857
waitClusterBusy(clusterId);
58+
59+
volatile uint32_t *interruptTarget = ((uint32_t *)CLINT_CTRL_BASE) + hartId;
60+
61+
*interruptTarget = 1;
62+
interruptTarget = ((uint32_t *)CLINT_CTRL_BASE) + hartId + 1;
5963
*interruptTarget = 1;
6064
}
6165

0 commit comments

Comments
 (0)