Question
Help with MIPS Assembly question Question 1 int fib(int n) { int a = 0; int b = 1; int c = a + b;
Help with MIPS Assembly question
Question 1
int fib(int n) {
int a = 0; int b = 1; int c = a + b;
while (n > 1) {
c = a + b; a = b; b = c; n--;
}
return c;
}
Data Flow Programs
Draw the data flow graph for the fib(n) function . You may use the following data flow nodes in your graph:
+ (addition)
> (left operand is greater than right operand)
Copy (copy the value on the input to both outputs)
BR (branch, with the semantics discussed in class, label the True and False outputs) You can use constant inputs (e.g., 1) that feed into the nodes. Clearly label all the nodes, program inputs, and program outputs. Try to the use fewest number of data flow nodes possible.
Question 2:
Performance Metrics
If a given program runs on a processor with a higher frequency, does it imply that the processor always executes more instructions per second (compared to a processor with a lower frequency)? (Use less than 10 words.)
If a processor executes more of a given programs instructions per second, does it imply that the processor always finishes the program faster (compared to a processor that executes fewer instructions per second)? (Use less than 10 words.)
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