better debugging of DMA operations
[gem5.git] / dev / tsunami_io.hh
index c8c5fd4123d31bf9447b9b00618a2c485cd87288..d507355c353135e04569266f37c94775911ecdf3 100644 (file)
@@ -36,6 +36,7 @@
 #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;
@@ -110,7 +111,20 @@ class TsunamiIO : public PioDevice
          */
         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 &section);
+     };
 
     /**
      * Process RTC timer events and generate interrupts appropriately.
@@ -136,7 +150,20 @@ class TsunamiIO : public PioDevice
            */
           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 &section);
+     };
 
     /** 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
@@ -210,7 +237,8 @@ class TsunamiIO : public PioDevice
      * @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, HierParams *hier, Bus *bus);
+              Addr a, MemoryController *mmu, HierParams *hier, Bus *bus,
+              Tick pio_latency);
 
     /**
      * Create the tm struct from seconds since 1970