CS 2734
Computer Organization II
Laboratories 9, 10 [11/10; 11/12] [11/17; 11/19]
Components for the MIPS Simulator
- Create a new directory for this assignment.
- You should implement the MIPS simulator components in
the following order: (Refer to Fig. 5.29 on page 372.)
You should finish this lab early next week (Nov 17) if
possible, and start on the full-blown simulator (Lab 11).
- ALU: Use header file mipsALU.h.
(Already implemented as part of Lab 8.)
- Register File: Use header file mipsRegFile.h.
(Already implemented as part of Lab 8. This register file
occurs midway in the simulation, and then a second time
in case a register must be written.)
- Instruction Memory: Use header file mipsInstrMem.h.
(Here you also need to load the memory: read instructions from
another file, storing 32-bit words in successive locations in
and array. Then, given the input instruction address (the PC),
divide it by 4 and fetch the instruction at that array index.)
- Instruction Register: Use header file mipsInstrReg.h.
(This is a component not shown in Fig. 5.29. It takes an input
instruction and tears it apart into separate fields. Note that
some fields overlap.)
- Control: Use header file mipsControl.h.
(This just implements Fig. 5.27 on page 370.
Note that I have combined ALUOp0 and ALUOp1 into one 2-bit integer.
You need to add a j instruction with op = 2
that will only assert the Jump control line.)
- ALU Control: Use header file mipsALUControl.h.
(This just implements Fig. 5.15 on page 356.)
- Data Memory: Use header file mipsDataMem.h.
(This is the rightmost component in Fig. 5.29.)
- Here are the actual header files as a starting point
for creating each simulator component in turn:
- You may check each component off separately.
You must show your source code for the componenet when you get it
checked off.
Revision Date: 11/10/98