Main »

WISC-SP13 Simulator-debugger

Tasks

edit SideBar

On this page... (hide)

  1. 1. Usage
  2. 2. Source code

1.  Usage

A simple simulator and debugger for the WISC-SP13 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:

/u/k/a/karu/courses/cs552/spring2013/handouts/bins/wiscalculator

The directory /u/k/a/karu/courses/cs552/spring2013/handouts/bins is already added to your PATH variable.

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

Normal usage:

wiscalculator 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.

Download all files from : http://pages.cs.wisc.edu/~karu/courses/cs552/spring2016//handouts/simulator/
or from the filesystem: /u/k/a/karu/courses/cs552/spring2013/handouts/simulator

And then, use the Makefile to build the simulator.


Page last modified on January 22, 2013, visited 829 times

Edit - History - Print - Recent Changes (All) - Search