delay instead of sync

This commit is contained in:
Stanislaw Kaushanski 2020-09-17 15:39:30 +02:00
parent 0773f51fd3
commit 62da6407d8
2 changed files with 1 additions and 8 deletions

Binary file not shown.

View File

@ -95,12 +95,8 @@ int main() {
int * local_mem_base = (int *) end;
int * plic_b_pending = (int *)(0xA0000000+PLIC_PENDING_OFFSET);
int * local_sync_bit = (int *)(local_mem_base + 10);
volatile int * target_sync_bit = (int *)(target_mem_base + 10);
int hartid = read_csr(mhartid);
*local_sync_bit = 0;
platform_init();
if (hartid == 0) {
@ -112,10 +108,7 @@ int main() {
printf("HW thread ID %d: write value A=0x%x and value B=0x%x to thread 1\n", hartid, val_a, val_b);
}
*local_sync_bit++;
while (*target_sync_bit < *local_sync_bit) {
asm("nop");
}
delayUS(100);
printf("End of execution");
return 0;