Sprint 2001, Computer Org, Assignment 4

Due Tuesday, April 10 at the start of class

  1. (2 points) What is the Micro Assembly Language (MAL) instruction for this hex microinstruction?
    54C0C2147
  2. (2 points) What is the hex microinstruction for this Micro Assembly Language (MAL) instruction?
    MAR=OPC=TOS+H>>1;rd;if (Z) goto 0x192 else goto 0x092
  3. (4 points) The instruction ISHR (arithmetic shift right) exists in JVM but not in IJVM. It uses the top two values on the stack, replacing the top with a single value, the result. The second word on the stack is the operand to be shifted. Its content is shifted right by a value between 0 and 31 inclusive, depending on the value in the 5 least significant bits of the top word on the stack (the other 27 bits of the top word are ignored). The sign bit is replicated to the right for as many bits as the shift count. Extend the microcode to include this instruction as part of IJVM. You may not make any assumptions about what the opcode for the instruction is. (Hint: You will need to generate the number 31)
  4. (2 points) Draw a finite state machine for branch prediction that uses three bits. It should only change predictions after three consecutive mispredictions.
  5. (3 points) Mic-3. Figure 4-33 on page 258 shows how the SWAP instruction from Mic-2 would be sequenced in Mic-3. Create a similar table for IF_ICMPEQ.
  6. (3 points) In Fig. 4-43, suppose that I6 was R5=R0-R2 and I8 was R2=R4+R4. Indicate which instructions could be issued and which could be retired in each cycle from cycle 6 forward. You do not need to indicate the scoreboard for the registers being read and written.
  7. (4 points) Consider the direct-mapped cache on page 267.