A simulated memory system for a 4-processor parallel architecture, originally produced as a university coursework exercise. Use the of the program allows tracking memory accesses and cache coherence within the system given a suitable input trace.
For more information and analysis of the functionality of the program, refer to Report 2.pdf within the repository.
To run the simulator build script, simply use the following command:
./build.sh
Although unlikely, it is possible that the compiler and OS flags within the build file need to be adjusted to match your system.
The simulator takes the following arguments:
<trace_file> <number_lines> <line_size> <buffer_size> <retireAtN> <TSO>
TSOis set to1if Total Store Order is to be usedTSOis set to0if instead you wish to use SC
This is visible within the following line of build.sh, and can be modified as desired (last argument):
./sim trace1.out 128 4 32 4 1
WARNING: You MUST use g++ for compilation - gcc breaks horribly!!!
- Ensure
verboseis defined with a value of1withincwk2.cpp. (Otherwise set to0).
- Ensure
verboseis defined withinproc.cppwith a value of3 - Also ensure
verboseis defined withinproc.cppwith a value of2 - (Only needed for debugging and to produce the artificial examples to verify functionality)