|
gem5 [DEVELOP-FOR-25.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 174 of file cfi_mem.hh.
|
inline |
Definition at line 180 of file cfi_mem.hh.
References gem5::memory::CfiMemory::CfiMemory(), parent, and gem5::Serializable::Serializable().
|
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 blockPointer, buffer, bytesWritten, 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.
References buffer, bytesWritten, and MAX_BUFFER_SIZE.
|
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 blockPointer, buffer, bytesWritten, 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 blockPointer, buffer, bytesWritten, MAX_BUFFER_SIZE, gem5::ArmISA::offset, and gem5::memory::AbstractMemory::size().
| bool gem5::memory::CfiMemory::ProgramBuffer::writeback | ( | ) |
Definition at line 129 of file cfi_mem.cc.
References blockPointer, buffer, bytesWritten, and parent.
|
private |
Definition at line 218 of file cfi_mem.hh.
Referenced by serialize(), unserialize(), write(), and writeback().
|
private |
Definition at line 212 of file cfi_mem.hh.
Referenced by serialize(), setup(), unserialize(), write(), and writeback().
|
private |
Definition at line 215 of file cfi_mem.hh.
Referenced by serialize(), setup(), unserialize(), write(), and writeback().
|
static |
Definition at line 178 of file cfi_mem.hh.
|
private |
Definition at line 220 of file cfi_mem.hh.
Referenced by ProgramBuffer(), and writeback().