summaryrefslogtreecommitdiff
path: root/dev/tsunami_io.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2004-02-11 15:32:30 -0500
committerAli Saidi <saidi@eecs.umich.edu>2004-02-11 15:32:30 -0500
commit0f34a00703bf4dd2cd0ff673e343b72ad5bdc5bd (patch)
tree083880d2725f00a216c7879d924d7c57a360867a /dev/tsunami_io.cc
parentf7c4d57260d1ce43089a3a8e05915be782912632 (diff)
downloadgem5-0f34a00703bf4dd2cd0ff673e343b72ad5bdc5bd.tar.xz
added serializeation code
--HG-- extra : convert_revision : 468f3c739707d167af43562695b604fd7dead661
Diffstat (limited to 'dev/tsunami_io.cc')
-rw-r--r--dev/tsunami_io.cc26
1 files changed, 24 insertions, 2 deletions
diff --git a/dev/tsunami_io.cc b/dev/tsunami_io.cc
index dd2ac3acc..65e411a06 100644
--- a/dev/tsunami_io.cc
+++ b/dev/tsunami_io.cc
@@ -346,13 +346,35 @@ TsunamiIO::clearPIC(uint8_t bitvector)
void
TsunamiIO::serialize(std::ostream &os)
{
- // code should be written
+ SERIALIZE_SCALAR(timerData);
+ SERIALIZE_SCALAR(uip);
+ SERIALIZE_SCALAR(picr);
+ SERIALIZE_SCALAR(picInterrupting);
+ Tick time0when = timer0.when();
+ Tick time2when = timer2.when();
+ Tick rtcwhen = rtc.when();
+ SERIALIZE_SCALAR(time0when);
+ SERIALIZE_SCALAR(time2when);
+ SERIALIZE_SCALAR(rtcwhen);
+
}
void
TsunamiIO::unserialize(Checkpoint *cp, const std::string &section)
{
- //code should be written
+ UNSERIALIZE_SCALAR(timerData);
+ UNSERIALIZE_SCALAR(uip);
+ UNSERIALIZE_SCALAR(picr);
+ UNSERIALIZE_SCALAR(picInterrupting);
+ Tick time0when;
+ Tick time2when;
+ Tick rtcwhen;
+ UNSERIALIZE_SCALAR(time0when);
+ UNSERIALIZE_SCALAR(time2when);
+ UNSERIALIZE_SCALAR(rtcwhen);
+ timer0.reschedule(time0when);
+ timer2.reschedule(time2when);
+ rtc.reschedule(rtcwhen);
}
BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiIO)