UW-Madison
Computer Sciences Dept.

CS/ECE 552 Introduction to Computer Architecture


Spring 2012 Section 1
Instructor David A. Wood and T. A. Ramkumar Ravikumar
URL: http://www.cs.wisc.edu/~david/courses/cs552/S12/

Wiscalculator



A simple simulator and debugger for the WISC-SP12 ISA is provided. This simulator can read in the output of the assembler and execute it. You can step one instruction at a time to determine how the individual steps in your program affect the state of the machine.

One way to use this program for verification is to compare the state of registers in the writeback stage with the registers printed by this simulator.

You can run this simulator by invoking the following command at a unix prompt:

/afs/cs.wisc.edu/p/course/cs552-david/public/html/S12/handouts/bins/wiscalculator

The directory /afs/cs.wisc.edu/p/course/cs552-david/public/html/S12/handouts/bins should be added to your PATH variable.

Type help at its prompt to see what all it can do.

Normal usage (in King-lab machines):

wiscalculator loadfile_all.img

Usage in Mumble-lab machines:

wiscalculator_mumble loadfile_all.img

With this usage, the simulator will run the program and print a step by step listing of the instructions executed and what registers they write to etc. A file called archsim.trace will be created.

Example archisim.trace

PC: 0x0000 REG: 0 VALUE: 0x0000
PC: 0x0002 REG: 0 VALUE: 0x004c
PC: 0x0004 REG: 1 VALUE: 0x0000
PC: 0x0006 REG: 1 VALUE: 0x0054
PC: 0x0008 REG: 2 VALUE: 0x0007
PC: 0x000a ADDR: 0x004c VALUE: 0x0007
PC: 0x000c REG: 3 VALUE: 0x0007 ADDR: 0x004c
PC: 0x000e REG: 4 VALUE: 0xfff9
PC: 0x0010 ADDR: 0x0050 VALUE: 0xfff9
PC: 0x0012 REG: 0 VALUE: 0x0050
PC: 0x0014 REG: 5 VALUE: 0xfff9 ADDR: 0x0050
PC: 0x0016 REG: 2 VALUE: 0x000f
PC: 0x0018 ADDR: 0x004e VALUE: 0x000f
PC: 0x001a REG: 0 VALUE: 0x004d
PC: 0x001c REG: 6 VALUE: 0x000f ADDR: 0x004e

2.  Source code

This source is provided under the following conditions.

You shall not redistribute this code. You may use this code exclusively for cs552 related use. For any other type of use contact the instructor first.

Use the Makefile and download all files from the filesystem:

/afs/cs.wisc.edu/p/course/cs552-david/public/html/S12/project/simulator







 
Computer Sciences | UW Home