Main »

WISC-SP13 Simulator-debugger

edit SideBar

On this page... (hide)

  1.   1.  Usage
  2.   2.  Troubleshooting Missing Dynamic Libs
  3.   3.  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:


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

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

Normal usage:

    prompt> 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.  Troubleshooting Missing Dynamic Libs

If you encountered the error of not finding certain dynamic .so.x libs when running wiscalculator on a CSL machine, this is probably due to CSL machines switching to Ubuntu 20.04 which delivers newer versions of these libs than what our simulator was linked against.

You will need to create some symlinks to work around this issue.

First, create a ~/lib/ directory in your home directory, if you do not have it yet. Then, add this line to your .bashrc to include ~/lib in linker's search path:


Don't forget to source ~/.bashrc to make immediate effect.


prompt> cd ~/lib
prompt> ln -s /usr/lib/x86_64-linux-gnu/
prompt> ln -s /usr/lib/x86_64-linux-gnu/

3.  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 :
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 October 22, 2020, visited times

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