|
The Sparta Modeling Framework
|
Public Member Functions | |
| StoreData (uint64_t write_id, addr_t paddr, size_t size, const uint8_t *data, const void *in_supplement, void *out_supplement) | |
| Construct a StoreData object. | |
| uint64_t | getWriteID () const |
| Get the write ID, unique to each write performed. | |
| addr_t | getPAddr () const |
| Get the physical address this write corresponds to. | |
| size_t | getSize () const |
| Get the size of the write data (in bytes) | |
| uint8_t * | getStoreDataPtr () |
| Get the stored data. | |
| uint8_t * | getPrevDataPtr () |
| Get the previous data at the address (for restore) | |
| const uint8_t * | getStoreDataPtr () const |
| Const methods of above methods. | |
| const uint8_t * | getPrevDataPtr () const |
| Const methods of above methods. | |
for CachedMemory
This class is the default helper class for CachedMemory, but is not required to be used.
However, the API it provides must be implemented:
This class is the default helper class for CachedMemory. Specifically, when a write occurs in CachedMemory, an instance of this class is created to hold the data to be written as well as the previous data at the physical location.
When a write is committed, downsteam memory is updated using this class to write the data (and not the data from the cache).
Definition at line 48 of file CachedMemory.hpp.
|
inline |
Construct a StoreData object.
| write_id | The unique ID for this StoreData |
| paddr | The physical address of the data it contains |
| size | The size of the data contained |
| data | The data to be copied into this class |
| in_supplement | (ignored) |
| out_supplement | (ignored) |
Definition at line 61 of file CachedMemory.hpp.
|
inline |
Get the physical address this write corresponds to.
Definition at line 84 of file CachedMemory.hpp.
|
inline |
Get the previous data at the address (for restore)
Definition at line 93 of file CachedMemory.hpp.
|
inline |
Const methods of above methods.
Definition at line 99 of file CachedMemory.hpp.
|
inline |
Get the size of the write data (in bytes)
Definition at line 87 of file CachedMemory.hpp.
|
inline |
Get the stored data.
Definition at line 90 of file CachedMemory.hpp.
|
inline |
Const methods of above methods.
Definition at line 96 of file CachedMemory.hpp.
|
inline |
Get the write ID, unique to each write performed.
Definition at line 81 of file CachedMemory.hpp.