Spring 2001, Computer Organization, Assignment 3

Due Thursday, March 15, at the start of class.

Type all the answers. Hand in a printout. Upload the assignment via the web: Submitting Homework Online.

  1. (3) In section 3.7.2, assume that the memory space is 128K; the EPROM is 2K in size and will be placed at address 120K; the RAM is 4k in size and will be placed at address 36K; the PIO is 4 bytes and will be placed at address 3K. Write the boolean equations for the chip select pin for each chip, using full address decoding. Do not draw the circuit.
  2. (2) In Figure 4-2, one way for producing B is shown. Find two more ways.
  3. (2) In Mic-1, assume that it takes 1 nsec to set up MIR, 1 nsec to gate a register onto the B bus, 3 nsec to run the ALU and shifter, 1 nsec for the results to propagate back to the registers, and the clock pulse width is 2 nsec.
    1. Can this machine run at 100 MHz? Explain your answer.
    2. Can this machine run at 150 MHz? Explain your answer.
  4. (1) How long does a 200 MHz Mic-1 take to execute the Java statement
    i = j + k
    Give your answer in nanoseconds.
  5. (1) Suppose there were 2 additional condition codes: C and O; and two additional JAM bits: JAMC and JAMO. What would be the boolean function for the new "High Bit" in Figure 4-6?
  6. (4) What would be the microcode to implement the instruction IFGT offset that will branch to offset if the top of the stack is greater than 0? Indicate the necessary restictions on the location in the microstore of any labels that are used.
  7. (3) The full JVM has a special opcode for loading the third local variable: ILOAD_3. It is equivalent to ILOAD 3 (load the third local onto the stack, not the iload3 statement from the microcode). However, it is only 1 byte long, with no index following it (in other words, the 3 isn't stored in the machine code anywhere). How could this be implemented in Mic-1? Try to do it in 5 or less instructions.
  8. (1) Give the Java (or C++) statement that produced the following IJVM code:
    ILOAD j
    ILOAD k
    ISUB
    BIPUSH 6
    ISUB
    DUP
    IADD
    ISTORE i
  9. (1) The IJVM INVOKEVIRTUAL instruction needs to know how many parameters it has. Why?
  10. (2 points) State succinctly what each of the following code fragments are doing. Do not explain what each line is doing, explain what each group of code does.
    1. PC = PC+1; fetch
      PC = PC+1; fetch
      H = MBRU << 8
      H = MBRU OR H
    2. TOS = MDR
      MAR = SP = SP+1; wr