Helpful hints for the homework

circuit Class tutorial

The tutorial is here: circuit_tutorial.pdf

ECE511 Instrutcion Set Reference

The reference manual is here: ece511-isa.pdf

Using objdump

Homework2 onwards, when you do make in the sim directory, among other things, you'll get an executable called objdump. You can use it to disassemble binaries that you run on the simulator. For example, to look at the assembly code for lzw, in the sim directory, type

./objdump ../apps/lzw/mipsver > lzw.s
You can then open lzw.s in a text editor.

Command line simulator

When you do make small.out in the apps/lzw directory, the following command is run:

../../sim/pipelined-model mipsver 800
The simulator executable is called pipelined-model, and the lzw binary is called mipsver. Also, if you look in the 'apps' directory, you'll find a few other spec benchmarks (gcc, bzip2, parser, mcf). The binaries for all benchmarks are called mipsver. Most spec benchmarks need some command line parameters. Gcc, for example, needs a .c file that it can compile. The makefile for each benchmark gives it the necessary command-line parameters. When you do make in the gcc directory, for example, the following command is executed:
../../sim/pipelined-model mipsver data/tiny.in -o tiny.s

More benchmarks

You are encouraged to experiment with other benchmarks (apart from lzw) in the sim/apps directory
gcc: type make tiny.out for a short input
     type make small.out for a longer input

bzip2: type make small.out for a short input
       type make med.out for a longer input

mcf: type make test.out for a short input
     type make small.out for a longer input
     Both inputs take some time to run

parser: type make super-small.out for a super-short input
        type make test.out for a short input
        type make smred.out for a short input
        All three take some time to run

Debugging the simulator

There are three ways you can go about this: