Question
Suppose the functions and can be computed in 5 and 3 nanoseconds by functional units and , respectively. Given two instances of and two instances of , it is required to implement the computation for . Ignoring all other delays, the minimum time required to complete this computation is ________ nanoseconds.
Official answer and solution
- Official answer
- 28
- From
- Official GATE 2016 answer key
Solution
Schedule the pipeline execution of the two functional units to determine the total completion time.
We need to compute for 10 inputs ().
- requires 3 ns on a unit (2 units available: ).
- requires 5 ns on a unit (2 units available: ).
- can only start after finishes.
Schedule instances (2 parallel units, 3 ns each):
- Inputs : processed from to . (Ready at )
- Inputs : processed from to . (Ready at )
- Inputs : processed from to . (Ready at )
- Inputs : processed from to . (Ready at )
- Inputs : processed from to . (Ready at )
Schedule instances (2 parallel units, 5 ns each):
Because each operation takes 5 ns (which is longer than 3 ns), the units are the bottleneck and run continuously without waiting once primed:
- Batch 1 (): Ready at . Processed on from to .
- Batch 2 (): Ready at . Processed on from to .
- Batch 3 (): Ready at . Processed on from to .
- Batch 4 (): Ready at . Processed on from to .
- Batch 5 (): Ready at . Processed on from to .
The entire computation completes at ns.
Therefore, the minimum time required is 28 nanoseconds.
28
Adding latencies sequentially without pipelining (), or ignoring the initial 3 ns delay of the first stage.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2016 Computer Science and Information Technology (CS) Session 2
- Question
- 40 of 65, printed as CS Q.30
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.