summaryrefslogtreecommitdiff
path: root/cpu/base_cpu.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2005-06-01 21:44:00 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2005-06-01 21:44:00 -0400
commit8031cd93b53cd3fe17a5a5f21e8e8bd833398e97 (patch)
tree2a50907134c83a47058e563522aff265d2487756 /cpu/base_cpu.hh
parent3304da9270d4b40f445a5ca94c33d68cc52ccddf (diff)
downloadgem5-8031cd93b53cd3fe17a5a5f21e8e8bd833398e97.tar.xz
Standardize clock parameter names to 'clock'.
Fix description for Bus clock_ratio (no longer a ratio). Add Clock param type (generic Frequency or Latency). cpu/base_cpu.cc: cpu/base_cpu.hh: cpu/beta_cpu/alpha_full_cpu_builder.cc: cpu/simple_cpu/simple_cpu.cc: dev/ide_ctrl.cc: dev/ns_gige.cc: dev/ns_gige.hh: dev/pciconfigall.cc: dev/sinic.cc: dev/tsunami_cchip.cc: dev/tsunami_io.cc: dev/tsunami_pchip.cc: dev/uart.cc: python/m5/objects/BaseCPU.py: python/m5/objects/BaseCache.py: python/m5/objects/BaseSystem.py: python/m5/objects/Bus.py: python/m5/objects/Ethernet.py: python/m5/objects/Root.py: sim/universe.cc: Standardize clock parameter names to 'clock'. Fix description for Bus clock_ratio (no longer a ratio). python/m5/config.py: Minor tweaks on Frequency/Latency: - added new Clock param type to avoid ambiguities - factored out init code into getLatency() - made RootFrequency *not* a subclass of Frequency so it can't be directly assigned to a Frequency paremeter --HG-- extra : convert_revision : fc4bb8562df171b454bbf696314cda57e1ec8506
Diffstat (limited to 'cpu/base_cpu.hh')
-rw-r--r--cpu/base_cpu.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpu/base_cpu.hh b/cpu/base_cpu.hh
index ea12460db..f38a6c939 100644
--- a/cpu/base_cpu.hh
+++ b/cpu/base_cpu.hh
@@ -48,12 +48,12 @@ class BaseCPU : public SimObject
{
protected:
// CPU's clock period in terms of the number of ticks of curTime.
- Tick cycleTime;
+ Tick clock;
public:
- inline Tick frequency() const { return Clock::Frequency / cycleTime; }
- inline Tick cycles(int numCycles) const { return cycleTime * numCycles; }
- inline Tick curCycle() const { return curTick / cycleTime; }
+ inline Tick frequency() const { return Clock::Frequency / clock; }
+ inline Tick cycles(int numCycles) const { return clock * numCycles; }
+ inline Tick curCycle() const { return curTick / clock; }
#ifdef FULL_SYSTEM
protected:
@@ -106,7 +106,7 @@ class BaseCPU : public SimObject
Counter max_insts_all_threads;
Counter max_loads_any_thread;
Counter max_loads_all_threads;
- Tick cycleTime;
+ Tick clock;
bool functionTrace;
Tick functionTraceStart;
#ifdef FULL_SYSTEM