Deleted Added
sdiff udiff text old ( 9356:b279bad40aa3 ) new ( 10642:9d3b6e7dd205 )
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

--- 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
107 private:
108 std::string _name;
109 const std::string &name() const { return _name; }
110
111 unsigned int num;
112
113 CounterEvent event;
114
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
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);
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);
249};
250
251#endif // __DEV_8254_HH__