13 #ifndef N_INTERACTIVE_MODE_LINES
15 #define N_INTERACTIVE_MODE_LINES 5
17 #if N_INTERACTIVE_MODE_LINES > 9
18 #error("N_INTERACTIVE_MODE_LINES must be a single digit number")
42 ARG_S_TRACE_FILE = ARG_C_COUNT,
157 #ifdef WRITE_TIMESTAMP
187 bool operator() (
const std::string& s1,
const std::string& s2)
const;
190 #pragma pack(push, 1)
208 extern std::map<std::string, coh_factory_t, ci_less>*
coherence_map;
210 extern std::map<std::string, dir_factory_t, ci_less>*
directory_map;
The cache interface.
Definition: cache_abc.h:9
An L1 Cache with coherence protocol and replacement policy.
Definition: cache.h:9
The base class for coherence protocols.
Definition: coherence_protocol.h:14
The MemorySystem class connecting multiple caches and main memory.
Definition: memory_system.h:12
The base class for replacement policies.
Definition: replacement_policy.h:9
Configuration for an individual memory system.
Definition: typedefs.h:164
uint32_t line_size
The line size of each L1 cache.
Definition: typedefs.h:170
std::string coherence
The name of the coherence protocol.
Definition: typedefs.h:174
std::string replacer
The name of the replacement policy.
Definition: typedefs.h:178
uint32_t assoc
The associativity of each L1 cache.
Definition: typedefs.h:172
uint32_t cache_size
The size of each L1 cache.
Definition: typedefs.h:168
uint32_t id
The id for this configuration.
Definition: typedefs.h:166
std::string directory
The name of the directory protocol.
Definition: typedefs.h:176
Cache line fields (without data field)
Definition: typedefs.h:152
tag_t tag
Tag of the line.
Definition: typedefs.h:154
size_t timestamp
The timestamp of the last write to the cache line.
Definition: typedefs.h:159
state_e state
State the line is in.
Definition: typedefs.h:156
Comparator functor for strings, case insensitive.
Definition: typedefs.h:182
bool operator()(const std::string &s1, const std::string &s2) const
Compare two string ignoring case.
Definition: main.cc:216
The format of a single trace.
Definition: typedefs.h:192
uint8_t op
The first byte of a trace; the 7-bit CPU ID combined with the 1-bit R/W mode.
Definition: typedefs.h:194
addr_t addr
The address that is accessed.
Definition: typedefs.h:196
std::function< CoherenceProtocol *(CacheABC &)> coh_factory_t
Coherence protocol factory function signature.
Definition: typedefs.h:201
std::map< std::string, rep_factory_t, ci_less > * replacement_map
A map from replacement policy names to their factory functions.
Definition: main.cc:21
std::function< ReplacementPolicy *(CacheABC &, uint32_t, uint32_t)> rep_factory_t
Replacement policy factory function signature.
Definition: typedefs.h:205
state_e
Cache line state.
Definition: typedefs.h:64
@ Unallocated
Alias for invalid, used in protocols that don't invalidate.
Definition: typedefs.h:66
@ V
Valid exclusive.
Definition: typedefs.h:78
@ M
Modified exclusive.
Definition: typedefs.h:76
@ D
Dirty exclusive.
Definition: typedefs.h:72
@ Sc
Shared clean.
Definition: typedefs.h:86
@ E
Clean exclusive.
Definition: typedefs.h:74
@ Sm
Shared modified.
Definition: typedefs.h:88
@ I
Invalid.
Definition: typedefs.h:68
@ S
Shared.
Definition: typedefs.h:84
@ O
Owned.
Definition: typedefs.h:82
statistic_e
Cache runtime statistic IDs.
Definition: typedefs.h:115
@ LineFlush
Cache line data broadcasted across memory bus.
Definition: typedefs.h:122
@ LineFetch
Cache line data retrieved from main memory.
Definition: typedefs.h:124
@ Invalidation
Cache line state set to invalid (I)
Definition: typedefs.h:140
@ WriteMiss
Write miss on a cache line.
Definition: typedefs.h:119
@ Eviction
Cache line evicted by the replacement policy.
Definition: typedefs.h:133
@ Intervention
Cache line changes from singular (D, E, M, V) to shared (O, S, Sc, Sm)
Definition: typedefs.h:138
@ N_STATISTICS
The number of statistics a cache keeps track of; not a statistic.
Definition: typedefs.h:143
@ CacheToCache
Transfer between two caches.
Definition: typedefs.h:126
@ Exclusion
Cache line changes from shared (O, S, Sc, Sm) to singular (D, E, M, V)
Definition: typedefs.h:136
@ WriteMemory
Direct write from CPU to main memory.
Definition: typedefs.h:130
@ ReadMiss
Read miss on a cache line.
Definition: typedefs.h:117
@ WriteBack
Cache line data written to main memory.
Definition: typedefs.h:128
args_interactive_e
Argument indices for interactive mode.
Definition: typedefs.h:57
args_batch_e
Argument indices for multiple metrics run.
Definition: typedefs.h:48
uint32_t addr_t
Memory address.
Definition: typedefs.h:147
bus_msg_e
Bus message IDs.
Definition: typedefs.h:92
@ BusWrite
Bus upgrade message issued by a cache.
Definition: typedefs.h:107
@ BusUpdate
Bus update message issued by a cache.
Definition: typedefs.h:103
@ BusUpgrade
Bus write message issued by a cache.
Definition: typedefs.h:105
@ N_MESSAGES
Number of bus messages.
Definition: typedefs.h:110
@ ProcWrite
Write access on a cache line.
Definition: typedefs.h:96
@ ProcRead
Read access on a cache line.
Definition: typedefs.h:94
@ BusRead
Bus read message issued by a cache.
Definition: typedefs.h:99
@ BusReadX
Bus read-exclusive message issued by a cache.
Definition: typedefs.h:101
args_single_e
Argument indices for single metrics run.
Definition: typedefs.h:33
std::function< MemorySystem *(cache_config &)> dir_factory_t
Directory protocol factory function signature.
Definition: typedefs.h:203
std::map< std::string, coh_factory_t, ci_less > * coherence_map
A map from coherence protocol names to their factory functions.
Definition: main.cc:19
uint32_t tag_t
Cache line tag.
Definition: typedefs.h:149
std::map< std::string, dir_factory_t, ci_less > * directory_map
A map from directory protocol names to their factory functions.
Definition: main.cc:20