gem5 v24.0.0.0
|
Metadata about the erase blocks in flash. More...
Public Member Functions | |
BlockData (const CfiMemory &_parent, ssize_t number, ssize_t size) | |
bool | isLocked (Addr block_address) const |
Return true if the block pointed by the block_address parameter is locked. | |
void | lock (Addr block_address) |
Lock the block pointed by the block_address parameter. | |
void | unlock (Addr block_address) |
Unlock the block pointed by the block_address parameter. | |
void | erase (PacketPtr pkt) |
Erase a single block. | |
ssize_t | number () const |
Number of erase blocks in flash memory. | |
ssize_t | size () const |
Size in bytes of a single erase block. | |
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) |
Private Member Functions | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
uint32_t | blockIdx (Addr block_address) const |
Private Attributes | |
std::vector< bool > | locked |
const ssize_t | blockSize |
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. | |
Metadata about the erase blocks in flash.
Definition at line 104 of file cfi_mem.hh.
|
inline |
Definition at line 106 of file cfi_mem.hh.
|
private |
Definition at line 88 of file cfi_mem.cc.
Referenced by isLocked().
void gem5::memory::CfiMemory::BlockData::erase | ( | PacketPtr | pkt | ) |
Erase a single block.
The address of the block is supplied by the packet address.
@params pkt memory packet targeting the erase block
Definition at line 755 of file cfi_mem.cc.
References gem5::Packet::getAddr().
Referenced by gem5::memory::CfiMemory::write().
bool gem5::memory::CfiMemory::BlockData::isLocked | ( | Addr | block_address | ) | const |
Return true if the block pointed by the block_address parameter is locked.
@params block_address address of the erase block in flash memory: first block starts ad address 0x0
Definition at line 58 of file cfi_mem.cc.
References blockIdx(), and locked.
Referenced by gem5::memory::CfiMemory::readDeviceID(), and gem5::memory::CfiMemory::write().
void gem5::memory::CfiMemory::BlockData::lock | ( | Addr | block_address | ) |
Lock the block pointed by the block_address parameter.
@params block_address address of the erase block in flash memory: first block starts ad address 0x0
Definition at line 64 of file cfi_mem.cc.
Referenced by gem5::memory::CfiMemory::write().
|
inline |
Number of erase blocks in flash memory.
Definition at line 147 of file cfi_mem.hh.
References locked.
|
overrideprivatevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 76 of file cfi_mem.cc.
References SERIALIZE_CONTAINER.
|
inline |
Size in bytes of a single erase block.
Definition at line 150 of file cfi_mem.hh.
References blockSize.
void gem5::memory::CfiMemory::BlockData::unlock | ( | Addr | block_address | ) |
Unlock the block pointed by the block_address parameter.
@params block_address address of the erase block in flash memory: first block starts ad address 0x0
Definition at line 70 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 82 of file cfi_mem.cc.
References UNSERIALIZE_CONTAINER.
|
private |
Definition at line 164 of file cfi_mem.hh.
Referenced by size().
|
private |
Definition at line 161 of file cfi_mem.hh.
Referenced by isLocked(), and number().
|
private |
Definition at line 166 of file cfi_mem.hh.