summaryrefslogtreecommitdiff
path: root/src/dev/arm/rv_ctrl.cc
diff options
context:
space:
mode:
authorKoan-Sin Tan <koansin.tan@gmail.com>2012-05-10 18:04:28 -0500
committerKoan-Sin Tan <koansin.tan@gmail.com>2012-05-10 18:04:28 -0500
commit0b2d5e20d1ae2373e86786333c8f434583e265d1 (patch)
tree3cda12ba284a82f9526b70fb88ee093121e8ea6e /src/dev/arm/rv_ctrl.cc
parent331696582f1a0e164dd6833e9eaee81559d49dff (diff)
downloadgem5-0b2d5e20d1ae2373e86786333c8f434583e265d1.tar.xz
ARM: fix the calculation of the values in the RV clocks
This clock is used by the linux scheduler.
Diffstat (limited to 'src/dev/arm/rv_ctrl.cc')
-rw-r--r--src/dev/arm/rv_ctrl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dev/arm/rv_ctrl.cc b/src/dev/arm/rv_ctrl.cc
index 56d270fea..337ed73ad 100644
--- a/src/dev/arm/rv_ctrl.cc
+++ b/src/dev/arm/rv_ctrl.cc
@@ -65,12 +65,12 @@ RealViewCtrl::read(PacketPtr pkt)
break;
case Clock24:
Tick clk;
- clk = (Tick)(curTick() / (24 * SimClock::Int::us));
+ clk = SimClock::Float::MHz * curTick() * 24;
pkt->set((uint32_t)(clk));
break;
case Clock100:
Tick clk100;
- clk100 = (Tick)(curTick() / (100 * SimClock::Int::us));
+ clk100 = SimClock::Float::MHz * curTick() * 100;
pkt->set((uint32_t)(clk100));
break;
case Flash: