From 005b1a8f84ff743710ebd693b70d208da583098d Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 3 Jan 2017 17:45:33 -0800 Subject: 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. --- bsp/env/freedom-e300-hifive1/platform.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bsp/env/freedom-e300-hifive1/platform.h') diff --git a/bsp/env/freedom-e300-hifive1/platform.h b/bsp/env/freedom-e300-hifive1/platform.h index eca708e..63efc9e 100644 --- a/bsp/env/freedom-e300-hifive1/platform.h +++ b/bsp/env/freedom-e300-hifive1/platform.h @@ -126,6 +126,8 @@ #include "hifive1.h" -uint32_t get_cpu_freq(); +unsigned long get_cpu_freq(void); +unsigned long get_timer_freq(void); +uint64_t get_timer_value(void); #endif /* _SIFIVE_PLATFORM_H */ -- cgit v1.2.3