HomeAssignment Week1
HomeAssignment Week1
Literature
MIPS Lab Environment Reference
Installation
Extract MipsIt.zip to installed folder, C:\MipsIt for example. After this step, MipsIt folder will have following structure: - MipsIt\bin: include execution files, such as o MipsIt.exe: an editor and compiler program o Mips.exe: a simulator program o MipsPipeS.exe: a simple pipeline simulator program o MipsPipeXL.exe: a more complicated pipeline simulator program - MipsIt\include: include header files - MipsIt\lib: include library files
IDE Basics
The IDE consists of the following windows (see Figure 1):
The project view that contains a list of files included in a project. To open a file for editing, double click on it in the list. The output window where all output from building etc. is printed.
Many commands also have hotkeys (like most Windows programs) to make work more efficient. There is also a toolbar with some of the commands. Some commands are disabled at all times. These are currently non-implemented. To configure the IDE, choose Options from the File menu. You can change COM settings (for connecting to MIPS development board only), compiler executable, paths etc. When you start MipsIt the first time it will normally auto-configure correctly except for the COM-port. After changing any COM settings MipsIt needs to be restarted.
The Simulator
The simulator (MIPS.EXE) provides you with the possibility to run programs without the MIPS board. It basically includes the same facilities as the monitor (breakpoints, stepping etc.) except with a graphical user interface and not by entering commands in a console. The main view (Figure 2) consists of 6 units, CPU, RAM, Console, I/O, D-Cache and I-Cache. When you click on a unit a window will appear (or disappear if it is already open). There is also an interrupt unit available from the View menu. Here follows a brief description of each units window: CPU View/modify the CPU registers. RAM View/modify memory, also referred to as the MemView. This unit has most functions of all, for a more detailed description see below. Console Standard input/output for programs that use it. I/O Simulates the 8-bit I/O unit, with 8 switches and 8 LEDs.
D-Cache/I-Cache Views of the data and instruction caches. Interrupt Simulates the interrupt unit, with buttons K1, K2 and the timer.
result in a bigger executable (which wont work with the simulator). A C(minimal)/Assembler project will link with only the absolute necessary libraries and will result in a smaller executable than with C/Assembler (which will work with the simulator). 3. Enter a name for the project and change the location if desired, and then click OK.
in the output window (see Figure 5). When the project has been successfully built you can now upload the executable to the simulator by choose Upload\Upload to simulator from Build menu (or by press F5). In case you want to re-compile all files, even those that have not been modified since last build, choose Rebuild All from the Build menu. After upload the executable file to simulator, you can run this program overall or run through single steps. When click on Memory unit, you can see your code. You also view the content of register set by choose View\Register in the menu or by click on CPU unit.