Question: ii) Translate the following high level code into MIPS Assembly code. High Level code int main() { int y; y = divideNumbers (9, 3); }
ii) Translate the following high level code into MIPS Assembly code. High Level code
int main()
{
int y;
y = divideNumbers (9, 3);
}
int divideNumbers (int a, int b) {
int i;
int result = 0;
for (i=a; i>0; i = i-b) {
result = result + 1;
}
return result;
}
iii) How many instructions are executed to run the above program? iv) Figure in page number 2 shows a pipelined MIPS implementation. If all stages require 250 ns to complete its work, how much time will be taken to execute the above program in a five stage pipelined MIPS processor?
v) In the space provided below, draw a 4-bit register that is directly connected to a 4-bit data bus X.
Question 3 (6+6+2+2+8) i Following figure shows a pipelined datapath, which includes hardware required for forwarding. You need to fill up de table below. DEX MW mer! DAM MW Forwarding unit Inputs Name Suze Values Values Values A 11 22 B 1 1 14 1 1 15 15 1 1 C 11 22 D 1 1 1 E 12 14 14 14 F 9 15 14 Outputs MUA Mux B 2 Page 2 of ) Translate the following high level code into MIPS Assembly code High Levd code int maino inty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
