[ARM] fix the calculation of the values in the 24 MHz clock
Review Request #1182 - Created May 8, 2012 and submitted
| Information | |
|---|---|
| Koan-Sin Tan | |
| gem5 | |
| Reviewers | |
| Default | |
fix the calculation of the value in the system register for the 24 MHz clock Let x be the value, currTick() / Frequency = x / (24 x 10^6) x = curTick() * 24 / SimClock::Int::us on realview platform, sched_clock() relies on the 24 MHz. So does the timestamp for printk(). The original calculation is problematic. Similar calculation for the 100 Hz register. Let x be the value, currTick() / Frequency = x / 100 x = curTick() * 100 / Frequency
Issue Summary
| Description | From | Last Updated | Status |
|---|---|---|---|
| Why not just make it 24.0? Alternatively (curTick() / us) * 24? | Andreas Hansson | May 8, 2012, 8:31 p.m. | Open |
| What about 100 MHz clock? | Ali Saidi | May 9, 2012, 12:47 a.m. | Open |
| Very minor thing, but we might as well put this on one line: Tick clk = ...; | Andreas Hansson | May 9, 2012, 6:36 p.m. | Open |
| For symmetry, could this be SimClock::Int::s? | Andreas Hansson | May 9, 2012, 6:36 p.m. | Open |
Summary: |
|
|||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
-
src/dev/arm/rv_ctrl.cc (Diff revision 1) -
Why not just make it 24.0? Alternatively (curTick() / us) * 24?
-
src/dev/arm/rv_ctrl.cc (Diff revision 1) -
What about 100 MHz clock?
Thanks for noticing this and providing a fix. I'll try to commit it in the next few days.
Change Summary:
Add fix for the 100 Hz clock. See previous discussion with Ali. I don't know if Linux kernel uses it though.
Summary: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+4 -4) |
-
src/dev/arm/rv_ctrl.cc (Diff revision 2) -
Very minor thing, but we might as well put this on one line: Tick clk = ...;
-
src/dev/arm/rv_ctrl.cc (Diff revision 2) -
For symmetry, could this be SimClock::Int::s?
