Skip to content

Commit

Permalink
fix(sw): cleanup timer software
Browse files Browse the repository at this point in the history
- remove unused software sub directories and files
  • Loading branch information
P-Miranda committed Jan 11, 2024
1 parent 7176975 commit 178999e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 42 deletions.
13 changes: 0 additions & 13 deletions software/embedded/embedded.mk

This file was deleted.

Empty file removed software/esrc/.empty
Empty file.
2 changes: 1 addition & 1 deletion software/example_firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int main()

//read current timer count, compute elapsed time
elapsed = timer_get_count();
elapsedu = timer_time_us();
elapsedu = elapsed/(FREQ/1000000);

printf("\nExecution time: %d clock cycles\n", (unsigned int) elapsed);
printf("\nExecution time: %dus @%dMHz\n\n", elapsedu, FREQ/1000000);
Expand Down
12 changes: 0 additions & 12 deletions software/pc-emul/pc-emul.mk

This file was deleted.

14 changes: 0 additions & 14 deletions software/software.mk

This file was deleted.

8 changes: 6 additions & 2 deletions software/src/iob-timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ uint64_t timer_get_count() {
// sample timer counter
IOB_TIMER_SET_SAMPLE(1);
IOB_TIMER_SET_SAMPLE(0);
return (*( (volatile uint64_t *) ( base ) ) );
}

uint64_t count = (uint64_t) IOB_TIMER_GET_DATA_HIGH();
count <<= IOB_TIMER_DATA_LOW_W;
count |= (uint64_t) IOB_TIMER_GET_DATA_LOW();

return count;
}

File renamed without changes.

0 comments on commit 178999e

Please sign in to comment.