Question 1
- It is impossible to fit an address into an instruction
since both are 32 bits.
Be prepared to implement la on the final exam using 64 bits for the
instruction.
- ISAs are much more complicated and compilers have improved; they now produce better code than excellent programmers.
See Chapter 2 fallacies on page 144
- Approximately, but not exactly, 6.666.
Floating point numbers are approximations so the addition can't be accurate.
- Every instruction has the same speed - the speed of the slowest
instruction.
There are two separate memories; this violates the basic stored-program
principle on page 145.
- Exception causes a context switch where:
PC = 0x80000180
EPC = address of instruction when exception occurred
Cause = type of exception
Question #2
The fetch, address computation and memory read work exactly like the lw;
see Figure 5.20
The word from Read data must go to the PC instead of Registers Write data
port.
So expand the Jump mux to 4 inputs; the 3rd input comes from Read data.
The Jump mux needs a new select line (JM)
Question #3
This was taken directly from Homework #3.
Prepare for lots of arithmetic questions on the final exam - worth many points.
# The sum < both operands if there is a carry
# Perform the addition
addu $t2,$t4,$t5
# Carry = 1 if $t2 < $t4
sltu $t6,$t2,$t4
# Return
jr $ra
Question #4
- The jump can jump much farther than the beq: 28 bits versus 18 bits
-
lui $2, ADDR/65536
ori $2, $2, ADDR*65536/65536
jr $2
- 0x10000003
Question #5
22.375 = 10110.011 = 1.0110011 x 2 4
Exponent = 4 + 127 = 0x83 = 10000011
Float = 0 10000011 011001100...0000 = 0x41B30000
Question #6
Figure 5.30 for R-type instructions shows the data path used.
slt requires 4 clocks.
| Control Signal |
Decode Step |
Execution Step |
| ALUSrcB |
11 |
00 |
| ALUSrcA |
0 |
1 |
| RegDst |
X |
X |
| ALU Control lines |
0010 |
0111 |
Question #7
- Kidder nevers explicitly states the reason but infers:
To teach the team to be self sufficient and resourceful.
To protect the team from DG politics.
- To speed up the cpu.
- Some recompiled Eclipse programs might not run on the Eagle. Some would.
This is a code port problem; customers don't want to port their code
for the many reasons we discussed in class.
The Data General customers expected to run their Eclipse programs on the
Eagle without doing any port work.
- You can make cpu design changes (both in development and in the field)
without changing any circuits.
You can write emulators.
- The whole purpose of the project was 32 bithood - a machine with a
32 bit address space.
So Wallach had to start with the address space decision.
Note for final: he had one other absolute requirement - no mode bit.
- They thought the kids would know more than them.
They believed the kids wouldn't be limited by past experience.
- The team was disbanded by Data General and most of the team
quit the company.
They felt unappreciated.
Question #8
0110000 = 0x30
- 0110 = 0x06
----
0x2A
Question #9
5-39 control requires a state machine to determine which clock step
is running.
A state machine cannot be implemented in a ROM.
MIPS control is implemented with a microsequencer (a simple cpu)
that executes a program (microprogram) to generate the control signals.