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

Declaration of the helper methods in main.cc. More...

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

Go to the source code of this file.

Functions

void getConfig (int argc, char *argv[], cache_config &config)
 Parse the given arguments into a memory system configuration. More...
 
size_t getTrace (int argc, char *argv[], std::ifstream &trace_file, int arg_max_count)
 Open the trace file and read the trace limit. More...
 
void printStatsHeader ()
 Print the header row in the statistics output CSV.
 
void readConfigurations (std::vector< cache_config > &configs, char *configs_file_path)
 Parse the cache configurations from the given configs file. More...
 

Detailed Description

Declaration of the helper methods in main.cc.

Function Documentation

◆ getConfig()

void getConfig ( int  argc,
char *  argv[],
cache_config config 
)

Parse the given arguments into a memory system configuration.

Parameters
argcThe number of program arguments
argvThe array of program arguments
configThe configuration struct to populate

◆ getTrace()

size_t getTrace ( int  argc,
char *  argv[],
std::ifstream &  trace_file,
int  arg_max_count 
)

Open the trace file and read the trace limit.

Parameters
argcThe number of program arguments
argvThe array of program arguments
trace_fileAn ifstream that will become the trace file
arg_max_countThe number of arguments when the trace limit argument is present
Returns
The trace limit

◆ readConfigurations()

void readConfigurations ( std::vector< cache_config > &  configs,
char *  configs_file_path 
)

Parse the cache configurations from the given configs file.

Parameters
configsThe vector to contain the configurations
configs_file_pathThe file path to the configs file