Make DMR regression work on standalone PULP cluster.

This commit is contained in:
Yvan Tortorella 2023-10-30 22:15:17 +01:00
parent ff4921f39f
commit 90a189ed48
2 changed files with 11 additions and 5 deletions

View file

@ -54,6 +54,11 @@
void pos_hmr_tmr_irq();
void pos_hmr_synch();
/* Allows for setting up proper barriers depending on available cores */
static void hmr_setup_barrier(unsigned int num_avail_cores){
eu_bar_setup(eu_bar_addr(0), num_avail_cores);
}
static inline unsigned int hmr_get_available_config(unsigned int cid) {
return pulp_read32(ARCHI_HMR_GLOBAL_ADDR(cid) + HMR_TOP_OFFSET + HMR_REGISTERS_AVAIL_CONFIG_REG_OFFSET);
}

View file

@ -365,11 +365,12 @@ void __attribute__((naked)) pos_hmr_synch() {
"li t2, " QU(ARCHI_EU_DEMUX_ADDR + EU_BARRIER_DEMUX_OFFSET) " \n\t" // t1 is tmr base address
"add t1, t1, t2 \n\t"
"p.elw zero, " QU(EU_HW_BARR_TRIGGER_WAIT_CLEAR) "(t1) \n\t" // barrier
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
/* Removing the following nops to allow the cores to continue executing */
// "nop\n\t"
// "nop\n\t"
// "nop\n\t"
// "nop\n\t"
// "nop\n\t"
"j pos_hmr_load_part_from_stack \n" // Executes mret
#endif // !ARCHI_HMR_NO_RAPID_RECOVERY