#ifndef __DEV_TSUNAMI_IO_HH__
#define __DEV_TSUNAMI_IO_HH__
-#include "base/range.hh"
#include "dev/alpha/tsunami.hh"
+#include "dev/alpha/tsunami_cchip.hh"
#include "dev/intel_8254_timer.hh"
-#include "dev/mc146818.hh"
#include "dev/io_device.hh"
+#include "dev/mc146818.hh"
#include "params/TsunamiIO.hh"
#include "sim/eventq.hh"
*/
class TsunamiIO : public BasicPioDevice
{
- private:
- struct tm tm;
protected:
- class TsunamiRTC : public MC146818
+ class RTC : public MC146818
{
public:
- Tsunami * tsunami;
- TsunamiRTC(const std::string &n, const TsunamiIOParams *p);
+ Tsunami *tsunami;
+ RTC(const std::string &n, const TsunamiIOParams *p);
protected:
void handleEvent()
/** Intel 8253 Periodic Interval Timer */
Intel8254Timer pitimer;
- TsunamiRTC rtc;
+ RTC rtc;
uint8_t rtcAddr;
return dynamic_cast<const Params *>(_params);
}
- virtual Tick read(PacketPtr pkt);
- virtual Tick write(PacketPtr pkt);
+ Tick read(PacketPtr pkt) override;
+ Tick write(PacketPtr pkt) override;
/**
* Post an PIC interrupt to the CPU via the CChip
*/
void clearPIC(uint8_t bitvector);
- /**
- * Serialize this object to the given output stream.
- * @param os The stream to serialize to.
- */
- virtual void serialize(std::ostream &os);
+ void serialize(CheckpointOut &cp) const override;
+ void unserialize(CheckpointIn &cp) override;
/**
- * Reconstruct the state of this object from a checkpoint.
- * @param cp The checkpoint use.
- * @param section The section name of this object
+ * Start running.
*/
- virtual void unserialize(Checkpoint *cp, const std::string §ion);
+ void startup() override;
};