Archive for the ‘Computer Architecture’ Category

Install (Set up) Xspim MIPS simulator in Ubuntu

Had to recently use xspim for a course in computer architecture.

The program simulates R2000 and R3000 processors, and was written by James R. Larus. The MIPS machine language is often taught in college-level assembly courses.

First you want to grab the required packages:

sudo apt-get install flex bison byacc libx11-dev libxaw7-dev build-essential linux-headers-`uname -r`

Download the xspim simulator from Larus’s website: http://pages.cs.wisc.edu/~larus/spim.html and navigate to the directory you extracted it in.

Now for xspim you need to navigate to the xspim sub directory and simply:

xmkmf
make
sudo make install

Now you will be able to launch the xspim simulator from the terminal by typing ‘xspim’.

xspim

A thing to note about using xspim on your machine: In our course we do most of our demonstrations on the Solaris machines which have Big Endian processors, on my laptop I am using a Pentium T9400, which is x86, which is Little Endian.  There may be some problems with programs that you write, I have not experienced any differences yet. Good Luck!

Resources:

Endianness (Wikipedia)