diff options
| author | Andrew Waterman <andrew@sifive.com> | 2017-01-03 17:45:33 -0800 |
|---|---|---|
| committer | Andrew Waterman <andrew@sifive.com> | 2017-01-03 18:53:28 -0800 |
| commit | 005b1a8f84ff743710ebd693b70d208da583098d (patch) | |
| tree | ebc479178e5e74a3a7ecd5e6e99e3b1cc2a06fb9 /bsp/env/freedom-e300-arty/platform.h | |
| parent | 2398dfda399f445cf114e29b61d9331fddb09b4e (diff) | |
Regularize timing code
Provide get_timer_value() and get_timer_freq() and use them. On Arty,
they use mcycle and the known-fixed core frequency, whereas on HiFive1
they use mtime and the known-fixed mtime frequency.
Diffstat (limited to 'bsp/env/freedom-e300-arty/platform.h')
| -rw-r--r-- | bsp/env/freedom-e300-arty/platform.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bsp/env/freedom-e300-arty/platform.h b/bsp/env/freedom-e300-arty/platform.h index 1f62956..d5d6dda 100644 --- a/bsp/env/freedom-e300-arty/platform.h +++ b/bsp/env/freedom-e300-arty/platform.h @@ -119,4 +119,7 @@ #define HAS_BOARD_BUTTONS #include "hifive1.h" +unsigned long get_timer_freq(void); +uint64_t get_timer_value(void); + #endif /* _SIFIVE_PLATFORM_H */ |
