X-Window Interface

Figure: X-window interface to SPIM.
\begin{figure}\centerline{\psfig{figure=xinterface.id,height=4.5in}}
\end{figure}
The X version of SPIM, xspim, looks different, but should operate in the same manner as spim. The X window has five panes (see Figure [*]). The top pane displays the contents of the registers. It is continually updated, except while a program is running.

The next pane contains the buttons that control the simulator:

quit
Exit from the simulator.

load
Read a source file into memory.

reload
Reinitialize memory and then reload the last file read with load.

run
Start the program running.

step
Single-step through a program.

clear
Reinitialize registers or memory.

set value
Set the value in a register or memory location.

print
Print the value in a register or memory location.

breakpoints
Set or delete a breakpoint or list all breakpoints.

help
Print a help message.

terminal
Raise or hide the console window.

mode
Set SPIM operating modes.

The next two panes display the memory contents. The top one shows instructions from the user and kernel text segments.3 The first few instructions in the text segment are startup code (__start) that loads argc and argv into registers and invokes the main routine.

The lower of these two panes displays the data and stack segments. Both panes are updated as a program executes.

The bottom pane is used to display messages from the simulator. It does not display output from an executing program. When a program reads or writes, its IO appears in a separate window, called the Console, which pops up when needed.

Ian Moor 2009-03-11