The MemorySystem class connecting multiple caches and main memory.
More...
#include <memory_system.h>
|
size_t | access_timestamp |
| The access number of the current memory access.
|
|
size_t | most_recent_sibling |
| The most recent timestamp of a cache block across all caches.
|
|
bool | copies_exist |
| Flag to indicate if copies of a cache block exist in other caches.
|
|
bool | flushed |
| Flag to indicate if a cache flushed one of its lines.
|
|
|
void | verifyTimestamp (addr_t addr, bool write, size_t current_timestamp) |
| Check if all valid copies of a cache block have the same timestamp. More...
|
|
The MemorySystem class connecting multiple caches and main memory.
◆ MemorySystem()
Construct a new memory system.
- Parameters
-
config | The configuration of this memory system |
◆ issueBusMsg()
virtual void MemorySystem::issueBusMsg |
( |
bus_msg_e |
bus_msg, |
|
|
addr_t |
addr, |
|
|
uint32_t |
cache_id |
|
) |
| |
|
pure virtual |
Issue a bus message from a cache to all other caches.
- Parameters
-
bus_msg | The specific bus message |
addr | The address accessed |
cache_id | The cache ID of the requestor |
Implemented in Broadcast.
◆ issuePrRd()
void MemorySystem::issuePrRd |
( |
addr_t |
addr, |
|
|
uint32_t |
cache_id, |
|
|
size_t |
read_timestamp |
|
) |
| |
Issue a PrWr message to a cache.
- Parameters
-
addr | The address accessed |
cache_id | The cache ID of the recipient |
read_timestamp | The access number of the current read access |
◆ issuePrWr()
void MemorySystem::issuePrWr |
( |
addr_t |
addr, |
|
|
uint32_t |
cache_id, |
|
|
size_t |
write_timestamp |
|
) |
| |
Issue a PrRd message to a cache.
- Parameters
-
addr | The address accessed |
cache_id | The cache ID of the recipient |
write_timestamp | The access number of the current write access |
◆ verifyTimestamp()
void MemorySystem::verifyTimestamp |
( |
addr_t |
addr, |
|
|
bool |
write, |
|
|
size_t |
current_timestamp |
|
) |
| |
|
private |
Check if all valid copies of a cache block have the same timestamp.
- Parameters
-
addr | The memory address in the cache block |
write | Whether the current operation is a processor write |
current_timestamp | The current access number |
The documentation for this class was generated from the following files: