edited by
246 views
0 votes
0 votes

Consider a $5$-stage instruction pipeline. The stages and the corresponding stage delays are given below. 

Instruction Stage delay
Fetch instruction  (FI) 3 ns
Decode instruction (DI) 4 ns
Fetch operand  (FO) 7 ns
Execute instruction  (EI) 10 ns
Write result  (WR) 7 ns

Assume that there is no delay between two consecutive stages. Consider a processor with a branch prediction mechanism by which it is always able to correctly predict the direction of the branch at the FI stage itself, without executing the branch instruction. A program consisting of a sequence of $10$ instructions $\mathrm{I} 1, \mathrm{I} 2, \ldots, \mathrm{I} 10$, is executed in the pipeline, where the $5^{\text {th}}$ instruction $\text{(I5)}$ is the only branch instruction and its branch target is the $8^{\text {th}}$ instruction $\text{(I8)}.$

  1. Draw the pipeline diagram over time showing how the instructions $\mathrm{I} 1, \mathrm{I} 2, \ldots, \mathrm{I} 10$ flow through the pipeline stages in this processor.
  2. Calculate the time (in ns) needed to execute the program.
edited by

1 Answer

Related questions

195
views
1 answers
1 votes
admin asked Aug 8, 2022
195 views
Let $A$ be a sorted array containing $n$ distinct integers, such that, for all $1 \leq i<j \leq n$, we have $A[i]<A[j]$. Note that the integers stored in the array $A$ ar...
135
views
1 answers
0 votes
admin asked Aug 8, 2022
135 views
When we add a pair of two-bit binary numbers, say $a b$ and $c d$, we get a number of at most three bits, say $p q r$. Using standard operators of Boolean algebra, namely...
126
views
0 answers
0 votes
admin asked Aug 8, 2022
126 views
In a binary tree $T$, for a node $v$, the $\text{LEFT-HEIGHT} (v)$ is the length of the longest path from $v$ to any leaf in the left subtree of $v$. If $v$ has no left c...
469
views
1 answers
1 votes
admin asked Aug 8, 2022
469 views
Consider a stack machine where the only available workspace is a stack whose elements are unsigned integers. We will denote the configuration of the stack by a sequence. ...