Download ASSIGNMENT 1 (CS 400 FALL 2001)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
ASSIGNMENT 1 (CS 802, Winter 2008)
( Due Date: Feb. 8, 2008 )
1.
Describe the pipeline approach. Give an example of pipeline and indicate its speed
up and efficiency.
2. For each of the following problems do: (1) Write an efficient algorithm for sequential
machine and show its time complexity. (2) Design a pipeline scheme according the
procedure discussed in the class, show step by step. (3) Use the space-time diagram to
show how your design works and calculate its speed-up and efficiency (assuming n=4
and m=4).
n
a. Compute Yj =
A
i 1
i
j
 Bi j , where Ai j , Bi j are integers, and j = 1, 2, …, m.
b. Finding the biggest number and smallest number in a set of n numbers for total m
sets.
c.
Compute product of A X B where A and B are two nxn matrices.
d.
Compute Yi  M iE where E  en 1en  2 en 3 ...e1 e0 , i = 1, 2, …m.
3. Consider the following sequence of instructions in RISC. Suppose it repeats two
times.
X:
Load A<- M
Load B <- M
Load C<- M
Add D <- C + B
Sub E<- A - B
And F <- D and E
Store M <- E
Store M <- F
Branch X
a. Draw space-time diagrams for the two-way pipeline, three-way pipeline and four-way
pipeline. Indicate the pipeline conflict when it occurs and give its type of the data
dependence. Show the speed up for each pipeline scheme.
b. If the three-way pipeline is used. Give the code optimization of the above instruction
sequence and show the corresponding space-time diagram.
2
4. List all possible situations of data dependences in RISC instruction pipeline. Suppose
the four-way pipeline is used.
Related documents