projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3316965
)
ARM: fix the calculation of the values in the RV clocks
author
Koan-Sin Tan
<koansin.tan@gmail.com>
Thu, 10 May 2012 23:04:28 +0000
(18:04 -0500)
committer
Koan-Sin Tan
<koansin.tan@gmail.com>
Thu, 10 May 2012 23:04:28 +0000
(18:04 -0500)
This clock is used by the linux scheduler.
src/dev/arm/rv_ctrl.cc
patch
|
blob
|
history
diff --git
a/src/dev/arm/rv_ctrl.cc
b/src/dev/arm/rv_ctrl.cc
index 56d270feafb20210faca29222b5ad8837f07bf88..337ed73ad7a5703a6d1376d9a445e0c5bee77273 100644
(file)
--- 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: