Serialized cpu interrupts
cpu/simple_cpu/simple_cpu.cc: called basecpu serialization --HG-- extra : convert_revision : 1a639b5e3c08e47a5d581c18b2b53fe87bd05b73
This commit is contained in:
parent
f3a7930fa6
commit
074969f8f1
|
@ -242,6 +242,21 @@ BaseCPU::clear_interrupts()
|
||||||
intstatus = 0;
|
intstatus = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BaseCPU::serialize(std::ostream &os)
|
||||||
|
{
|
||||||
|
SERIALIZE_ARRAY(interrupts, NumInterruptLevels);
|
||||||
|
SERIALIZE_SCALAR(intstatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
BaseCPU::unserialize(Checkpoint *cp, const std::string §ion)
|
||||||
|
{
|
||||||
|
UNSERIALIZE_ARRAY(interrupts, NumInterruptLevels);
|
||||||
|
UNSERIALIZE_SCALAR(intstatus);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // FULL_SYSTEM
|
#endif // FULL_SYSTEM
|
||||||
|
|
||||||
DEFINE_SIM_OBJECT_CLASS_NAME("BaseCPU", BaseCPU)
|
DEFINE_SIM_OBJECT_CLASS_NAME("BaseCPU", BaseCPU)
|
||||||
|
|
|
@ -139,6 +139,21 @@ class BaseCPU : public SimObject
|
||||||
|
|
||||||
#ifdef FULL_SYSTEM
|
#ifdef FULL_SYSTEM
|
||||||
System *system;
|
System *system;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 §ion);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -299,6 +299,7 @@ SimpleCPU::resetStats()
|
||||||
void
|
void
|
||||||
SimpleCPU::serialize(ostream &os)
|
SimpleCPU::serialize(ostream &os)
|
||||||
{
|
{
|
||||||
|
BaseCPU::serialize(os);
|
||||||
SERIALIZE_ENUM(_status);
|
SERIALIZE_ENUM(_status);
|
||||||
SERIALIZE_SCALAR(inst);
|
SERIALIZE_SCALAR(inst);
|
||||||
nameOut(os, csprintf("%s.xc", name()));
|
nameOut(os, csprintf("%s.xc", name()));
|
||||||
|
@ -312,6 +313,7 @@ SimpleCPU::serialize(ostream &os)
|
||||||
void
|
void
|
||||||
SimpleCPU::unserialize(Checkpoint *cp, const string §ion)
|
SimpleCPU::unserialize(Checkpoint *cp, const string §ion)
|
||||||
{
|
{
|
||||||
|
BaseCPU::unserialize(cp, section);
|
||||||
UNSERIALIZE_ENUM(_status);
|
UNSERIALIZE_ENUM(_status);
|
||||||
UNSERIALIZE_SCALAR(inst);
|
UNSERIALIZE_SCALAR(inst);
|
||||||
xc->unserialize(cp, csprintf("%s.xc", section));
|
xc->unserialize(cp, csprintf("%s.xc", section));
|
||||||
|
|
Loading…
Reference in a new issue