Assignment 24 (Assigned October 29)


  1. In the figure below, we show an n-bit data path for a micro-controller that includes a register file, an eight function ALU, a shift unit, an input unit, and a memory unit. Modify the data path to include an output device that can display an n-bit number.
  2. Using this path with n=4, write control instruction for each of the following steps.
    1. Transfer an input to register 2.
    2. Transfer the next input to register 4.
    3. Transfer contents of register 2 to M register
    4. Transfer a value 0 to register 2.
    5. Select register 2 and register 4 on the two ports 1 and 2, respectively. Select output of ALU to be value on port 1 or arithmetic sum of the values on two ports depending on the least significant bit of M register being 0 or 1. The shift unit must shift the data right (in the figure below it looks like up) with M-register. Write the result back in register 2 in ALU.
    6. Repeat the above step 3 more times.
    7. Store the contents of M register in register 3 of the register file.
    8. Display the value in register 3 in the output device.
  3. Assuming that the two inputs in step 1 and 2 in Problem 2 are 0010 and 0011, show the values in register 2, register 3, ALU output, and M register after each step in Problem 2.