Homework and Solutions

Homework/Problem Sets

Running the Simulator
In this course, we will be complementing traditional "textbook" problems with experiments using a detailed processor simulator. You will need access to a Linux machine (we have tested on Red Hat 9, but it should work on other distros). You can use the standard CoC course labs (Intel Cluster/CCB103 and Undergraduate Project Lab/CCB107). If you do not have an account that works on these machines, use the onine form at http://www.cc.gatech.edu/cns/forms/account_form.html to apply for an account.

Once you have successfully logged on to a Linux machine, copy the simulator archive from /net/hc299/class/6290/spring06/mase.tar.bz2 ( to your own directory. Then, "tar xvfj mase.tar.bz2", which should result in a "mase" directory. Then, cd into the directory and do "make sim-mase". After a bunch of compiler commands (which includes a few warnings that you can ignore), a binary file named "sim-mase" will be produced. Then, "make cs6290" which simply sets up a symbolic link named "traces" to the directory where the application traces used in this course reside.

For a quick test of the simulator, type "./sim-mase traces/fib". This should generate (1) a dump of the default simulator settings, (2) the program output which lists the first 16 numbers from the Fibonacci sequence, and then (3) a dump of the processor execution statistics. For a more in-depth test of the simulator, type "make mase-tests", which will run the simulator on a few sample programs and automatically diff them with the expected output (this takes longer).

Now you're up and running! The simulator simulates an N-way superscalar processor with dynamic instruction scheduling, branch prediction, caches, and more. This makes the simulator run relatively slowly.

Besides the fib toy-program, the traces directory contains execution samples from three applications. To run one of these, type "sim-mase -max:inst 50000000 traces/tracefilename". The "-max:inst" option tells the simulator to stop after 50 million instructions (this takes 3-5 minutes, depending on the performance of your computer). The benchmark jpeg-dec is a jpeg decoder, povray is a open-source ray-tracer, and twolf is from a popular CPU benchmarking suite called SpecCPU (http://www.spec.org), and this particular application is a simulated annealing-based circuit place-and-route design tool.