summaryrefslogtreecommitdiff
path: root/sim/universe.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-11-03 20:35:05 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2003-11-03 20:35:05 -0800
commite4b52476bc00fe8c0115ee5ec6e9551447cb04a3 (patch)
tree0671e5be86419c60743915af2f3503fa6de28ac4 /sim/universe.cc
parent02795babaf52cbf6f8c29bbb2aecfc0e60b46b63 (diff)
parent29474bdf027fe3396e0be2f6acbe2a6b89136bc2 (diff)
downloadgem5-e4b52476bc00fe8c0115ee5ec6e9551447cb04a3.tar.xz
Automerge
--HG-- extra : convert_revision : 2ca18ecbf04a1de72391073d0a5309fdbbdfefda
Diffstat (limited to 'sim/universe.cc')
-rw-r--r--sim/universe.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sim/universe.cc b/sim/universe.cc
index 8274d84ca..b75b1f78a 100644
--- a/sim/universe.cc
+++ b/sim/universe.cc
@@ -38,6 +38,9 @@ using namespace std;
Tick curTick = 0;
Tick ticksPerSecond;
+double __ticksPerMS;
+double __ticksPerUS;
+double __ticksPerNS;
class UniverseParamContext : public ParamContext
{
@@ -49,10 +52,14 @@ class UniverseParamContext : public ParamContext
UniverseParamContext universe("Universe");
Param<Tick> universe_freq(&universe, "frequency", "tick frequency",
- 200000000);
+ 200000000);
void
UniverseParamContext::checkParams()
{
ticksPerSecond = universe_freq;
+ double freq = double(ticksPerSecond);
+ __ticksPerMS = freq / 1.0e3;
+ __ticksPerUS = freq / 1.0e6;
+ __ticksPerNS = freq / 1.0e9;
}