CohereSim: A Bus-based Cache Simulator  v3.3
A tool for education in computing - learn about coherence protocols, replacement policies, and SMP vs DSM
Macros | Enumerations | Variables
interactive_mode_coherence.cc File Reference

Implementation of the InteractiveModeCoherence and BusEvent classes. More...

#include "coherence_protocol.h"
#include "interactive_mode_coherence.h"
Include dependency graph for interactive_mode_coherence.cc:

Macros

#define ALLOCATED   0x55555555
 Dummy tag value indicating that a line is allocated.
 

Enumerations

enum  col_width_e {
  COL_WIDTH_OP = 2 , COL_WIDTH_EVENT = 16 , COL_WIDTH_SOURCE = 11 , COL_WIDTH_STATES = 3 * N_INTERACTIVE_MODE_LINES - 1 ,
  COL_WIDTH_ACCESS = 8 , COL_WIDTH_VICTIM = 6 , COL_WIDTH_TAGS = 2 * N_INTERACTIVE_MODE_LINES - 1 , COL_WIDTH_REP_STATE = 15
}
 Table column widths. More...
 

Variables

constexpr const char * state_names []
 String names of the states in state_e. More...
 
constexpr const char * bus_event_names []
 String names of bus messages and statistics in bus_msg_e and statistic_e. More...
 

Detailed Description

Implementation of the InteractiveModeCoherence and BusEvent classes.

Enumeration Type Documentation

◆ col_width_e

Table column widths.

Enumerator
COL_WIDTH_OP 

Operations have one letter and one digit.

COL_WIDTH_EVENT 

String length of the longest bus event name + 2.

COL_WIDTH_SOURCE 

String length of "Main Memory" or "Data Source".

COL_WIDTH_STATES 

Space for the states of all caches.

COL_WIDTH_ACCESS 

String length of the word "Accessed".

COL_WIDTH_VICTIM 

String length of the word "Victim".

COL_WIDTH_TAGS 

Space for the tags of all caches.

COL_WIDTH_REP_STATE 

String length of the words "Replacer State" + 1.

Variable Documentation

◆ bus_event_names

constexpr const char* bus_event_names[]
constexpr
Initial value:
= {
"PrRd", "PrWr", "BusRd", "BusRdX", "BusUpdt", "BusUpgr", "BusWr", "Read Miss",
"Write Miss", "Line Flush", "Line Fetch", "Cache to Cache", "Write Back", "Write Memory"
}

String names of bus messages and statistics in bus_msg_e and statistic_e.

◆ state_names

constexpr const char* state_names[]
constexpr
Initial value:
= {
" I ", " D ", " E ", " M ", " V ", " O ", " S ", " Sc", " Sm"
}

String names of the states in state_e.