intel_8254_timer.hh (5642:102cf92b8ea9) intel_8254_timer.hh (6067:c633cdd5ca25)
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

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

93 void process();
94
95 /** Event description */
96 virtual const char *description() const;
97
98 friend class Counter;
99
100 void setTo(int clocks);
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

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

93 void process();
94
95 /** Event description */
96 virtual const char *description() const;
97
98 friend class Counter;
99
100 void setTo(int clocks);
101
102 int clocksLeft();
101 };
102
103 private:
104 std::string _name;
105 const std::string &name() const { return _name; }
106
107 unsigned int num;
108
109 CounterEvent event;
110
103 };
104
105 private:
106 std::string _name;
107 const std::string &name() const { return _name; }
108
109 unsigned int num;
110
111 CounterEvent event;
112
111 /** Current count value */
112 uint16_t count;
113 /** Initial count value */
114 uint16_t initial_count;
113
114 /** Latched count */
115 uint16_t latched_count;
116
117 /** Interrupt period */
118 uint16_t period;
119
120 /** Current mode of operation */

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

136 Intel8254Timer *parent;
137
138 public:
139 Counter(Intel8254Timer *p, const std::string &name, unsigned int num);
140
141 /** Latch the current count (if one is not already latched) */
142 void latchCount();
143
115
116 /** Latched count */
117 uint16_t latched_count;
118
119 /** Interrupt period */
120 uint16_t period;
121
122 /** Current mode of operation */

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

138 Intel8254Timer *parent;
139
140 public:
141 Counter(Intel8254Timer *p, const std::string &name, unsigned int num);
142
143 /** Latch the current count (if one is not already latched) */
144 void latchCount();
145
146 /** Get the current count for this counter */
147 int currentCount();
148
144 /** Set the read/write mode */
145 void setRW(int rw_val);
146
147 /** Set operational mode */
148 void setMode(int mode_val);
149
150 /** Set count encoding */
151 void setBCD(int bcd_val);

--- 93 unchanged lines hidden ---
149 /** Set the read/write mode */
150 void setRW(int rw_val);
151
152 /** Set operational mode */
153 void setMode(int mode_val);
154
155 /** Set count encoding */
156 void setBCD(int bcd_val);

--- 93 unchanged lines hidden ---