CohereSim: A Bus-based Cache Simulator  v3.3
A tool for education in computing - learn about coherence protocols, replacement policies, and SMP vs DSM
Data Structures | Macros
memory_system.h File Reference

Declaration of the MemorySystem class. More...

#include "typedefs.h"
Include dependency graph for memory_system.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  MemorySystem
 The MemorySystem class connecting multiple caches and main memory. More...
 

Macros

#define MAX_N_CACHES   0b10000000
 The maximum number of caches supported by the current trace format (7 bit ID = 128 ID values)
 
#define ADD_DIRECTORY_TO_CMD_LINE(dir_prot)
 Create a mapping in 'directory_map' from a string containing the class name to a factory method for the class. More...
 

Detailed Description

Declaration of the MemorySystem class.

Macro Definition Documentation

◆ ADD_DIRECTORY_TO_CMD_LINE

#define ADD_DIRECTORY_TO_CMD_LINE (   dir_prot)
Value:
static int register_directory = []() { \
if (directory_map == nullptr) directory_map = new std::map<std::string, dir_factory_t, ci_less>(); \
(*directory_map)[#dir_prot] = [](cache_config& config) { return new dir_prot(config); }; return 0; }()
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
Comparator functor for strings, case insensitive.
Definition: typedefs.h:182
std::function< MemorySystem *(cache_config &)> dir_factory_t
Directory protocol factory function signature.
Definition: typedefs.h:203

Create a mapping in 'directory_map' from a string containing the class name to a factory method for the class.

Parameters
dir_protThe directory protocol type