Older Versions of SPIM

The information describes the older versions of spim. Don't use them! Switch to QtSpim instead.

Older versions of the various simulators are in the BoneYard directory of the SourceForge repository: http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/BoneYard/. Some of the versions are ready to run, but many need to be compiled.

Versions of Spim before 7.0 implemented the MIPS-I instruction set used on the MIPS R2000/R3000 computers. This architecture is obsolete (though, never surpassed for its simplicity and elegance). Spim now supports the more modern MIPS32 architecture, which is the MIPS-I instruction set augmented with a large number of occasionally useful instructions. MIPS code from earlier versions of SPIM should run without changes, except code that handles exceptions and interrupts. This part of the architecture changed over time (and was poorly implemented in earlier versions of Spim). This type of code will need to be updated. Examples of new exception handling are in the files: exceptions.s and Tests/tt.io.s.

Installing Older Versions of SPIM

Microsoft Windows

  1. To run PCspim under Microsoft Windows, download the PCSpim.zip file from https://sourceforge.net/projects/spimsimulator/files/.

  2. Unzip the file.

  3. Click on the setup.exe program.

Unix, Linux, or Mac OS X

Installation is a bit more complex for these system, as you need to compile the program for your particular computer and operating system.

  1. Download the files from the SourceForge repository. At the bottom of the list of files, there is a link to download a GNU tarball, which will get all the files in the latest version of the system. You don't need the Boneyard directory, which contains old versions, or QtSpim, but the other directories are useful.

  2. The simple terminal interface is contained in the spim subdirectory and the X-windows interface is in the xspim subdirectory . The other directories are described in the README file.

  3. Next, you must set the directories in which Spim will be installed by editing the Makefile (the file that contains instructions on building Spim). In general, if you are installing Spim and want the windowing version (xspim), edit the file xspim/Imakefile . If you don't want xspim or are running on a system without X-windows installed, use the file spim/Makefile.

    The programs are installed in standard locations, but you can change to other locations:

        EXCEPTION_DIR -- The full pathname of the directory in which to install the Spim exception handler (exceptions.s).

        BIN_DIR -- The full pathname of the directory in which spim and xspim should be installed.

        MAN_DIR -- The full pathname of the directory for the man pages for spim and xspim.

    In general, the remaining parameters in a Makefile need not be changed.

  4. If you are building xspim, change to the xspim subdirectory and type:

        % xmkmf
        % make

    If your systems do not have xmkmf installed, you can use the Makefile in the xspim subdirectory, but beware that it may not work on your system because the paths to the X windows libraries could be different.

  5. If you do not have X-windows, change to the spim subdirectory, edit Makefile, and type:

        % make   

  6. To run spim or xspim, the exception handler must be installed in the directory specified by EXCEPTION_DIR in the Makefile. If exception.s is not installed, spim and xspim fail before they start running. You can either install this file by hand or by typing:

        % make install

    which also installs spim or xspim, and the man pages. You may need root permission to install these files, in which case type:

        % sudo make install

  7. To test that Spim is correctly built, change to the spim subdirectory and type:

        % make test

    and examine the output of the test. (Note: the exception handler must be installed before running the test.)