Answered step by step
Verified Expert Solution
Question
1 Approved Answer
REFERENCE - Problem 2 For this problem you are to use the code below that implements a loop. Let us assume that the code is
REFERENCE -
Problem 2 For this problem you are to use the code below that implements a loop. Let us assume that the code is loaded onto the memory starting at location Ox08000 (Ox means that the number that follows is hexadecimal). Please determine the format of each instruction, its location in memory, and its code. Use the table below Iw ori $a3, $0,8 $a1, 32($t2) sum: bne $a3, $0, sum_xt sub $5, $5, $7 addi $8, $7,-4 sum sum_xt: lui $4, 1025 Instruction Format Address Instruction code (Hexadecimal notation) (Hex) oprsrtrd shamt funct 0x8000 d 107 8 ori $a3, $0, 8 lw $a1, 32($12) bne $a3,$0, sum_xt sub $5, $5, $7 addi $7, $7,-4 j sum lui $4, 1025 0/24hex (4) Shex jr 24hex finex 0/25 hex MIPS Reference Data Card (Green Card") 1. Pull along perforation to separate card 2. Fold bottom side (columns 3 and 4) together EE334 MIPS Instruction Set Reference Card ARITHMETIC CORE INSTRUCTION SET OPCODE / FMT/FT Reference Data FOR- /FUNCT NAME, MNEMONIC MAT OPERATION (Hex) CORE INSTRUCTION SET OPCODE Branch On FP True bclt FI if(FPcond)PC-PC+4+BranchAddr (4) 11/8/1/-- FOR- /FUNCT Branch On FP False bclf FI if(!FPcond)PC=PC+4+BranchAddr(4) 11/8/0/-- NAME, MNEMONIC MAT OPERATION (in Verilog) (Hex) Divide div R Lo=R[TS]/Rrt); Hi=R[rs]%R[it] Add add R R[rd] - R[rs] +R[rt] (1) 0/20hex Divide Unsigned divu R Lo=R[rs]/R[rt); Hi=R[rs]%R[rt (6) 0/--/--/1b FP Add Single add.s FR F[fd ]=F[fs] + F[ft] 11/10/--/O Add Immediate addi I R[rt] =R[rs] + SignExtImm (1,2) Shex FP Add add.d FR {F[id],F[fd+1]} = {F[fs],F[fs+I]) + Add Imm. Unsigned addiu 1 R[rt] =R[TS] + SignExtImm (2) hex Double {F[ft],F[ft+1]} Add Unsigned addu R R[rd] =R[rs] +R[rt] 0/21 hex FP Compare Single cx.s* FR FPcond = (F[fs] op F[ft]) ?1:0 11/10/--/y FP Compare And and R R[rd] =R[TS] & R[rt] card FR FPcond ({F[fs],F[fs+1]) op 11/11/--/y Double {F[ft],[ft+1]))?1:0 And Immediate andi I R[ft] - R[rs) & ZeroExtImm (3) Chex * (x is eq, lt, or le) (op is ==, >> shamt 0/--/--/3 or R R[rd] =R[rs) | R[rt] Store FP Single wci 1 M[R[rs]+SignExtImm] - F[ru] (2) 39/-/-/- Or Immediate ori I R[rt] = R[rs] | ZeroExtImm (3) dhex Store FP M[R[rs]+SignExtImm] - F[rt]; (2) 34 Set Less Than sit RR [rd] =(R[rs] > shamt PSEUDOINSTRUCTION SET sb NAME M[R[rs]+SignExtImm)(7:0) = MNEMONIC Store Byte OPERATION R[rt](7:0) 28hex Branch Less Than blt if(R[rs]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started