diff options
Diffstat (limited to 'dev/tsunami_io.hh')
-rw-r--r-- | dev/tsunami_io.hh | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/dev/tsunami_io.hh b/dev/tsunami_io.hh index d5d106db3..4b28635e8 100644 --- a/dev/tsunami_io.hh +++ b/dev/tsunami_io.hh @@ -51,7 +51,7 @@ class TsunamiIO : public PioDevice /** The size of mappad from the above address */ static const Addr size = 0xff; - struct tm tm; + static struct tm tm; /** * In Tsunami RTC only has two i/o ports one for data and one for @@ -75,6 +75,14 @@ class TsunamiIO : public PioDevice uint8_t mode; /** The status of the PIT */ uint8_t status; + /** The current count of the PIT */ + uint16_t current_count; + /** The latched count of the PIT */ + uint16_t latched_count; + /** The state of the output latch of the PIT */ + bool latch_on; + /** The next count half (byte) to read */ + enum {READ_LSB, READ_MSB} read_byte; public: /** @@ -111,6 +119,17 @@ class TsunamiIO : public PioDevice uint8_t Status(); /** + * Latch the count of the PIT. + */ + void LatchCount(); + + /** + * The current PIT count. + * @return the count of the PIT + */ + uint8_t Read(); + + /** * Serialize this object to the given output stream. * @param os The stream to serialize to. */ @@ -135,6 +154,9 @@ class TsunamiIO : public PioDevice Tsunami* tsunami; Tick interval; + /** Count of the number of RTC interrupts that have occured */ + uint32_t intr_count; + public: /** * RTC Event initializes the RTC event by scheduling an event |