Question: 1. The function F is defined as F(1) = F(2) = F(3) = 1 and for n ? 3, F(n + 1) = F(n) +
1. The function F is defined as F(1) = F(2) = F(3) = 1 and for n ? 3, F(n + 1) = F(n) + (F(n ? 1) F(n ? 2)) i.e., the
(n + 1)th value is given by the sum of the nth value and the product of the (n ? 1)th and (n ? 2)th values.
(a) Write an assembly program for computing the kth value F(k), where k is an integer bigger than 3 read from a memory location M, and storing F(k) at memory location M.
(b) Show the execution of your program on a superscalar processor for k = 5. Assume that all the decoded instructions are already loaded into an instruction window IW on board. The remaining pipeline stages are RR, EX and WB. Assume that there are two functional units (reading and writing to registers, and execution units) for each of the pipeline stages. Make your additional assumptions explicit. Explain where and why delay slots appear.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
