summaryrefslogtreecommitdiff
path: root/cpu/simple_cpu/simple_cpu.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-07-14 23:01:54 -0400
committerNathan Binkert <binkertn@umich.edu>2004-07-14 23:01:54 -0400
commitbc5c52335c73b761aed596d56eadfaa966e012f3 (patch)
tree637f162772670e15a76b881973efe1b126fa66e2 /cpu/simple_cpu/simple_cpu.hh
parent5c20353129101f34c837bd4caa1129a0127d6d19 (diff)
downloadgem5-bc5c52335c73b761aed596d56eadfaa966e012f3.tar.xz
Add a clock multiplier for simple CPU so that it is possible
to do multiple instructions per cycle. --HG-- extra : convert_revision : 5588ae38071f170792aad93899fef6842b7d818d
Diffstat (limited to 'cpu/simple_cpu/simple_cpu.hh')
-rw-r--r--cpu/simple_cpu/simple_cpu.hh11
1 files changed, 8 insertions, 3 deletions
diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh
index 3692ab511..6ab231e7e 100644
--- a/cpu/simple_cpu/simple_cpu.hh
+++ b/cpu/simple_cpu/simple_cpu.hh
@@ -68,12 +68,11 @@ class SimpleCPU : public BaseCPU
void tick();
private:
- class TickEvent : public Event
+ struct TickEvent : public Event
{
- private:
SimpleCPU *cpu;
+ int multiplier;
- public:
TickEvent(SimpleCPU *c);
void process();
const char *description();
@@ -97,6 +96,12 @@ class SimpleCPU : public BaseCPU
tickEvent.squash();
}
+ public:
+ void setTickMultiplier(int multiplier)
+ {
+ tickEvent.multiplier = multiplier;
+ }
+
private:
Trace::InstRecord *traceData;
template<typename T>