Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For the following instructions, answer the following questions based on the sing

ID: 2249165 • Letter: F

Question

    For the following instructions, answer the following questions based on the single-cycle processor architecture in Figure 1.
    (1) ADD   $s0, $s1, $s2
    (2) AND   $s0, $t0, $t1
    (3) J
    (4) BEQ   $s1, $s2, 0XFFFF
    (5) LW     $s0, 20(Ss1)
    (6) SW     $s0, 20($s1)

    Fill out the table below to show the value of the control signals
    generated by the control unit, and ALU control for each instruction?
    You may use Figure 4.12, Figure 4.13, Figure 4.16, and Figure 4.22 in

Computer Organization and Design by Patterson and Hennessy, 5th edition.

What is the value of PC after each instruction? Assume PC for each

Instruction/Signal RegDst Jump Branch MemRead MemtoReg MemWrite ADD AND J BEQ LD Instruction 125 Shift Jump address 2 PC+4 28 Add RegDst Shift Insmuction 131-261 Control Instruction [25-21] [Read register 1 Road struction [20-161 Reed dala1 Wrile Road PCRead Zero regster 2 31-0 ALU ALul-Address 'data register data2 tucton [15-111 memory Wribe Data Sign 32 extend 15-0 ALU Figure 1. MIPS Single cycle processor

Explanation / Answer

PC=PC+4 (for register instructions)

PC= label (for branch or jump instructions)

Instruction/Signal RegDst Jump Branch MemRead MemtoReg MemWrite ADD 1 0 0 0 0 0 AND 1 0 0 0 0 0 J X 1 0 0 X 0 BEQ X 0 1 0 X 0 LD 0 X X 1 1 0