Deleted Added
sdiff udiff text old ( 5606:6da7a58b0bc8 ) new ( 5635:b65e232e7755 )
full compact
1/*
2 * Copyright (c) 2004, 2005
3 * The Regents of The University of Michigan
4 * All Rights Reserved
5 *
6 * This code is part of the M5 simulator.
7 *
8 * Permission is granted to use, copy, create derivative works and

--- 30 unchanged lines hidden (view full) ---

39#include "base/bitunion.hh"
40#include "sim/eventq.hh"
41#include "sim/host.hh"
42#include "sim/serialize.hh"
43
44/** Programmable Interval Timer (Intel 8254) */
45class Intel8254Timer : public EventManager
46{
47 BitUnion8(CtrlReg)
48 Bitfield<7, 6> sel;
49 Bitfield<5, 4> rw;
50 Bitfield<3, 1> mode;
51 Bitfield<0> bcd;
52 EndBitUnion(CtrlReg)
53
54 enum SelectVal {

--- 113 unchanged lines hidden (view full) ---

168 * @param base The base name of the counter object.
169 * @param cp The checkpoint use.
170 * @param section The section name of this object
171 */
172 void unserialize(const std::string &base, Checkpoint *cp,
173 const std::string &section);
174 };
175
176 private:
177 std::string _name;
178 const std::string &name() const { return _name; }
179
180 /** PIT has three seperate counters */
181 Counter *counter[3];
182
183 public:
184 /** Public way to access individual counters (avoid array accesses) */
185 Counter counter0;
186 Counter counter1;
187 Counter counter2;
188
189 Intel8254Timer(EventManager *em, const std::string &name);
190
191 /** Write control word */
192 void writeControl(const CtrlReg data);
193
194 /**
195 * Serialize this object to the given output stream.
196 * @param base The base name of the counter object.
197 * @param os The stream to serialize to.
198 */
199 void serialize(const std::string &base, std::ostream &os);
200
201 /**
202 * Reconstruct the state of this object from a checkpoint.
203 * @param base The base name of the counter object.
204 * @param cp The checkpoint use.
205 * @param section The section name of this object
206 */
207 void unserialize(const std::string &base, Checkpoint *cp,
208 const std::string &section);
209};
210
211#endif // __DEV_8254_HH__