41 params.resource_directory)),
76 for (
auto const*
object : topLevelObjects)
82 auto const* serializableObject =
83 dynamic_cast<::DRAMSys::Serialize const*
>(object);
85 if (serializableObject !=
nullptr)
87 std::string dumpFileName(object->name());
88 std::ofstream stream(checkpointPath / dumpFileName,
90 serializableObject->serialize(stream);
93 for (
auto const* childObject : object->get_child_objects())
108 for (
auto*
object : topLevelObjects)
114 auto* deserializableObject =
115 dynamic_cast<::DRAMSys::Deserialize*
>(object);
117 if (deserializableObject !=
nullptr)
119 std::string dumpFileName(object->name());
120 std::ifstream stream(checkpointPath / dumpFileName,
122 deserializableObject->deserialize(stream);
125 for (
auto* childObject : object->get_child_objects())
127 deserialize(childObject);
ClockedObjectParams Params
Parameters of ClockedObject.
virtual std::string name() const
Ports are used to interface objects to each other.
AbstractMemory(const AbstractMemory &)
sc_gem5::TlmTargetWrapper tlmWrapper
gem5::Port & getPort(const std::string &if_name, PortID idx) override
Get a port with a given name and index.
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
DRAMSys(Params const ¶ms)
DRAMSysWrapper dramSysWrapper
::DRAMSys::Config::Configuration config
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void signalDrainDone() const
Signal that an object is drained.
DrainState
Object drain/handover states.
@ Draining
Draining buffers pending serialization/handover.
@ Drained
Buffers drained, ready for serialization/handover.
static std::string dir()
Get the current checkout directory name.
const Params & params() const
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Copyright (c) 2024 Arm Limited All rights reserved.
const PortID InvalidPortID
std::ostream CheckpointOut
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
const std::vector< sc_object * > & sc_get_top_level_objects()