gem5 v24.0.0.0
|
Word Buffer used by the BUFFERED PROGRAM command to write (program) chunks of words to flash. More...
Public Member Functions | |
ProgramBuffer (const CfiMemory &_parent) | |
void | setup (ssize_t buffer_size) |
Start buffering. | |
bool | write (Addr flash_address, void *data_ptr, ssize_t size) |
Write data into the buffer. | |
bool | writeback () |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Static Public Attributes | |
static const ssize_t | MAX_BUFFER_SIZE = 32 * 4 |
Private Member Functions | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Private Attributes | |
std::vector< uint8_t > | buffer |
ssize_t | bytesWritten = 0 |
Addr | blockPointer = 0 |
const CfiMemory & | parent |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Word Buffer used by the BUFFERED PROGRAM command to write (program) chunks of words to flash.
Definition at line 173 of file cfi_mem.hh.
|
inline |
Definition at line 179 of file cfi_mem.hh.
|
overrideprivatevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 141 of file cfi_mem.cc.
References SERIALIZE_CONTAINER, and SERIALIZE_SCALAR.
void gem5::memory::CfiMemory::ProgramBuffer::setup | ( | ssize_t | buffer_size | ) |
Start buffering.
buffer_size | new size (in bytes) of the program buffer |
Clipping the size to its limit
Definition at line 94 of file cfi_mem.cc.
Referenced by gem5::memory::CfiMemory::write().
|
overrideprivatevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 149 of file cfi_mem.cc.
References UNSERIALIZE_CONTAINER, and UNSERIALIZE_SCALAR.
bool gem5::memory::CfiMemory::ProgramBuffer::write | ( | Addr | flash_address, |
void * | data_ptr, | ||
ssize_t | size ) |
Write data into the buffer.
If the buffer is full, the method will return true, meaning it's time to write back the buffer into memory
@params flash_address address in flash (relative to the start) @params data_ptr pointer to the data @params size number of bytes to be written to the buffer
Definition at line 107 of file cfi_mem.cc.
References gem5::ArmISA::offset, and gem5::memory::AbstractMemory::size().
Referenced by gem5::memory::CfiMemory::write().
bool gem5::memory::CfiMemory::ProgramBuffer::writeback | ( | ) |
Definition at line 129 of file cfi_mem.cc.
Referenced by gem5::memory::CfiMemory::write().
|
private |
Definition at line 217 of file cfi_mem.hh.
|
private |
Definition at line 211 of file cfi_mem.hh.
|
private |
Definition at line 214 of file cfi_mem.hh.
|
static |
Definition at line 177 of file cfi_mem.hh.
|
private |
Definition at line 219 of file cfi_mem.hh.