MipsIt Simulator Manual
MipsIt Simulator Manual
Figure 1 - Folders and files that arise when decompress the file Mipsit.zip.
The bin directory ( "binaries") is the one that contains executable programs. In this
practice we will use two of them:
• MipsIt.exe → MipsIt Studio 2000 (programming environment for MIPS).
• Mips.exe → MipsSim (simulator MIPS).
It is appropriate to create two shortcuts from the Windows desktop to programs
MipsIt.exe and Mips.exe.
Introduction
This is the programming environment in which we will write our programs for MIPS
assembler. The graphical interface is similar to other applications such as Microsoft Developer
Studio for C + + and Borland JBuilder for Java.
In the menu "View" you can always choose which of these windows must be displayed
on screen.
Configuration
In the "File" menu, submenu "Options", we can configure MipsIt Studio 2000. In
addition to information about hardware (in case you have a plate), we can specify the directory
where the files are executable (bin), library files (lib) and header (include) the application.
You can also specify the location of the compiler (bin / xgcc.exe).
Creaction of a project
1. Select the "File" menu, submenu "New". Click on the tab "Project" if it is not selected
by default.
2. Choosing the type of project we are going to create. There are three possibilities:
Assembler → • The project files contain only assembler.
• C / Assembler → will only files in C language or files in C and assembler. We do not
recommend this option, because these programs can not be simulated with MipsSim.
• C (minimal) / Assembler → As in the previous case, but using only the basic files
library imperative. These programs do work in the simulator.
3. In "Project name" introduces the name of the project and specifies the location
( "Location"). Click OK.
Figure 4 - Window dialog creation of a project.
Figure 5 - Window dialogue to create a new file associated with the project.
We can open each of these modules simply by clicking on them. For example, if we open the
CPU, this is what we see:
RAM Memory
Recall that MIPS has an address space of 32 bits, or what is the same, a total of 232
positions 1 byte of memory each, amounting in total to 4 gigabytes.
By clicking on "RAM, you'll see a window with the contents of the report ordered by
rows. Each one carries an address specified ( "Address"), beside which appears the memory at
that position (both expressed in hexadecimal notation compact). If there is a label that
identifies such instruction, it appears in the column "Label". Lastly is the equivalent assembler
of such instruction
Precisely the assembly instructions that appear on the memory need not coincide exactly
with whom we have introduced in MipsIt Studio 2000. This is true, for example, if we used
pseudoinstrucciones reorders or if the assembly instructions for the purpose of optimizing the
code and management delays in jumps.
The positions that have no memory allocated data show content with queries (??).
Move along the memory using the arrows on the window or the scroll bar can be very
frustrating, because the memory includes 4 GB and these controls are not very manageable. It
is better to use the context menu that appears by clicking the right mouse button.
Figure 9 - Context menu that appears by clicking the right mouse button in the window of RAM.
The content of this menu is divided into four sections:
• The first lets you select between showing memory addresses virtual or physical.
Overall, the virtual addresses are those that concern us most.
• The second allows you to choose how to translate the contents of memory every
command. By default, we will use "Assembler" to see the equivalent assembler code machine,
but we can also choose between interpreting bit like whole numbers, integers unsigned, with
floating point precision as if they were single or ASCII characters.
• The third section, the most interesting, allows us to move easily along the memory:
or "Track Computer" keep the instruction indicated by the accountant's PC at the center of the
window. This allows always know what instruction is being implemented.
or "Jump to PC" jumps to the position of memory pointed by the PC, without track ( "track")
as the previous option.
or "SP Jump to" jump to the position memory indicated by the stack pointer SP.
or "Jump to Symbol" jumps to the position memory indicated by a label or symbol.
• The fourth and final section of this menu allows you to modify the value of the
counter program to specify what will be the next instruction to be executed ( "Set Next
Statement") and allows us to establish a breaking point for debugging tasks of the programme (
"Set Breakpoint"). It also can be placed directly break points by double-clicking on the
instruction of interest (which will be marked with a circle to the left of it).
Simulation
With a program loaded into RAM as we can simulate. To do this we have three buttons
that allow us to monitor the performance:
• The green arrow to the right causes the program simulating from start to finish (or
until the first point of rupture). Should have stopped the program with the pause button or
through a breaking point, allowing resumption of execution.
• The two vertical bars yellow allow a pause in the execution.
• Finally, the button with a blue and an arrow rectangulito allow execute instructions in
machine code from one to one.