Pipelining Flashcards

1
Q

What are the 3 kinds of pipeline hazards?

A
  1. Structural
  2. Data
  3. Control
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain structural hazards and give 2 solutions.

A

Simultaneous use of a hardware resource

  1. Stall the pipeline
  2. Use separate memory (Instruction/Data)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is RAW? (Data Dependency)

A

Read-After-Write.

  • Occurs when a later instruction reads from the destination register in an earlier instruction.
    add $2, $1, $3
    add $4, $2, $1

Solution:
Using data forwarding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Control Dependency? What are the 3 solutions?

A

An instruction j that is control dependent on i if i controls whether or not j executes. (typically a branch instruction)

beq $3, $5, label
add $1, $2, $4

Solutions:

  1. Early branching (decision made in stage 2)
  2. Branch prediction (Fetches the next instruction)
  3. Delayed branching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly