summaryrefslogtreecommitdiff
path: root/src/dev/intel_8254_timer.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-10-09 04:58:24 -0700
committerNathan Binkert <nate@binkert.org>2008-10-09 04:58:24 -0700
commite06321091d4e931ff1a4d753e56d76f9746c3cd2 (patch)
tree75e2049ca5ffc65cbfaefa73804571aa933f015b /src/dev/intel_8254_timer.hh
parent8291d9db0a0bdeecb2a13f28962893ed3659230e (diff)
downloadgem5-e06321091d4e931ff1a4d753e56d76f9746c3cd2.tar.xz
eventq: convert all usage of events to use the new API.
For now, there is still a single global event queue, but this is necessary for making the steps towards a parallelized m5.
Diffstat (limited to 'src/dev/intel_8254_timer.hh')
-rw-r--r--src/dev/intel_8254_timer.hh15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/dev/intel_8254_timer.hh b/src/dev/intel_8254_timer.hh
index 23596a687..439432aed 100644
--- a/src/dev/intel_8254_timer.hh
+++ b/src/dev/intel_8254_timer.hh
@@ -33,16 +33,16 @@
#ifndef __DEV_8254_HH__
#define __DEV_8254_HH__
+#include <string>
+#include <iostream>
+
#include "base/bitunion.hh"
#include "sim/eventq.hh"
#include "sim/host.hh"
#include "sim/serialize.hh"
-#include <string>
-#include <iostream>
-
/** Programmable Interval Timer (Intel 8254) */
-class Intel8254Timer
+class Intel8254Timer : public EventManager
{
BitUnion8(CtrlReg)
Bitfield<7, 6> sel;
@@ -129,8 +129,11 @@ class Intel8254Timer
/** Determine which byte of a 16-bit count value to read/write */
uint8_t read_byte, write_byte;
+ /** Pointer to container */
+ Intel8254Timer *parent;
+
public:
- Counter(const std::string &name);
+ Counter(Intel8254Timer *p, const std::string &name);
/** Latch the current count (if one is not already latched) */
void latchCount();
@@ -183,7 +186,7 @@ class Intel8254Timer
Counter counter1;
Counter counter2;
- Intel8254Timer(const std::string &name);
+ Intel8254Timer(EventManager *em, const std::string &name);
/** Write control word */
void writeControl(const CtrlReg data);