retagged by
617 views
1 votes
1 votes
Consider a pipelined system with these $4$ phases:

FI –  Fetch instruction
DA – Decode and calculate address
FO – Fetch Operand
EX-  Execute instruction

Each phase requires one clock cycle. There were four instructions in the following program:

$\begin{array}{|l|l|}  \hline \text{Load } R1 & \leftarrow M[312] \\ \hline \text{ADD } R2 & \leftarrow R1 + M[313] \\ \hline \text{INC } R3 & \leftarrow R2+1 \\ \hline \text{Store } M[314] & \leftarrow R3 \\ \hline \end{array}$

If there exists pipeline hazards , then the number of clock cycles required to complete the above program  is _________
retagged by

1 Answer

Best answer
1 votes
1 votes
Clocks   1     2      3       4     5        6       7       8       9       10

Load     FI   DA    FO    EX

ADD           FI      DA   ----    FO     EX

INC                     FI     ----    DA     ----    FO     EX

Store                           ----    FI      -----   DA     ----      FO      EX

Total 10 clock cycles are required to complete those instructions.
selected by
Answer:

Related questions

425
views
2 answers
0 votes
Bikram asked May 27, 2017
425 views
Consider a $5$ stage instruction pipeline which can implement the $4$ instructions $I1, \ I2, \ I3, \ I4$. Below table gives the number of clocks required ... The speed up of the pipeline is approximately ________
330
views
1 answers
0 votes
Bikram asked May 27, 2017
330 views
Which of the following statements is/are correct about hazards?One way to implement branch prediction is to store the result of a branch condition in a branch target buffer ... is taken.III only II and III onlyI and III onlyI, II, and III
618
views
2 answers
2 votes
Bikram asked May 27, 2017
618 views
Suppose there are $m$ instructions to be executed in a program. $p$ is the probability that an instruction is a conditional branch instruction, and $q$ is the probability of a successful branch. ... $1 +pq ( n - 1)$ $p - pq$
357
views
1 answers
1 votes
Bikram asked May 27, 2017
357 views
Consider the following two types of Cache Designs : Cache $1$: It is a direct-mapped cache with eight $1$ - word cache lines. The miss penalty is $8$ clock cycles ... $60$ cyclesCache $1$ spends $56$ cycles and Cache $2$ spends $70$ cycles