mirror of
https://github.com/saymrwulf/pulp-runtime.git
synced 2026-11-16 08:38:32 +00:00
Make DMR regression work on standalone PULP cluster.
This commit is contained in:
parent
ff4921f39f
commit
90a189ed48
2 changed files with 11 additions and 5 deletions
|
|
@ -54,6 +54,11 @@
|
||||||
void pos_hmr_tmr_irq();
|
void pos_hmr_tmr_irq();
|
||||||
void pos_hmr_synch();
|
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) {
|
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);
|
return pulp_read32(ARCHI_HMR_GLOBAL_ADDR(cid) + HMR_TOP_OFFSET + HMR_REGISTERS_AVAIL_CONFIG_REG_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
"li t2, " QU(ARCHI_EU_DEMUX_ADDR + EU_BARRIER_DEMUX_OFFSET) " \n\t" // t1 is tmr base address
|
||||||
"add t1, t1, t2 \n\t"
|
"add t1, t1, t2 \n\t"
|
||||||
"p.elw zero, " QU(EU_HW_BARR_TRIGGER_WAIT_CLEAR) "(t1) \n\t" // barrier
|
"p.elw zero, " QU(EU_HW_BARR_TRIGGER_WAIT_CLEAR) "(t1) \n\t" // barrier
|
||||||
"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"
|
// "nop\n\t"
|
||||||
"nop\n\t"
|
// "nop\n\t"
|
||||||
|
// "nop\n\t"
|
||||||
"j pos_hmr_load_part_from_stack \n" // Executes mret
|
"j pos_hmr_load_part_from_stack \n" // Executes mret
|
||||||
#endif // !ARCHI_HMR_NO_RAPID_RECOVERY
|
#endif // !ARCHI_HMR_NO_RAPID_RECOVERY
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue