ECE314sp08_HW4 - ECE/CS 314 Spring 2008 Hung Dang hvd2...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ECE/CS 314 Spring 2008 Hung Dang hvd2 Homework 4 Due Tuesday, March 11, 2008 before 10:00pm EST Problem 1. (30 points) During the discussion of the single cycle processor in class several interesting MIPS instructions were not mentioned. For each of the following instructions describe how to modify the single cycle datapath to implement these instructions. If no modifications are necessary, explain how the datapath could execute the instruction. You may describe your answers in words or draw your answer on the datapath diagram shown on the last page of the assignment or do both. Please try to be as specific and clear in your answers as you can! a) Load Upper Immediate: lui No modifications are necessary. The immediate field is loaded into the ALU. ALU is used to do the left shifting operation to the immediate field with shift amount of 16. The ALU’s output is to be written back to the destination register hence data source to the W input for Reg File is the ALU’s output and WE is 1. There is no memory read or write so DMC should be zero. b) Jump and Link: jal Modifications are necessary since the calculation of target PC is different from that of branch instructions. The jump target address is obtained by shifting the lower 26 bits (immediate field) of the jumping instruction left 2 bits adding two low-order zero bits in the process. The result is then concatenated with the upper 4 bits of PC + 4 as the high- order bits. For the multiplexor near PC, it is rewired to choose between the jump target and either the branch target or the next instruction instead of between next instruction and branch target. This multiplexor is controlled by the jump control signal. For the linking
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern