KSRaviKumarMVGREEE
121 views
7 slides
Jun 22, 2024
Slide 1 of 7
1
2
3
4
5
6
7
About This Presentation
The AVR Pipelining
Size: 201.06 KB
Language: en
Added: Jun 22, 2024
Slides: 7 pages
Slide Content
PIPELINING IN AVR
P. Pavan Kumar, Assistant Professor, MVGRCE(A)
Pipelining
Instruction pipelining is a technique for
implementing instruction level parallelism within a single
processor. Pipelining attempts to keep every part of the
processor busy with some instruction by dividing
incoming instructions into a series of sequential steps (the
eponymous “pipeline") performed by different processor
units with different parts of instructions processed in parallel.
It allows faster CPU throughput than would otherwise be
possible at a given clock rate, but may increase latency due to
the added overhead of the pipelining process itself.
Pipelining
Central processing units (CPUs) are driven by a clock. Each
clock pulse need not do the same thing; rather, logic in the
CPU directs successive pulses to different places to perform
a useful sequence. There are many reasons that the entire
execution of a machine instruction cannot happen at once; in
pipelining, effects that cannot happen at the same time are
made into dependent steps of the instruction.
For example, if one clock pulse latches a value into a
register or begins a calculation, it will take some time for the
value to be stable at the outputs of the register or for the
calculation to complete. As another example, reading an
instruction out of a memory unit cannot be done at the same
time that an instruction writes a result to the same memory
unit.
Pipelining
Number of steps
The number of dependent steps varies with the machine architecture. For
example:
The 1956-1961 IBM Stretch project proposed the terms Fetch, Decode, and
Execute that have become common.
The classic RISC pipeline comprises:
Instruction fetch (IF)
Instruction decode and register fetch (ID)
Execute (EX)
Memory access (MEM or MA)
Register write back (WB)
The Atmel AVR and the PIC Microcontrollers each have a two-stage
pipeline.
Many designs include pipelines as long as 7, 10 and even 20 stages (as in
the Intel Pentium 4).
Five stage pipelining
Two stage pipelining in AVR
Two stage pipelining in AVR
In the example shown above, for every clock cycle a maximum
of two instructions are being executed, hence its depth is Two
and it is called as Two stage pipelining.
In a single clock cycle, any stage corresponding to an
instruction will be executed, in the example shown, stages
corresponding to two instructions SUB (subtraction) and AND
(logical AND) are being handled in a single clock cycle.