though most objects don't actually serialize any data.
arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
arch/alpha/isa_traits.hh:
cpu/exec_context.cc:
cpu/exec_context.hh:
cpu/simple_cpu/simple_cpu.hh:
dev/alpha_access.h:
dev/alpha_console.cc:
dev/alpha_console.hh:
dev/console.cc:
dev/console.hh:
Change unserialize param from IniFile& to const IniFile*.
cpu/simple_cpu/simple_cpu.cc:
Change unserialize param from IniFile& to const IniFile*.
Make unserialize call ExecContext::unserialize.
sim/eventq.cc:
Rename MainEventQueue (no spaces) for easier parsing in checkpoints.
Disable event serialization for now, so we can focus on the easy stuff.
sim/serialize.cc:
Change paramIn and arrayParamIn param from IniFile& to const IniFile*.
sim/serialize.hh:
Change unserialize, paramIn, and arrayParamIn params from IniFile& to const IniFile*.
--HG--
extra : convert_revision :
6e8853ed375eddec0e140c95a01dd51bd225f7b9
}
void
-AlphaTlb::unserialize(IniFile &db, const string §ion)
+AlphaTlb::unserialize(const IniFile *db, const string §ion)
{
UNSERIALIZE_MEMBER(size);
UNSERIALIZE_MEMBER(nlu);
// Checkpointing
virtual void serialize(std::ostream &os);
- virtual void unserialize(IniFile &db, const std::string §ion);
+ virtual void unserialize(const IniFile *db, const std::string §ion);
};
static void serializeSpecialRegs(const Serializeable::Proxy &proxy,
const RegFile ®s);
- static void unserializeSpecialRegs(IniFile &db,
+ static void unserializeSpecialRegs(const IniFile *db,
const std::string &category,
ConfigNode *node,
RegFile ®s);
void
-ExecContext::unserialize(IniFile &db, const std::string §ion)
+ExecContext::unserialize(const IniFile *db, const std::string §ion)
{
UNSERIALIZE_ARRAY(regs.intRegFile, NumIntRegs);
UNSERIALIZE_ARRAY(regs.floatRegFile.q, NumFloatRegs);
void regStats(const std::string &name);
void serialize(std::ostream &os);
- void unserialize(IniFile &db, const std::string §ion);
+ void unserialize(const IniFile *db, const std::string §ion);
#ifdef FULL_SYSTEM
bool validInstAddr(Addr addr) { return true; }
}
void
-SimpleCPU::unserialize(IniFile &db, const string &category)
+SimpleCPU::unserialize(const IniFile *db, const string &category)
{
- string data;
-
- for (int i = 0; i < NumIntRegs; i++) {
- stringstream buf;
- ccprintf(buf, "R%02d", i);
- db.findDefault(category, buf.str(), data);
- to_number(data,xc->regs.intRegFile[i]);
- }
- for (int i = 0; i < NumFloatRegs; i++) {
- stringstream buf;
- ccprintf(buf, "F%02d", i);
- db.findDefault(category, buf.str(), data);
- to_number(data.c_str(), xc->regs.floatRegFile.q[i]);
- }
+ xc->unserialize(db, category);
// Read in Special registers
void processCacheCompletion();
virtual void serialize(std::ostream &os);
- virtual void unserialize(IniFile &db, const std::string §ion);
+ virtual void unserialize(const IniFile *db, const std::string §ion);
template <class T>
Fault read(Addr addr, T& data, unsigned flags);
#ifndef CONSOLE
void serialize(std::ostream &os);
- void unserialize(IniFile &db, const std::string §ion);
+ void unserialize(const IniFile *db, const std::string §ion);
#endif
};
}
void
-AlphaAccess::unserialize(IniFile &db, const std::string §ion)
+AlphaAccess::unserialize(const IniFile *db, const std::string §ion)
{
UNSERIALIZE_MEMBER(last_offset);
UNSERIALIZE_MEMBER(version);
}
void
-AlphaConsole::unserialize(IniFile &db, const std::string §ion)
+AlphaConsole::unserialize(const IniFile *db, const std::string §ion)
{
alphaAccess->unserialize(db, section);
}
* standard serialization routines for checkpointing
*/
virtual void serialize(std::ostream &os);
- virtual void unserialize(IniFile &db, const std::string §ion);
+ virtual void unserialize(const IniFile *db, const std::string §ion);
};
#endif // __ALPHA_CONSOLE_HH__
void
SimConsole::serialize(ostream &os)
{
- panic("Unimplemented");
}
void
-SimConsole::unserialize(IniFile &db, const std::string §ion)
+SimConsole::unserialize(const IniFile *db, const std::string §ion)
{
- panic("Unimplemented");
}
void setInt(int bits);
virtual void serialize(std::ostream &os);
- virtual void unserialize(IniFile &db, const std::string §ion);
+ virtual void unserialize(const IniFile *db, const std::string §ion);
};
class ConsoleListener : public SimObject
// Events on this queue are processed at the *beginning* of each
// cycle, before the pipeline simulation is performed.
//
-EventQueue mainEventQueue("Main Event Queue");
+EventQueue mainEventQueue("MainEventQueue");
void
EventQueue::insert(Event *event)
void
EventQueue::nameChildren()
{
+#if 0
int j = 0;
Event *event = head;
event = event->next;
}
+#endif
}
void
EventQueue::serialize(ostream &os)
{
+#if 0
string objects = "";
Event *event = head;
}
nameOut(os, "Serialized");
SERIALIZE_MEMBER(objects);
+#endif
}
void
template <class T>
void
-paramIn(IniFile &db, const std::string §ion,
+paramIn(const IniFile *db, const std::string §ion,
const std::string &name, T& param)
{
std::string str;
- if (!db.find(section, name, str) || !parseParam(str, param)) {
+ if (!db->find(section, name, str) || !parseParam(str, param)) {
fatal("Can't unserialize '%s:%s'\n", section, name);
}
}
template <class T>
void
-arrayParamIn(IniFile &db, const std::string §ion,
+arrayParamIn(const IniFile *db, const std::string §ion,
const std::string &name, T *param, int size)
{
std::string str;
- if (!db.find(section, name, str)) {
+ if (!db->find(section, name, str)) {
fatal("Can't unserialize '%s:%s'\n", section, name);
}
}
-#define INSTANTIATE_PARAM_TEMPLATES(type) \
-template void \
+#define INSTANTIATE_PARAM_TEMPLATES(type) \
+template void \
paramOut(ostream &os, const std::string &name, const type ¶m); \
-template void \
-paramIn(IniFile &db, const std::string §ion, \
- const std::string &name, type & param); \
-template void \
-arrayParamOut(ostream &os, const std::string &name, \
- const type *param, int size); \
-template void \
-arrayParamIn(IniFile &db, const std::string §ion, \
+template void \
+paramIn(const IniFile *db, const std::string §ion, \
+ const std::string &name, type & param); \
+template void \
+arrayParamOut(ostream &os, const std::string &name, \
+ const type *param, int size); \
+template void \
+arrayParamIn(const IniFile *db, const std::string §ion, \
const std::string &name, type *param, int size);
void paramOut(std::ostream &os, const std::string &name, const T& param);
template <class T>
-void paramIn(IniFile &db, const std::string §ion,
+void paramIn(const IniFile *db, const std::string §ion,
const std::string &name, T& param);
template <class T>
const T *param, int size);
template <class T>
-void arrayParamIn(IniFile &db, const std::string §ion,
+void arrayParamIn(const IniFile *db, const std::string §ion,
const std::string &name, T *param, int size);
//
virtual void nameChildren() {}
virtual void serialize(std::ostream& os) {}
- virtual void unserialize(IniFile &db, const std::string §ion) {}
+ virtual void unserialize(const IniFile *db, const std::string §ion) {}
};
class Serializer