|
CohereSim: A Bus-based Cache Simulator
v3.3
A tool for education in computing - learn about coherence protocols, replacement policies, and SMP vs DSM
|
The InteractiveMode class for replacement policies. More...
#include <interactive_mode_replacer.h>


Public Member Functions | |
| InteractiveModeReplacer (std::string replacement_policy_name) | |
| Construct a new interactive mode cache showcasing a replacement policy. More... | |
| ~InteractiveModeReplacer () | |
| Finalize the interactive mode output. | |
| bool | evalutateCommand (std::string &cmd) |
| Evaluate a command received from the input. More... | |
| void | printCmdFormatMessage () |
| Write the command format message to stderr. | |
Public Member Functions inherited from InteractiveMode | |
| InteractiveMode (std::string p_name) | |
| Construct a new interactive mode cache. More... | |
| virtual | ~InteractiveMode () |
| Finalize the interactive mode output. | |
| virtual bool | issueBusMsg (bus_msg_e bus_msg) |
| Issue a BusRd message to neighboring caches. More... | |
| state_e | getLineState (uint32_t set_idx, uint32_t way_idx) |
| Get the state of a line in the cache. More... | |
Private Member Functions | |
| void | receiveAccess (tag_t tag) |
| Issue an access to a cache block. More... | |
| void | reset () |
| Revert the system back to the initial state. | |
| void | printSeparator () |
| Print a horizontal line in the table. | |
| void | printStats () |
| Print simulation run statistics in CSV format (headerless) | |
Private Attributes | |
| ReplacementPolicy * | replacement_policy |
| Coherence protocol used by this cache. | |
| char | accessee |
| The most recent command issued. | |
| char | victim |
| The most recent victim. | |
Additional Inherited Members | |
Protected Attributes inherited from InteractiveMode | |
| std::string | p_name |
| The name of the policy/protocol being run in interactive mode. | |
| cache_line | lines [N_INTERACTIVE_MODE_LINES] |
| The cache lines in interactive mode. | |
The InteractiveMode class for replacement policies.
| InteractiveModeReplacer::InteractiveModeReplacer | ( | std::string | replacement_policy_name | ) |
Construct a new interactive mode cache showcasing a replacement policy.
| replacement_policy_name | The replacement policy to use |
|
virtual |
Evaluate a command received from the input.
| cmd | The input command |
Implements InteractiveMode.
|
private |
Issue an access to a cache block.
| tag | The tag of the block |