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

Use the data path to trace the execution path of the following MIPS instructions

ID: 3673446 • Letter: U

Question

Use the data path

to trace the execution path of the following MIPS instructions (one instruction per diagram):

and $t0, $t1, $t2

sw $t0, 1024( $t1 )

beq $t0, $t1, L1 # address of L1 is 0xA100

On each diagram, indicate the values of all bit segments ( ex. [31-26] ) and the values for all control signals.

0 Add Add ALU Addresult Shift left 2 RegDst Branch MemRead Instruction [31-26] emtoReg Control ALUO emWrite ALUSrc RegWrite Instruction [25-21 Read Read Paddress register 1 Read Instruction [20-16] Read data 1 register 2 Write Read Zero ALU ALU result Instruction 31-0) e data 2 Read Address data Instruction memor)y | |Instruction [15-11] registe Write data Registers Write Data data memor Instruction [15-0] 16 Sign- 32 ALU control extend Instruction [5-0]

Explanation / Answer

truction: r3 = r1 + r2 R 0 rs=r1 rt=r2 rd=r3 shft=X funct=32 1. instruction fetch move instruction address from PC to memory address bus assert memory read move data from memory data bus into IR configure ALU to add 1 to PC configure PC to store new value from ALUout 2. instruction decode op-code bits of IR are input to control FSM rest of IR bits encode the operand addresses (rs and rt) – these go to register file 3. instruction execute set up ALU inputs configure ALU to perform ADD operation configure register file to store ALU result (rd)