CS/COE 447: Spring 2010 Lab 14 YOUR NAME: YOUR PARTNER'S NAME: Question 1: Suppose that a lw instruction is executed using the multi-cycle control shown on the handout (which is from the multi-cycle execution lecture notes). State what happens during each cycle of execution. Your answers should be in terms of A, B, ALUOut, PC, Memory[...], IR[...], Reg[...], sign-extend, MDR, PC, etc. as in the lecture notes. Though you have this answer in your lecture notes, try to do this just by looking at the Figure, checking your answers against the lecture notes only if you have to. Question 2: Suppose that a lw instruction is executed using the multi-cycle control shown on the handout. What are the values of ALUSrcA, ALUSrcB, IorD and MemToReg during each cycle? Please fill in the table below. (Use X for ``don't care''.) Please try to do this looking only at the handout. You can check your answers against the lecture notes. ALUSrcA ALUSrcB IorD MemToReg Cycle 1 Cycle 2 Cycle 3 Cycle 4 Cycle 5 Question 3: This question is about the components of the multi-cycle datapath that deal with updates to the PC. Suppose that the current instruction is an add instruction. During which cycle is PCWrite 1? During that cycle, what values do the following signals have? ALUSrcA ALUSrcB PCSource Now suppose the current instruction is a beq, and that the two registers are equal (so, the branch will be performed). During cycle 3, what values do the following have? PCSource Output of the AND gate at the top left Output of the OR gate at the top left Now suppose that the current instruction is a j. During cycle 3, what values do the following have: PCWrite PCSource