Dean Tullsen's 21164 Simulator
Overview
This simulator is an execution-driven, instruction-level simulator
that simulates a superscalar architecture very close to the 21164. It
runs on the Alphas and resides in
/cse/www/education/courses/cse548/96w/tools/Tullsen. In that
directory there is a README and a ROADMAP file. Basically, this program takes as input
Alpha binaries, and produces simulation results. There is a sample
of the simulation results in the sample_results file. The sample result output
demonstrates what kind of quantities will be measured for you. It
includes measurements in cycles of cache performance.
The simulator currently is set up to simulate the basic cache
configuration on the Alpha 21164 (8K direct mapped 1st level
Instruction and Data Cache, 96K 3-way set associative unified 2nd level
cache). It also has a default of a Direct-mapped 1Mb 3rd level
unified cache.
How to Build and Use the Simulator
- Copy the distribution to your directory. There is a tar file you
can use called betasing.02.23.tar.gz.
- type: /uns/bin/mk which makes the mkfile in that
directory. There will be some warnings, but ignore them.
- The simulator will be called betasing in that
directory when the make finishes.
On our systems, the test programs must be linked with some special
flags. The follow will compile a program test.c into test.out:
gcc -o test.out -static -Wl,-T -Wl,20000000 -Wl,-D -Wl,30000000 test.c
or
cc -o test.out -non_shared -WL,-T -WL,20000000 -WL,-D -WL,30000000 test.c
Then follow the README file to simulate the program.
How to Modify the Simulator
The file specifying the cache heirarchy is cache.c. The
basic structure of the program with regards to caches is that
doiaccess or dodaccess is called whenever there is
a memory reference (depending if it is for an instruction or data).
In the beginning of cache.c there are #define's for the
various cache parameters.
In that file, there are parameters specifying the times to access the
cache heirarchy. These numbers are in units of clock cycles.
Note that the formula for the size of a cache is:
Line(block) size * Associativy * # of sets
Test Programs Available
There are a few test programs from SPEC available. The
argfile will tell you what the programs are called and what
files are needed to run. Here are the ones available in
96w/tools/Tullsen:
- eqntott: invoked with betasing argfile
- espresso: invoded with betasing argfile.simple
that runs it over only 1 input or betasing argfile.4times
which runs it over 4 inputs.
- alvinn: invoked with betasing argfile
from the alvinn/input.ref directory.