/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2004 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#ifndef __TSUNAMI_DMA_HH__
#define __TSUNAMI_DMA_HH__
-#include "mem/functional_mem/functional_memory.hh"
+#include "dev/io_device.hh"
+#include "base/range.hh"
#include "dev/tsunami.hh"
+#include "sim/eventq.hh"
/** How often the RTC interrupts */
static const int RTC_RATE = 1024;
* Tsunami I/O device is a catch all for all the south bridge stuff we care
* to implement.
*/
-class TsunamiIO : public FunctionalMemory
+class TsunamiIO : public PioDevice
{
private:
/** The base address of this device */
*/
uint8_t Status();
- };
+ /**
+ * Serialize this object to the given output stream.
+ * @param os The stream to serialize to.
+ */
+ virtual void serialize(std::ostream &os);
+
+
+ /**
+ * Reconstruct the state of this object from a checkpoint.
+ * @param cp The checkpoint use.
+ * @param section The section name of this object
+ */
+ virtual void unserialize(Checkpoint *cp, const std::string §ion);
+ };
/**
* Process RTC timer events and generate interrupts appropriately.
* @return a description
*/
virtual const char *description();
- };
+
+ /**
+ * Serialize this object to the given output stream.
+ * @param os The stream to serialize to.
+ */
+ virtual void serialize(std::ostream &os);
+
+
+ /**
+ * Reconstruct the state of this object from a checkpoint.
+ * @param cp The checkpoint use.
+ * @param section The section name of this object
+ */
+ virtual void unserialize(Checkpoint *cp, const std::string §ion);
+ };
/** uip UpdateInProgess says that the rtc is updating, but we just fake it
* by alternating it on every read of the bit since we are going to
public:
- /** Return the freqency of the RTC */
- uint32_t frequency() const { return RTC_RATE; }
+ /**
+ * Return the freqency of the RTC
+ * @return interrupt rate of the RTC
+ */
+ Tick frequency() const { return RTC_RATE; }
/**
* @param mmu pointer to the memory controller that sends us events.
*/
TsunamiIO(const std::string &name, Tsunami *t, time_t init_time,
- Addr a, MemoryController *mmu);
+ Addr a, MemoryController *mmu, HierParams *hier, Bus *bus,
+ Tick pio_latency);
/**
* Create the tm struct from seconds since 1970
* @param section The section name of this object
*/
virtual void unserialize(Checkpoint *cp, const std::string §ion);
+
+
+ Tick cacheAccess(MemReqPtr &req);
};
#endif // __TSUNAMI_IO_HH__