intel_8254_timer.hh (9356:b279bad40aa3) intel_8254_timer.hh (10642:9d3b6e7dd205)
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

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

97 /** Event description */
98 virtual const char *description() const;
99
100 friend class Counter;
101
102 void setTo(int clocks);
103
104 int clocksLeft();
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

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

97 /** Event description */
98 virtual const char *description() const;
99
100 friend class Counter;
101
102 void setTo(int clocks);
103
104 int clocksLeft();
105
106 Tick getInterval();
105 };
106
107 private:
108 std::string _name;
109 const std::string &name() const { return _name; }
110
111 unsigned int num;
112
113 CounterEvent event;
114
107 };
108
109 private:
110 std::string _name;
111 const std::string &name() const { return _name; }
112
113 unsigned int num;
114
115 CounterEvent event;
116
117 /** True after startup is called. */
118 bool running;
119
115 /** Initial count value */
116 uint16_t initial_count;
117
118 /** Latched count */
119 uint16_t latched_count;
120
121 /** Interrupt period */
122 uint16_t period;
123
120 /** Initial count value */
121 uint16_t initial_count;
122
123 /** Latched count */
124 uint16_t latched_count;
125
126 /** Interrupt period */
127 uint16_t period;
128
129 /** When to start ticking */
130 Tick offset;
131
124 /** Current mode of operation */
125 uint8_t mode;
126
127 /** Output goes high when the counter reaches zero */
128 bool output_high;
129
130 /** State of the count latch */
131 bool latch_on;

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

176 /**
177 * Reconstruct the state of this object from a checkpoint.
178 * @param base The base name of the counter object.
179 * @param cp The checkpoint use.
180 * @param section The section name of this object
181 */
182 void unserialize(const std::string &base, Checkpoint *cp,
183 const std::string &section);
132 /** Current mode of operation */
133 uint8_t mode;
134
135 /** Output goes high when the counter reaches zero */
136 bool output_high;
137
138 /** State of the count latch */
139 bool latch_on;

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

184 /**
185 * Reconstruct the state of this object from a checkpoint.
186 * @param base The base name of the counter object.
187 * @param cp The checkpoint use.
188 * @param section The section name of this object
189 */
190 void unserialize(const std::string &base, Checkpoint *cp,
191 const std::string &section);
192
193 /** Start ticking */
194 void startup();
184 };
185
186 protected:
187 std::string _name;
188 const std::string &name() const { return _name; }
189
190 /** PIT has three seperate counters */
191 Counter *counter[3];

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

241 /**
242 * Reconstruct the state of this object from a checkpoint.
243 * @param base The base name of the counter object.
244 * @param cp The checkpoint use.
245 * @param section The section name of this object
246 */
247 void unserialize(const std::string &base, Checkpoint *cp,
248 const std::string &section);
195 };
196
197 protected:
198 std::string _name;
199 const std::string &name() const { return _name; }
200
201 /** PIT has three seperate counters */
202 Counter *counter[3];

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

252 /**
253 * Reconstruct the state of this object from a checkpoint.
254 * @param base The base name of the counter object.
255 * @param cp The checkpoint use.
256 * @param section The section name of this object
257 */
258 void unserialize(const std::string &base, Checkpoint *cp,
259 const std::string &section);
260
261 /** Start ticking */
262 void startup();
249};
250
251#endif // __DEV_8254_HH__
263};
264
265#endif // __DEV_8254_HH__