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(); |
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 |
113 /** Initial count value */ 114 uint16_t initial_count; |
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 |
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 --- |