40 config(::
DRAMSys::Config::from_path(params.configuration,
41 params.resource_directory)),
43 params.
name.c_str(), config, params.recordable, params.range)
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 dumpFileName +=
".pmem";
89 std::ofstream stream(checkpointPath / dumpFileName,
91 serializableObject->serialize(stream);
94 for (
auto const* childObject :
object->get_child_objects())
109 for (
auto*
object : topLevelObjects)
115 auto* deserializableObject =
116 dynamic_cast<::DRAMSys::Deserialize*
>(object);
118 if (deserializableObject !=
nullptr)
120 std::string dumpFileName(object->name());
121 dumpFileName +=
".pmem";
122 std::ifstream stream(checkpointPath / dumpFileName,
124 deserializableObject->deserialize(stream);
127 for (
auto* childObject :
object->get_child_objects())
129 deserialize(childObject);
ClockedObjectParams Params
Parameters of ClockedObject.
Ports are used to interface objects to each other.
An abstract memory represents a contiguous block of physical memory, with an associated address range...
std::shared_ptr<::DRAMSys::DRAMSys > dramsys
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
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
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.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria 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()
const std::string & name()