diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-28 12:55:12 -0800 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-28 12:55:12 -0800 |
commit | b90f810575679442d78c0e9cd0c98a057ba4871b (patch) | |
tree | 8882e14d0f8cbee6f7c630ecb2408b62974a32d2 /arch/alpha | |
parent | cec7f73abf841a65bdce38d6eb67a643e4879335 (diff) | |
download | gem5-b90f810575679442d78c0e9cd0c98a057ba4871b.tar.xz |
Revamp serialization to make it easier.
--HG--
extra : convert_revision : c57a538d7cf606dbdf5fa244f92da46bd830e335
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/alpha_memory.cc | 24 | ||||
-rw-r--r-- | arch/alpha/alpha_memory.hh | 5 |
2 files changed, 14 insertions, 15 deletions
diff --git a/arch/alpha/alpha_memory.cc b/arch/alpha/alpha_memory.cc index 83dd5accf..82dd2afa5 100644 --- a/arch/alpha/alpha_memory.cc +++ b/arch/alpha/alpha_memory.cc @@ -192,13 +192,13 @@ AlphaTlb::flushAddr(Addr vaddr, uint8_t asn) void -AlphaTlb::serialize() +AlphaTlb::serialize(ostream &os) { - nameOut(); - - paramOut("size", size); - paramOut("nlu", nlu); + SERIALIZE_MEMBER(size); + SERIALIZE_MEMBER(nlu); + // should just add serialize/unserialize methods to AlphaPTE +#if 0 stringstream buf; for (int i = 0; i < size; i++) { buf.str(""); @@ -237,19 +237,18 @@ AlphaTlb::serialize() ccprintf(buf, "pte%02d.asn", i); paramOut(buf.str(), table[i].asn); } +#endif } void -AlphaTlb::unserialize(IniFile &db, const string &category, ConfigNode *node) +AlphaTlb::unserialize(IniFile &db, const string §ion) { + UNSERIALIZE_MEMBER(size); + UNSERIALIZE_MEMBER(nlu); + +#if 0 string data; stringstream buf; - - db.findDefault(category,"size",data); - to_number(data,size); - db.findDefault(category,"nlu",data); - to_number(data,nlu); - for (int i = 0; i < size; i++) { buf.str(""); ccprintf(buf, "pte%02d.valid", i); @@ -296,6 +295,7 @@ AlphaTlb::unserialize(IniFile &db, const string &category, ConfigNode *node) db.findDefault(category, buf.str(), data); to_number(data, table[i].asn); } +#endif } diff --git a/arch/alpha/alpha_memory.hh b/arch/alpha/alpha_memory.hh index 9b7306bfd..c94ee26c3 100644 --- a/arch/alpha/alpha_memory.hh +++ b/arch/alpha/alpha_memory.hh @@ -73,9 +73,8 @@ class AlphaTlb : public SimObject static void checkCacheability(MemReqPtr req); // Checkpointing - virtual void serialize(); - virtual void unserialize(IniFile &db, const std::string &category, - ConfigNode *node); + virtual void serialize(std::ostream &os); + virtual void unserialize(IniFile &db, const std::string §ion); }; |