Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4. Consider the following MIPS assembly language code fragment. enigma addi $3, $0, 1000 s11 $3, $3, 2 add $3, $3, $1 add $2, $0,
4. Consider the following MIPS assembly language code fragment. enigma addi $3, $0, 1000 s11 $3, $3, 2 add $3, $3, $1 add $2, $0, $0 lw $4, 0($1) slt $5, $4, $0 beq $5, $0, skip sub $4, $0, $4 add $2, $2, $4 addi $1, $1, 4 slt $5, $1, $3 bne $5, $0, loop loop skip: Assume this code is run on a machine that requires the following number of cy- cles for each instruction. Instruction Cycles add, addi, sll, slt, sub3 bne If the clock speed of the machine is 3.75 GHz, how many seconds will it take to execute this code in the worst case, (i.e., longest possible execution time)? 4. Consider the following MIPS assembly language code fragment. enigma addi $3, $0, 1000 s11 $3, $3, 2 add $3, $3, $1 add $2, $0, $0 lw $4, 0($1) slt $5, $4, $0 beq $5, $0, skip sub $4, $0, $4 add $2, $2, $4 addi $1, $1, 4 slt $5, $1, $3 bne $5, $0, loop loop skip: Assume this code is run on a machine that requires the following number of cy- cles for each instruction. Instruction Cycles add, addi, sll, slt, sub3 bne If the clock speed of the machine is 3.75 GHz, how many seconds will it take to execute this code in the worst case, (i.e., longest possible execution time)
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