diff options
author | Christian Cunningham <cc@localhost> | 2022-03-19 15:15:11 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-19 15:15:11 -0700 |
commit | 2db90ba9e12c66d786bf17d05210b36052976398 (patch) | |
tree | 9e67a5604758fcc92a19c9219b4fe2920fc7ba92 /src/util | |
parent | 22cdaae7a86ff4c457a8770d0af633cbdb310b53 (diff) |
Tick Latency Tracing
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/status.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/util/status.c b/src/util/status.c index cfadd19..456e89d 100644 --- a/src/util/status.c +++ b/src/util/status.c @@ -58,6 +58,24 @@ void output_irq_status(void) } } +void time_status(void) +{ + // Report Sys Timer Stataus + unsigned long systime; + draw_string(0, 8, "Sys Timer Status"); + systime = *(volatile unsigned long*)SYS_TIMER_CS; + draw_hex32(17, 8, systime); + draw_string(17+8, 8, ":"); + unsigned long long tval = get_time(); + draw_hex32(17+8, 8, (tval >> 32)); + draw_hex32(17+8+8, 8, tval); + systime = *(volatile unsigned long*)SYS_TIMER_C0; + draw_hex32(19+14+8+1, 8, systime); + draw_string(19+14+9+8, 8, "|"); + draw_string(19+14+18, 8, " "); + draw_u10(19+14+18, 8, ((unsigned long)tval)/1000000); +} + void status(void) { // OS Info @@ -111,18 +129,5 @@ void status(void) draw_string(0, 7, "Status Updated by Core #"); draw_hex32(24, 7, coren); - // Report Sys Timer Stataus - unsigned long systime; - draw_string(0, 8, "Sys Timer Status"); - systime = *(volatile unsigned long*)SYS_TIMER_CS; - draw_hex32(17, 8, systime); - draw_string(17+8, 8, ":"); - unsigned long long tval = get_time(); - draw_hex32(17+8, 8, (tval >> 32)); - draw_hex32(17+8+8, 8, tval); - systime = *(volatile unsigned long*)SYS_TIMER_C0; - draw_hex32(19+14+8+1, 8, systime); - draw_string(19+14+9+8, 8, "|"); - draw_string(19+14+18, 8, " "); - draw_u10(19+14+18, 8, ((unsigned long)tval)/1000000); + time_status(); } |