diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2011-02-11 18:29:35 -0600 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2011-02-11 18:29:35 -0600 |
commit | 453dbc772dba92dbceb44eaeef3c617d17d63e84 (patch) | |
tree | df95652661d48801b532f360e5be634cba6c8104 | |
parent | 59bf0e7eb41494b7de033aa4737da026adddc215 (diff) | |
download | gem5-453dbc772dba92dbceb44eaeef3c617d17d63e84.tar.xz |
ARM: Fix timer calculations.
The timer calculations were a bit off so time would run faster than
it otherwise should
-rw-r--r-- | src/dev/arm/timer_sp804.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dev/arm/timer_sp804.cc b/src/dev/arm/timer_sp804.cc index 04668d268..e6d2657ea 100644 --- a/src/dev/arm/timer_sp804.cc +++ b/src/dev/arm/timer_sp804.cc @@ -178,11 +178,11 @@ Sp804::Timer::restartCounter(uint32_t val) if (!control.timerEnable) return; - Tick time = clock << power(16, control.timerPrescale); + Tick time = clock * power(16, control.timerPrescale); if (control.timerSize) - time *= bits(val,15,0); - else time *= val; + else + time *= bits(val,15,0); if (zeroEvent.scheduled()) { DPRINTF(Timer, "-- Event was already schedule, de-scheduling\n"); |