fixed serialization in tsunami_io and tsunami_uart and console
authorAli Saidi <saidi@eecs.umich.edu>
Fri, 4 Jun 2004 18:26:17 +0000 (14:26 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Fri, 4 Jun 2004 18:26:17 +0000 (14:26 -0400)
dev/console.cc:
dev/tsunami_io.cc:
dev/tsunami_uart.cc:
    fixed serialization

--HG--
extra : convert_revision : 1608a116b00007922fa382ddb0c10442a8724f8d

dev/console.cc
dev/tsunami_io.cc
dev/tsunami_uart.cc

index ef3f64d8d08efba201c503f32de67bb404d4b159..a4b82e137b7456827a08611df4cbe30974995d75 100644 (file)
@@ -377,11 +377,15 @@ SimConsole::setPlatform(Platform *p)
 void
 SimConsole::serialize(ostream &os)
 {
+    SERIALIZE_SCALAR(_status);
+    SERIALIZE_SCALAR(_enable);
 }
 
 void
 SimConsole::unserialize(Checkpoint *cp, const std::string &section)
 {
+    UNSERIALIZE_SCALAR(_status);
+    UNSERIALIZE_SCALAR(_enable);
 }
 
 
index b902306a4adda48508aa30dce8b636cc561f75dc..2da313f563f90a0805ae444b5aa7e99098b8eee1 100644 (file)
@@ -380,6 +380,10 @@ TsunamiIO::serialize(std::ostream &os)
 {
     SERIALIZE_SCALAR(timerData);
     SERIALIZE_SCALAR(uip);
+    SERIALIZE_SCALAR(mask1);
+    SERIALIZE_SCALAR(mask2);
+    SERIALIZE_SCALAR(mode1);
+    SERIALIZE_SCALAR(mode2);
     SERIALIZE_SCALAR(picr);
     SERIALIZE_SCALAR(picInterrupting);
     Tick time0when = timer0.when();
@@ -388,6 +392,7 @@ TsunamiIO::serialize(std::ostream &os)
     SERIALIZE_SCALAR(time0when);
     SERIALIZE_SCALAR(time2when);
     SERIALIZE_SCALAR(rtcwhen);
+    SERIALIZE_SCALAR(RTCAddress);
 
 }
 
@@ -396,6 +401,10 @@ TsunamiIO::unserialize(Checkpoint *cp, const std::string &section)
 {
     UNSERIALIZE_SCALAR(timerData);
     UNSERIALIZE_SCALAR(uip);
+    UNSERIALIZE_SCALAR(mask1);
+    UNSERIALIZE_SCALAR(mask2);
+    UNSERIALIZE_SCALAR(mode1);
+    UNSERIALIZE_SCALAR(mode2);
     UNSERIALIZE_SCALAR(picr);
     UNSERIALIZE_SCALAR(picInterrupting);
     Tick time0when;
@@ -407,6 +416,7 @@ TsunamiIO::unserialize(Checkpoint *cp, const std::string &section)
     timer0.reschedule(time0when);
     timer2.reschedule(time2when);
     rtc.reschedule(rtcwhen);
+    UNSERIALIZE_SCALAR(RTCAddress);
 }
 
 BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiIO)
index 1eef249261808eefcbd7d595174a40de02b83cb9..28c97c4cdd7c3914f240874bcc402f7473698e64 100644 (file)
@@ -255,6 +255,14 @@ TsunamiUart::serialize(ostream &os)
     SERIALIZE_SCALAR(next_char);
     SERIALIZE_SCALAR(valid_char);
     SERIALIZE_SCALAR(IER);
+    Tick intrwhen;
+    if (intrEvent.scheduled())
+        intrwhen = intrEvent.when();
+    else
+        intrwhen = 0;
+    SERIALIZE_SCALAR(intrwhen);
+
+
 }
 
 void
@@ -264,6 +272,11 @@ TsunamiUart::unserialize(Checkpoint *cp, const std::string &section)
     UNSERIALIZE_SCALAR(next_char);
     UNSERIALIZE_SCALAR(valid_char);
     UNSERIALIZE_SCALAR(IER);
+    Tick intrwhen;
+    UNSERIALIZE_SCALAR(intrwhen);
+    if (intrwhen != 0)
+        intrEvent.schedule(intrwhen);
+
 }
 
 BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiUart)