Professional Documents
Culture Documents
1092701374
1092701374
Muhammad Syazwan bin Mohd Jaafar PIPELINING Key implementation technique used to build fast processors that be seen in RISCs architecture. It allows the execution of multiple instructions to overlap in time Entire processing flow is broken up into multiple stages, and new data/instructions is processed by a stage potentially as soon as it is done with the current data/instruction, which then goes onto the next stage for further processing.
1092701374 NON-PIPELINING By contrast, the next data/instruction is processed after the entire processing of the previous data/instruction is complete
Non-pipelined
Processing path
Data/instruction Delay = D
Non-pipelined processing, new data/instruction, inputted every seconds. A new data/instruction is done every seconds
Pipelined
Data/instruction
k stages delay
Pipelined processing, new data/instruction is inputted every D/k seconds. After initial fill, a data/instruction is done every D/k seconds.
3
1092701374
Typical instruction execution sequences : fetch,decode,read,execute,write In a non-pipelined CPU, instructions are performed one at a time before an instruction is begun, the preceding instruction is completed.
Fetch
Decode
Execute
Fetch
Decode
Execute
Fetch
Decode
In a pipelined CPU, the execution of instructions is performed stages. Separate hardware is provided to handle each of these satges. Instructions proceed through the CPU stages :
Fetch
Decode Fetch
To implement instruction pipelining, desirable features of (instruction set): All instructions same length Registers specified in same place in instructions Memory operands only in load or stores, i.e. RISC
1092701374
Instruction
Fetch
Instruction
Execute
Result
a) Simplified view
Wait Instruction
Wait
Fetch
Execute
Result
Observation
Performance usually shorter than execution Pipeline should have more stages to improve the performance An ideal pipeline divides a task into k independent sequential subtasks: o Each subtask requires 1 time unit to complete o The task itself then requires k time units to complete
1092701374
Pipeline Performance
n : number of instructions k : stages of pipelines : total time for pipelining : total time without pipelining : cycletime
TOTAL TIME
Pipelining = nk
Non-pipelining = (k + (n-1))
1092701374
Pipelining
Speedup
S= =
))
1092701374
Throughput
Pipeline throughput = (n) (n)
Non-pipeline throughput =
Limits to Pipelining
Factors that limits performance enhancement: Unequal duration/delay of stages Conditional branch instruction or interrupts
1092701374
Resources hazards : HW cannot support this combination of instruction. Data hazards : Instruction depends on result of prior instruction in still in the pipeline Control hazards : Caused by delay between the fetching of instructions and decision about changes in control flow
1092701374
Arguements of CISC
A rich instruction set should simplify the compiler by having instructions which match the high-level language instructions. o This work fine if the number of HL languages is very small Since the programs are smaller in size, they have better performances o They take up less memory space and need fewer instruction fetch cycles o Fewer number of instructions are executed, which may lead to smaller execution time
10
1092701374
11
1092701374
CISC vs RISC
CISC
Emphasis on hardware Multiple instruction sizes and formats Less registers More adressing modes Extnsive use of microprogramming Instructions take a varying amount of cycle time Pipelining is difficult
RISC
Emphasis on software Instructions of same set with few formats Uses more registers Fewer addressing modes Complexity in compiler Instructions take one cycle time Pipelining is easy
Summary
Pipelining is a fundamental concept Instruction Pipelining and concepts How to improve performance Hazards are limitations of pipelining- data, structural, control RISC has a simple architecture and can be highly pipelined , CISC has a more complex architecture. Today, designers are producing a hybrid of the two design philosophies known as a complex/reduced instruction set computer. These computers combine characteristics such as variable-length instructions, few generalpurpose registers, pipelining, and floating-point units. RISC and CISC controversy results in the consideration of several factors before deciding on the architecture.
12