Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please explain step-by-step how to solve these kinds of questions Consider the following MIPS code, which implements the factorial function. beg addi SW SW addi
Please explain step-by-step how to solve these kinds of questions
Consider the following MIPS code, which implements the factorial function. beg addi SW SW addi jal $zero, $a0, turn $sp, $sp,-8 $ra, 4 ($sp) $a0,0 ($sp) a0, $a0,-1 fact a0,0 ($sp) $v0, $v0, $a0 ra, 4 ($sp) $sp, $sp, 8 ra mulu 1w addi Jr turn: vO, zero, 1 ra addi Assume that the function is executed on a MIPS processor with a 5-stage pipeline. The processor has separate direct mapped instruction and data caches, each with a capacity of 4096 bytes and a block size of 16 bytes. The first instruction beq of the factorial function starts at address 0x0040000c. Assume that both caches are empty (all valid bits are zero) before the factorial function is called. What is then the data cache miss rate and the instruction cache miss rate when function fact is called? Before the call, register $a0 contain value 4, and register $sp contain values 0x7ffffffc. (15 points) Consider the following MIPS code, which implements the factorial function. beg addi SW SW addi jal $zero, $a0, turn $sp, $sp,-8 $ra, 4 ($sp) $a0,0 ($sp) a0, $a0,-1 fact a0,0 ($sp) $v0, $v0, $a0 ra, 4 ($sp) $sp, $sp, 8 ra mulu 1w addi Jr turn: vO, zero, 1 ra addi Assume that the function is executed on a MIPS processor with a 5-stage pipeline. The processor has separate direct mapped instruction and data caches, each with a capacity of 4096 bytes and a block size of 16 bytes. The first instruction beq of the factorial function starts at address 0x0040000c. Assume that both caches are empty (all valid bits are zero) before the factorial function is called. What is then the data cache miss rate and the instruction cache miss rate when function fact is called? Before the call, register $a0 contain value 4, and register $sp contain values 0x7ffffffc. (15 points)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