SSMT Simulator Manual
This directory includes files to build the SMT simulator, which was derived
from the SimpleScalar version 2.0. Just type 'gmake' to generate the simulator
binary, "sim-ssmt".
Compiling an application
The SMT simulator has a number of special instructions such as "lpcr(resume)"
and "spcs(suspend)" that are used to support multi-threading. To make the
compiler recognize these new instructions,
you should use "as" as the assembler, which is included in this directory,
instead of the original "gas" provided in the SimpleScalar binutil.
To compile an application, include "libssmt.a" using -lssmt in your make file as
in the following example.
ssgcc -Wall -O2 -g -I./libssmt -L./libssmt -o mst main.c makegraph.c hash.c -lssmt
Also, in your application source file, you might need to include "ssmt.h" to use
macros for multi-threading such as createThread and resumeContext. "vortex.h"
contains macros such as VSIM_ENTER and VSIM_EXIT to specify the starting and
ending points of the simulation. It also contains macros for prefetch
instruction and hardware semaphores.
Running simulator
Running simulator is similar to SimpleScalar. Just type "sim-ssmt" to see what
kinds of command line options you have. Below is an example command line, in
which we run two SPEC applications, BZIP2 and VPR, simultaneously.
sim-ssmt -context 1 4 -max:cycle 100000000 -offset 0 -fetch:ifqsize 32
-cache:dl1 dl1:512:32:2:l -cache:il1 il1:512:64:2:l -num:thread 4 -decode:width
8 -issue:width 8 -commit:width 8 -res:ialu 8 -ruu:size 128 -lsq:size 64 -res:memport
8 bzip2 input.source 58 \; vpr net.in arch.in place.out dum.out -nodisp -place_only
-init_t 5 -exit_t 0.005 -alpha_t 0.9412 -inner_num 2 >&! result.txt
sim-ssmt <command line options> <app1> <app1 input> \; <app2> <app2 input>
To specify how many contexts are used for useful computation and subordinate
threading, respectively, there is an option key, "-context". The number of
values after "-context" means the number of independent applications you want to
run simultaneously and the (last value-1) is the number of contexts used for
subordinate threading. In the above example, "-context 1 4", we run two
applications, BZIP2 and VPR, and three hardware contexts are used for
subordinate threading.
If you have any question, please send an e-mail to dongkeun@glue.umd.edu. Also,
I'd appreciate if you report any bug in the simulator.