Pipelining Flashcards

1
Q

What is the maximum amount of stages in a pipeline ?

A

14 after that it is too complex

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

what are the stages of a pipeline cycle?

A

fetch decode execute

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

how do you calculate the time for

instruction execution?

A

non-pipelined fetch-decode-execute cycle, the time for
instruction execution is the sum of the stage times

With a pipelined fetch-decode-execute cycle, the rate of instruction execution is multiplied by the number of stages.

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

What are the ARM7 fetch-decode-execute cycle stages?

A

The ARM7 fetch-decode-execute cycle has 3 stages:
Fetch — read an instruction from memory;
Decode — identify the instruction;
Execute — carry out the instruction.

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

The performance gains through pipelining are limited by:

A

control hazards;

data hazards.

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

When do you have a control hazard?

A

when a branch instruction changes

the next instruction

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

How do you deal with a control hazard?

A
There are four ways to deal with it:
∙ stall the pipeline;
∙ assume branch not taken;
∙ branch prediction;
∙ branch delay slots
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does stalling a pipeline work?

A

By squashing instructions.

So the instructions are terminated and replaced with bubbles

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

What is the problem with stalling the pipeline?

A

It wastes time and power

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

How does assuming branch not taken work?

A

assumes branch not taken, squashing instructions if wrong.

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

How does assuming branch prediction work?

A

The processor may try branch prediction based on past

branches, squashing instructions if wrong.

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

What does branch delay mean?

A

branch delay slots are inserted after a branch. It gives the programmers time to solve the problem.

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

When do you have a data hazard?

A

when one instruction immediately uses
the result of another.
ARM7 3-stage pipeline does not exhibit data hazards.

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