Computer architecture pipelining

M
Mazin AlwaalyStudent em University of Mustansiriyah
Pipelining
Lecture
By
Rasha
Out line
 Definition of pipeline
 Advantages and disadvantage
 Type of pipeline (h/w) and (s/w)
 Latency and throughput
 hazards
 Pipeline with Addressing mode
 Pipeline with cache memory
 RISC Computer
pipeline
 It is technique of decomposing a sequential
process into suboperation, with each
suboperation completed in dedicated
segment that operates concurrently with
all other segments.
 Pipeline is commonly known as an assembly
line operation.
Example
Each sub operation is to be performed in
a segment within a pipeline. Each
segment has one or two registers and a
combinational circuit.
 The sub operations in each segment of the
pipeline are as follows:
Computer architecture pipelining
Computer architecture pipelining
Latency and throughput
 Latency
 Each instruction takes a certain time to
complete.
 latency for that operation is how long does it
take to execute single instruction in the
pipeline.
 Throughput
 The number of instructions that complete
per second.
advantages
 1- Pipelining is widely used in modern processors .
 2- Quicker time of execution large number of
instruction.
 3- More efficient use of processor.
 4- Arrange the hardware so that more than one
operation can be performed at the same time.
 5- This technique is efficient for applications that need
to repeat the same task in many time with different
set of data.
Disadvantages
1- Pipelined organization requires complex
compilation techniques.
2- pipelining involves adding hardware, then
cost of the system increases.
Idea of pipelining in computer
 The processor execute the program by
fetching and executing instructions. One after
the other.
 Let Fi and Ei refer to the fetch and execute
steps for instruction Ii
Use the Idea of Pipelining in a
Computer
F
1
E
1
F
2
E
2
F
3
E
3
I1 I2 I3
(a) Sequential execution
Instruction
fetch
unit
Execution
unit
Interstage buffer
B1
(b) Hardware organization
Time
F1 E1
F2 E2
F3 E3
I1
I2
I3
Instruction
(c) Pipelined execution
Figure 8.1. Basic idea of instruction pipelining.
Clock cycle 1 2 3 4
Time
Fetch + Execution
Use the Idea of Pipelining in a
Computer
F4I4
F1
F2
F3
I1
I2
I3
D1
D2
D3
D4
E1
E2
E3
E4
W1
W2
W3
W4
Instruction
Figure 8.2. A 4­stage pipeline.
Clock cycle 1 2 3 4 5 6 7
(a) Instruction execution divided into four steps
F : Fetch
instruction
D : Decode
instruction
and fetch
operands
E: Execute
operation
W : Write
results
Interstage buffers
(b) Hardware organization
B1 B2 B3
Time
Fetch + Decode
+ Execution + Write
Use the Idea of Pipelining in a
Computer
 Computer that has two separate hardware
units, one for fetching and another for
executing them.
 This buffer needed to enable the execution
unit while fetch unit fetching the next
instruction.
 The computer is controlled by a clock.
Role of Cache Memory
 Each pipeline stage is expected to complete in one
clock cycle.
 The clock period should be long enough to let the
slowest pipeline stage to complete.
 Faster stages can only wait for the slowest one to
complete.
 Since main memory is very slow compared to the
execution, if each instruction needs to be fetched
from main memory, pipeline is almost useless.[ten
times greater than the time needed to perform
pipeline stage]
 Fortunately, we have cache.
 1) Software Pipelining
1) Can Handle Complex Instructions.
2) Allows programs to be reused.
 2)Hardware Pipelining
1) Help designer manage complexity – a complex
task can be divided into smaller, more
manageable pieces.
2) Hardware pipelining offers higher performance.
Types of pipeline
Types of pipeline
 Arithmetic Pipeline : Pipeline arithmetic units are
usually found in very high speed computers.
 Floating–point operations, multiplication of fixed-
point numbers, and similar computations in scientific
problem.
 Instruction Pipeline: Pipeline processing can occur
also in the instruction stream. An instruction pipeline
reads consecutive instructions from memory while
previous instructions are being executed in other
segments.
Arithmetic Pipeline
 Floating-point adder/subtracter
 [1] Compare the exponents
 [2] Align the mantissa
 [3] Add/sub the mantissa
 [4] Normalize the result
X = A x 10a
= 0.9504 x 103
Y = B x 10b
= 0.8200 x 102
1) Compare exponents :
3 - 2 = 1
2) Align mantissas
X = 0.9504 x 103
Y = 0.08200 x 103
3) Add mantissas
Z = 1.0324 x 103
4) Normalize result
Z = 0.10324 x 104
R
Compare
exponents
by subtraction
a b
R
Choose exponent
Exponents
R
A B
Align mantissa
Mantissas
Difference
R
Add or subtract
mantissas
R
Normalize
result
R
R
Adjust
exponent
R
Segment 1:
Segment 2:
Segment 3:
Segment 4:
INSTRUCTION CYCLE
 Six Phases* in an Instruction Cycle
 [1] Fetch an instruction from memory
 [2] Decode the instruction
 [3] Calculate the effective address of the operand
 [4] Fetch the operands from memory
 [5] Execute the operation
 [6] Store the result in the proper place
 * Some instructions skip some phases
 * Effective address calculation can be done in the part of the decoding phase
 * Storage of the operation result into a register is done automatically in the execution
phase
 ==> 4-Stage Pipeline
 [1] FI: Fetch an instruction from memory
 [2] DA: Decode the instruction and calculate the effective address of the operand
 [3] FO: Fetch the operand
 [4] EX: Execute the operation
 Execution of Three Instructions in a 4-Stage Pipeline
Conventional
Pipeline Performance
 The potential increase in performance resulting from pipelining is
proportional to the number of pipeline stages.
 However, this increase would be achieved only if all pipeline stages
require the same time to complete, and there is no interruption
throughout program execution.
 Unfortunately, this is not true.
 Floating point may involve many clock cycle
 Stalling involves halting the flow of instructions until the required
result is ready to be used. However stalling wastes processor time
by doing nothing while waiting for the result.
 Pipeline stall causes degradation in pipeline
performance.
Pipeline Performance
 Any condition that causes a pipeline to stall is called
a hazard.
Data hazard – when an instruction depend on the result of a
previous instruction, but this result is not yet available.
 Instruction (control) hazard – a delay in the availability of
an instruction causes the pipeline to stall for example branch.
 Structural hazard – the situation when two instructions
require the use of a given hardware resource at the same time.
Data Hazards
 We must ensure that the results obtained when instructions are
executed in a pipelined processor are identical to those obtained
when the same instructions are executed sequentially.
 Hazard occurs
A ← 3 + A
B ← 4 × A
 No hazard
A ← 5 × C
B ← 20 + C
 When two operations depend on each other, they must be
executed sequentially in the correct order.
 Another example:
Mul R2, R3, R4
Add R5, R4, R6
Data Hazards
F1
F2
F3
I1 (Mul)
I2 (Add)
I3
D1
D3
E1
E3
E2
W3
Instruction
Figure 8.6. Pipeline stalled by data dependency between D2 and W1.
1 2 3 4 5 6 7 8 9Clock cycle
W1
D2A W2
F4 D4 E4 W4I4
D2
Time
Figure 8.6. Pipeline stalled by data dependency between D2 and W1.
Mul R2, R3, R4
Add R5, R4, R6
Data dependency solutions
 Hardware interlocks: is a circuit that detects instructions whose
source operands are destinations of instructions
Farther up in the pipeline.
 Operand forwarding : uses special h/w to detect a conflict and
then avoid it by routing the data through special paths between
pipeline segments .
 delayed load :the compiler for such computers is designed to
detect a data conflict and reorder the instructions as necessary to
delay the loading of the Conflicting data by inserting no –operation
instructions. Example
I1: Mul R2, R3, R4
NOP
NOP
I2: Add R5, R4, R6
Instruction Hazards
 One of the major problems in operating an instruction
pipeline is the occurrence of branch instructions.
 1- Unconditional branch always change the sequential
program flow by loading the program counter with the
target address.
 2- Conditional branch the control selects the target
instruction if the condition is satisfied or the next
sequential instruction if the condition is not satisfied.
1-Unconditional Branches
F2I2 (Branch)
I3
Ik
E2
F3
Fk Ek
Fk+1 Ek+1Ik+1
Instruction
Figure 8.8. An idle cycle caused by a branch instruction.
Execution unit idle
1 2 3 4 5Clock cycle
Time
F1I1 E1
6
X
Unconditional Branches
 The time lost as a result of a branch
instruction is referred to as the branch
penalty.
 The previous example instruction I3 is
wrongly fetched and branch target address k
will discard the i3.
 Typically the Fetch unit has dedicated h/w
which will identify the branch target address
as quick as possible after an instruction is
fetched.
Instruction Queue and Prefetching
 branch instruction stalls the pipeline.
 Many processor employs dedicated fetch unit
which will fetch the instruction and put them
into a queue.
 It can store several instruction at a time.
 A separate unit called dispatch unit, takes
instructions from the front of the queue and
send them to the execution unit.
Instruction Queue and
Prefetching
F : Fetch
instruction
E : Execute
instruction
W : Write
results
D : Dispatch/
Decode
Instruction queue
Instruction fetch unit
Figure 8.10. Use of an instruction queue in the hardware organization of Figure 8.2b.
unit
2- Conditional Braches
 A conditional branch instruction introduces
the added hazard caused by the dependency
of the branch condition on the result of a
previous instruction.
 The decision to branch cannot be made until
the execution of that instruction has been
completed.
Delayed Branch
Add
LOOP Shift_left R1
Decrement
Branch=0
R2
LOOP
NEXT
(a) Original program loop
LOOP Decrement R2
Branch=0
Shift_left
LOOP
R1
NEXT
(b) Reordered instructions
Figure 8.12. Reordering of instructions for a delayed branch.
Add
R1,R3
R1,R3
Addressing Modes
 Addressing modes include simple ones and
complex ones.
 In choosing the addressing modes to be
implemented in a pipelined processor, we
must consider the effect of each addressing
mode on instruction flow in the pipeline:
 Side effects
 The extent to which complex addressing modes cause
the pipeline to stall
 Whether a given mode is likely to be used by compilers
Addressing Modes
 In a pipelined processor, complex addressing
modes do not necessarily lead to faster execution.
 Advantage: reducing the number of instructions /
program space
 Disadvantage: cause pipeline to stall / more
hardware to decode / not convenient for compiler to
work with
 Conclusion: complex addressing modes are not
suitable for pipelined execution.
Addressing Modes
 Good addressing modes should have:
 Access to an operand does not require more than one
access to the memory
 Only load and store instruction access memory operands
 The addressing modes used do not have side effects
 Register, register indirect, index
RISC pipeline
• RISC (Reduced Instruction Set Computer)
• 1- To use an efficient instruction pipeline
• a) to implement an instruction pipeline using a small number of
• suboperations, with each begin executed in one cycle.
• b) because the fixed length instruction format , the decoding of
the
• operation can occur at the same time as register selection.
• 2- Data transfer instruction in RISC are limited to load and store
• instruction.by using cache memory.
• 3-One of major advantage of RISC is ability to execute instruction
• at the rate of one per clock cycle that can achieve pipeline
• segments requiring just one clock cycle.
• 4- The compiler supported that translates the high-level language
• program into machine language program.
• .
RISC pipeline
 Instruction Cycle of Three-Stage Instruction Pipeline.
 I: Instruction Fetch from program memory
 A: Decode, Read Registers, ALU Operation
 E: Transfer the output of ALU to a register, Transfer EA to a data
memory for loading or storing , Transfer branch address to the
program counter.
 Types of instructions
- 1- Data Manipulation Instructions
- 2- Load and Store Instructions
- 3- Program Control Instructions
THANK YOUTHANK YOU
1 de 38

Recomendados

pipelining por
pipeliningpipelining
pipeliningSiddique Ibrahim
83.1K visualizações78 slides
Instruction pipeline: Computer Architecture por
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureMd. Saidur Rahman Kohinoor
57K visualizações21 slides
Microprogrammed Control Unit por
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control UnitPreethiSureshkumar1
19.4K visualizações20 slides
Pipeline hazard por
Pipeline hazardPipeline hazard
Pipeline hazardAJAL A J
61.9K visualizações61 slides
Superscalar & superpipeline processor por
Superscalar & superpipeline processorSuperscalar & superpipeline processor
Superscalar & superpipeline processorMuhammad Ishaq
78.3K visualizações17 slides
Interrupts por
InterruptsInterrupts
InterruptsUrwa Shanza
14.9K visualizações20 slides

Mais conteúdo relacionado

Mais procurados

VLIW Processors por
VLIW ProcessorsVLIW Processors
VLIW ProcessorsSudhanshu Janwadkar
44.7K visualizações20 slides
Microprogram Control por
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
54.2K visualizações17 slides
Computer instructions por
Computer instructionsComputer instructions
Computer instructionsAnuj Modi
31.7K visualizações12 slides
Computer architecture input output organization por
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organizationMazin Alwaaly
15.8K visualizações43 slides
Concept of Pipelining por
Concept of PipeliningConcept of Pipelining
Concept of PipeliningSHAKOOR AB
7.5K visualizações20 slides
Direct memory access (dma) por
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)Zubair Khalid
16.4K visualizações21 slides

Mais procurados(20)

VLIW Processors por Sudhanshu Janwadkar
VLIW ProcessorsVLIW Processors
VLIW Processors
Sudhanshu Janwadkar44.7K visualizações
Microprogram Control por Anuj Modi
Microprogram Control Microprogram Control
Microprogram Control
Anuj Modi54.2K visualizações
Computer instructions por Anuj Modi
Computer instructionsComputer instructions
Computer instructions
Anuj Modi31.7K visualizações
Computer architecture input output organization por Mazin Alwaaly
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
Mazin Alwaaly15.8K visualizações
Concept of Pipelining por SHAKOOR AB
Concept of PipeliningConcept of Pipelining
Concept of Pipelining
SHAKOOR AB7.5K visualizações
Direct memory access (dma) por Zubair Khalid
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
Zubair Khalid16.4K visualizações
Control Unit Design por Vinit Raut
Control Unit DesignControl Unit Design
Control Unit Design
Vinit Raut14K visualizações
Types of Addressing modes- COA por Ruchi Maurya
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
Ruchi Maurya7.2K visualizações
Timing and control por chauhankapil
Timing and controlTiming and control
Timing and control
chauhankapil10K visualizações
Pipelining and vector processing por Kamal Acharya
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
Kamal Acharya63.4K visualizações
Presentation on risc pipeline por Arijit Chakraborty
Presentation on risc pipelinePresentation on risc pipeline
Presentation on risc pipeline
Arijit Chakraborty6K visualizações
Instruction Set Architecture (ISA) por Gaditek
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
Gaditek6.2K visualizações
Pipeline hazards in computer Architecture ppt por mali yogesh kumar
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
mali yogesh kumar21K visualizações
Hardwired control por Siddique Ibrahim
Hardwired controlHardwired control
Hardwired control
Siddique Ibrahim47.6K visualizações
Input output organization por abdulugc
Input output organizationInput output organization
Input output organization
abdulugc49.1K visualizações
Memory Organization por Kamal Acharya
Memory OrganizationMemory Organization
Memory Organization
Kamal Acharya31.5K visualizações
Pipelining powerpoint presentation por bhavanadonthi
Pipelining powerpoint presentationPipelining powerpoint presentation
Pipelining powerpoint presentation
bhavanadonthi5K visualizações
Micro Programmed Control Unit por Kamal Acharya
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control Unit
Kamal Acharya34.7K visualizações

Similar a Computer architecture pipelining

Pipelining in computer architecture por
Pipelining in computer architecturePipelining in computer architecture
Pipelining in computer architectureRamakrishna Reddy Bijjam
1.1K visualizações78 slides
Instruction pipelining por
Instruction pipeliningInstruction pipelining
Instruction pipeliningShoaib Commando
1.3K visualizações31 slides
Core pipelining por
Core pipelining Core pipelining
Core pipelining Ibrahim Hassan
22 visualizações25 slides
Pipelining por
PipeliningPipelining
PipeliningShubham Bammi
858 visualizações30 slides
Chapter6 pipelining por
Chapter6  pipeliningChapter6  pipelining
Chapter6 pipeliningGurpreet Singh
9.6K visualizações61 slides
print.pptx por
print.pptxprint.pptx
print.pptxkalai75
1 visão15 slides

Similar a Computer architecture pipelining(20)

Instruction pipelining por Shoaib Commando
Instruction pipeliningInstruction pipelining
Instruction pipelining
Shoaib Commando1.3K visualizações
Core pipelining por Ibrahim Hassan
Core pipelining Core pipelining
Core pipelining
Ibrahim Hassan22 visualizações
Pipelining por Shubham Bammi
PipeliningPipelining
Pipelining
Shubham Bammi858 visualizações
Chapter6 pipelining por Gurpreet Singh
Chapter6  pipeliningChapter6  pipelining
Chapter6 pipelining
Gurpreet Singh9.6K visualizações
print.pptx por kalai75
print.pptxprint.pptx
print.pptx
kalai751 visão
pipelining.pptx por MUNAZARAZZAQELEA
pipelining.pptxpipelining.pptx
pipelining.pptx
MUNAZARAZZAQELEA10 visualizações
Pipelining in Computer System Achitecture por YashiUpadhyay3
Pipelining in Computer System AchitecturePipelining in Computer System Achitecture
Pipelining in Computer System Achitecture
YashiUpadhyay3190 visualizações
Pipeline & Nonpipeline Processor por Smit Shah
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline Processor
Smit Shah627 visualizações
Topic2a ss pipelines por turki_09
Topic2a ss pipelinesTopic2a ss pipelines
Topic2a ss pipelines
turki_09948 visualizações
Assembly p1 por raja khizar
Assembly p1Assembly p1
Assembly p1
raja khizar168 visualizações
COA Unit-5.pptx por Bharti189559
COA Unit-5.pptxCOA Unit-5.pptx
COA Unit-5.pptx
Bharti18955912 visualizações
Unit 4 COA.pptx por AkshatBhatnagar30
Unit 4 COA.pptxUnit 4 COA.pptx
Unit 4 COA.pptx
AkshatBhatnagar3023 visualizações
Design pipeline architecture for various stage pipelines por Mahmudul Hasan
Design pipeline architecture for various stage pipelinesDesign pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelines
Mahmudul Hasan1.8K visualizações
3 Pipelining por fika sweety
3 Pipelining3 Pipelining
3 Pipelining
fika sweety4K visualizações
Pipelining And Vector Processing por TheInnocentTuber
Pipelining And Vector ProcessingPipelining And Vector Processing
Pipelining And Vector Processing
TheInnocentTuber20 visualizações
Pipelining of Processors Computer Architecture por Haris456
Pipelining of  Processors Computer ArchitecturePipelining of  Processors Computer Architecture
Pipelining of Processors Computer Architecture
Haris456141 visualizações
CA UNIT III.pptx por ssuser9dbd7e
CA UNIT III.pptxCA UNIT III.pptx
CA UNIT III.pptx
ssuser9dbd7e6 visualizações
L4 speeding-up-execution por rsamurti
L4 speeding-up-executionL4 speeding-up-execution
L4 speeding-up-execution
rsamurti737 visualizações
pipelining por sudhir saurav
pipeliningpipelining
pipelining
sudhir saurav11.3K visualizações

Mais de Mazin Alwaaly

Pattern recognition voice biometrics por
Pattern recognition voice biometricsPattern recognition voice biometrics
Pattern recognition voice biometricsMazin Alwaaly
2.6K visualizações18 slides
Pattern recognition palm print authentication system por
Pattern recognition palm print authentication systemPattern recognition palm print authentication system
Pattern recognition palm print authentication systemMazin Alwaaly
4.4K visualizações22 slides
Pattern recognition on line signature por
Pattern recognition on line signaturePattern recognition on line signature
Pattern recognition on line signatureMazin Alwaaly
469 visualizações18 slides
Pattern recognition multi biometrics using face and ear por
Pattern recognition multi biometrics using face and earPattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earMazin Alwaaly
439 visualizações23 slides
Pattern recognition IRIS recognition por
Pattern recognition IRIS recognitionPattern recognition IRIS recognition
Pattern recognition IRIS recognitionMazin Alwaaly
909 visualizações30 slides
Pattern recognition hand vascular pattern recognition por
Pattern recognition hand vascular pattern recognitionPattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionMazin Alwaaly
577 visualizações26 slides

Mais de Mazin Alwaaly(20)

Pattern recognition voice biometrics por Mazin Alwaaly
Pattern recognition voice biometricsPattern recognition voice biometrics
Pattern recognition voice biometrics
Mazin Alwaaly2.6K visualizações
Pattern recognition palm print authentication system por Mazin Alwaaly
Pattern recognition palm print authentication systemPattern recognition palm print authentication system
Pattern recognition palm print authentication system
Mazin Alwaaly4.4K visualizações
Pattern recognition on line signature por Mazin Alwaaly
Pattern recognition on line signaturePattern recognition on line signature
Pattern recognition on line signature
Mazin Alwaaly469 visualizações
Pattern recognition multi biometrics using face and ear por Mazin Alwaaly
Pattern recognition multi biometrics using face and earPattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and ear
Mazin Alwaaly439 visualizações
Pattern recognition IRIS recognition por Mazin Alwaaly
Pattern recognition IRIS recognitionPattern recognition IRIS recognition
Pattern recognition IRIS recognition
Mazin Alwaaly909 visualizações
Pattern recognition hand vascular pattern recognition por Mazin Alwaaly
Pattern recognition hand vascular pattern recognitionPattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognition
Mazin Alwaaly577 visualizações
Pattern recognition Hand Geometry por Mazin Alwaaly
Pattern recognition Hand GeometryPattern recognition Hand Geometry
Pattern recognition Hand Geometry
Mazin Alwaaly2.7K visualizações
Pattern recognition forensic dental identification por Mazin Alwaaly
Pattern recognition forensic dental identificationPattern recognition forensic dental identification
Pattern recognition forensic dental identification
Mazin Alwaaly720 visualizações
Pattern recognition fingerprints por Mazin Alwaaly
Pattern recognition fingerprintsPattern recognition fingerprints
Pattern recognition fingerprints
Mazin Alwaaly3.1K visualizações
Pattern recognition facial recognition por Mazin Alwaaly
Pattern recognition facial recognitionPattern recognition facial recognition
Pattern recognition facial recognition
Mazin Alwaaly896 visualizações
Pattern recognition ear as a biometric por Mazin Alwaaly
Pattern recognition ear as a biometricPattern recognition ear as a biometric
Pattern recognition ear as a biometric
Mazin Alwaaly360 visualizações
Pattern recognition 3d face recognition por Mazin Alwaaly
Pattern recognition 3d face recognitionPattern recognition 3d face recognition
Pattern recognition 3d face recognition
Mazin Alwaaly932 visualizações
Multimedia multimedia over wireless and mobile networks por Mazin Alwaaly
Multimedia multimedia over wireless and mobile networksMultimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networks
Mazin Alwaaly975 visualizações
Multimedia network services and protocols for multimedia communications por Mazin Alwaaly
Multimedia network services and protocols for multimedia communicationsMultimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communications
Mazin Alwaaly1.7K visualizações
Multimedia content based retrieval in digital libraries por Mazin Alwaaly
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital libraries
Mazin Alwaaly1.7K visualizações
Multimedia lossy compression algorithms por Mazin Alwaaly
Multimedia lossy compression algorithmsMultimedia lossy compression algorithms
Multimedia lossy compression algorithms
Mazin Alwaaly1.6K visualizações
Multimedia lossless compression algorithms por Mazin Alwaaly
Multimedia lossless compression algorithmsMultimedia lossless compression algorithms
Multimedia lossless compression algorithms
Mazin Alwaaly1.7K visualizações
Multimedia basic video compression techniques por Mazin Alwaaly
Multimedia basic video compression techniquesMultimedia basic video compression techniques
Multimedia basic video compression techniques
Mazin Alwaaly1.8K visualizações
Multimedia image compression standards por Mazin Alwaaly
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
Mazin Alwaaly3.8K visualizações
Multimedia fundamental concepts in video por Mazin Alwaaly
Multimedia fundamental concepts in videoMultimedia fundamental concepts in video
Multimedia fundamental concepts in video
Mazin Alwaaly2.8K visualizações

Último

Bacterial Reproduction.pdf por
Bacterial Reproduction.pdfBacterial Reproduction.pdf
Bacterial Reproduction.pdfNandadulalSannigrahi
24 visualizações32 slides
Study on Drug Drug Interaction Through Prescription Analysis of Type II Diabe... por
Study on Drug Drug Interaction Through Prescription Analysis of Type II Diabe...Study on Drug Drug Interaction Through Prescription Analysis of Type II Diabe...
Study on Drug Drug Interaction Through Prescription Analysis of Type II Diabe...Anmol Vishnu Gupta
26 visualizações12 slides
별헤는 사람들 2023년 12월호 전명원 교수 자료 por
별헤는 사람들 2023년 12월호 전명원 교수 자료별헤는 사람들 2023년 12월호 전명원 교수 자료
별헤는 사람들 2023년 12월호 전명원 교수 자료sciencepeople
63 visualizações30 slides
ELECTRON TRANSPORT CHAIN por
ELECTRON TRANSPORT CHAINELECTRON TRANSPORT CHAIN
ELECTRON TRANSPORT CHAINDEEKSHA RANI
10 visualizações16 slides
Factors affecting fluorescence and phosphorescence.pptx por
Factors affecting fluorescence and phosphorescence.pptxFactors affecting fluorescence and phosphorescence.pptx
Factors affecting fluorescence and phosphorescence.pptxSamarthGiri1
7 visualizações11 slides
1978 NASA News Release Log por
1978 NASA News Release Log1978 NASA News Release Log
1978 NASA News Release Logpurrterminator
15 visualizações146 slides

Último(20)

Study on Drug Drug Interaction Through Prescription Analysis of Type II Diabe... por Anmol Vishnu Gupta
Study on Drug Drug Interaction Through Prescription Analysis of Type II Diabe...Study on Drug Drug Interaction Through Prescription Analysis of Type II Diabe...
Study on Drug Drug Interaction Through Prescription Analysis of Type II Diabe...
Anmol Vishnu Gupta26 visualizações
별헤는 사람들 2023년 12월호 전명원 교수 자료 por sciencepeople
별헤는 사람들 2023년 12월호 전명원 교수 자료별헤는 사람들 2023년 12월호 전명원 교수 자료
별헤는 사람들 2023년 12월호 전명원 교수 자료
sciencepeople63 visualizações
ELECTRON TRANSPORT CHAIN por DEEKSHA RANI
ELECTRON TRANSPORT CHAINELECTRON TRANSPORT CHAIN
ELECTRON TRANSPORT CHAIN
DEEKSHA RANI10 visualizações
Factors affecting fluorescence and phosphorescence.pptx por SamarthGiri1
Factors affecting fluorescence and phosphorescence.pptxFactors affecting fluorescence and phosphorescence.pptx
Factors affecting fluorescence and phosphorescence.pptx
SamarthGiri17 visualizações
1978 NASA News Release Log por purrterminator
1978 NASA News Release Log1978 NASA News Release Log
1978 NASA News Release Log
purrterminator15 visualizações
Light Pollution for LVIS students por CWBarthlmew
Light Pollution for LVIS studentsLight Pollution for LVIS students
Light Pollution for LVIS students
CWBarthlmew12 visualizações
vitamine B1.pptx por ajithkilpart
vitamine B1.pptxvitamine B1.pptx
vitamine B1.pptx
ajithkilpart28 visualizações
DEVELOPMENT OF FROG.pptx por sushant292556
DEVELOPMENT OF FROG.pptxDEVELOPMENT OF FROG.pptx
DEVELOPMENT OF FROG.pptx
sushant29255611 visualizações
Radioactive and Non- radioactive probes por Nathiya .T Nathiya.T
Radioactive and Non- radioactive probesRadioactive and Non- radioactive probes
Radioactive and Non- radioactive probes
Nathiya .T Nathiya.T5 visualizações
Exploring the nature and synchronicity of early cluster formation in the Larg... por Sérgio Sacani
Exploring the nature and synchronicity of early cluster formation in the Larg...Exploring the nature and synchronicity of early cluster formation in the Larg...
Exploring the nature and synchronicity of early cluster formation in the Larg...
Sérgio Sacani1.2K visualizações
Nitrosamine & NDSRI.pptx por NileshBonde4
Nitrosamine & NDSRI.pptxNitrosamine & NDSRI.pptx
Nitrosamine & NDSRI.pptx
NileshBonde418 visualizações
MILK LIPIDS 2.pptx por abhinambroze18
MILK LIPIDS 2.pptxMILK LIPIDS 2.pptx
MILK LIPIDS 2.pptx
abhinambroze189 visualizações
Evaluation and Standardization of the Marketed Polyherbal drug Patanjali Divy... por Anmol Vishnu Gupta
Evaluation and Standardization of the Marketed Polyherbal drug Patanjali Divy...Evaluation and Standardization of the Marketed Polyherbal drug Patanjali Divy...
Evaluation and Standardization of the Marketed Polyherbal drug Patanjali Divy...
Anmol Vishnu Gupta7 visualizações
Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F... por SwagatBehera9
Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...
Effect of Integrated Nutrient Management on Growth and Yield of Solanaceous F...
SwagatBehera95 visualizações
ALGAL PRODUCTS.pptx por RASHMI M G
ALGAL PRODUCTS.pptxALGAL PRODUCTS.pptx
ALGAL PRODUCTS.pptx
RASHMI M G 6 visualizações
Experimental animal Guinea pigs.pptx por Mansee Arya
Experimental animal Guinea pigs.pptxExperimental animal Guinea pigs.pptx
Experimental animal Guinea pigs.pptx
Mansee Arya38 visualizações
Note on the Riemann Hypothesis por vegafrank2
Note on the Riemann HypothesisNote on the Riemann Hypothesis
Note on the Riemann Hypothesis
vegafrank27 visualizações

Computer architecture pipelining

  • 2. Out line  Definition of pipeline  Advantages and disadvantage  Type of pipeline (h/w) and (s/w)  Latency and throughput  hazards  Pipeline with Addressing mode  Pipeline with cache memory  RISC Computer
  • 3. pipeline  It is technique of decomposing a sequential process into suboperation, with each suboperation completed in dedicated segment that operates concurrently with all other segments.  Pipeline is commonly known as an assembly line operation.
  • 4. Example Each sub operation is to be performed in a segment within a pipeline. Each segment has one or two registers and a combinational circuit.
  • 5.  The sub operations in each segment of the pipeline are as follows:
  • 8. Latency and throughput  Latency  Each instruction takes a certain time to complete.  latency for that operation is how long does it take to execute single instruction in the pipeline.  Throughput  The number of instructions that complete per second.
  • 9. advantages  1- Pipelining is widely used in modern processors .  2- Quicker time of execution large number of instruction.  3- More efficient use of processor.  4- Arrange the hardware so that more than one operation can be performed at the same time.  5- This technique is efficient for applications that need to repeat the same task in many time with different set of data.
  • 10. Disadvantages 1- Pipelined organization requires complex compilation techniques. 2- pipelining involves adding hardware, then cost of the system increases.
  • 11. Idea of pipelining in computer  The processor execute the program by fetching and executing instructions. One after the other.  Let Fi and Ei refer to the fetch and execute steps for instruction Ii
  • 12. Use the Idea of Pipelining in a Computer F 1 E 1 F 2 E 2 F 3 E 3 I1 I2 I3 (a) Sequential execution Instruction fetch unit Execution unit Interstage buffer B1 (b) Hardware organization Time F1 E1 F2 E2 F3 E3 I1 I2 I3 Instruction (c) Pipelined execution Figure 8.1. Basic idea of instruction pipelining. Clock cycle 1 2 3 4 Time Fetch + Execution
  • 13. Use the Idea of Pipelining in a Computer F4I4 F1 F2 F3 I1 I2 I3 D1 D2 D3 D4 E1 E2 E3 E4 W1 W2 W3 W4 Instruction Figure 8.2. A 4­stage pipeline. Clock cycle 1 2 3 4 5 6 7 (a) Instruction execution divided into four steps F : Fetch instruction D : Decode instruction and fetch operands E: Execute operation W : Write results Interstage buffers (b) Hardware organization B1 B2 B3 Time Fetch + Decode + Execution + Write
  • 14. Use the Idea of Pipelining in a Computer  Computer that has two separate hardware units, one for fetching and another for executing them.  This buffer needed to enable the execution unit while fetch unit fetching the next instruction.  The computer is controlled by a clock.
  • 15. Role of Cache Memory  Each pipeline stage is expected to complete in one clock cycle.  The clock period should be long enough to let the slowest pipeline stage to complete.  Faster stages can only wait for the slowest one to complete.  Since main memory is very slow compared to the execution, if each instruction needs to be fetched from main memory, pipeline is almost useless.[ten times greater than the time needed to perform pipeline stage]  Fortunately, we have cache.
  • 16.  1) Software Pipelining 1) Can Handle Complex Instructions. 2) Allows programs to be reused.  2)Hardware Pipelining 1) Help designer manage complexity – a complex task can be divided into smaller, more manageable pieces. 2) Hardware pipelining offers higher performance. Types of pipeline
  • 17. Types of pipeline  Arithmetic Pipeline : Pipeline arithmetic units are usually found in very high speed computers.  Floating–point operations, multiplication of fixed- point numbers, and similar computations in scientific problem.  Instruction Pipeline: Pipeline processing can occur also in the instruction stream. An instruction pipeline reads consecutive instructions from memory while previous instructions are being executed in other segments.
  • 18. Arithmetic Pipeline  Floating-point adder/subtracter  [1] Compare the exponents  [2] Align the mantissa  [3] Add/sub the mantissa  [4] Normalize the result X = A x 10a = 0.9504 x 103 Y = B x 10b = 0.8200 x 102 1) Compare exponents : 3 - 2 = 1 2) Align mantissas X = 0.9504 x 103 Y = 0.08200 x 103 3) Add mantissas Z = 1.0324 x 103 4) Normalize result Z = 0.10324 x 104 R Compare exponents by subtraction a b R Choose exponent Exponents R A B Align mantissa Mantissas Difference R Add or subtract mantissas R Normalize result R R Adjust exponent R Segment 1: Segment 2: Segment 3: Segment 4:
  • 19. INSTRUCTION CYCLE  Six Phases* in an Instruction Cycle  [1] Fetch an instruction from memory  [2] Decode the instruction  [3] Calculate the effective address of the operand  [4] Fetch the operands from memory  [5] Execute the operation  [6] Store the result in the proper place  * Some instructions skip some phases  * Effective address calculation can be done in the part of the decoding phase  * Storage of the operation result into a register is done automatically in the execution phase  ==> 4-Stage Pipeline  [1] FI: Fetch an instruction from memory  [2] DA: Decode the instruction and calculate the effective address of the operand  [3] FO: Fetch the operand  [4] EX: Execute the operation
  • 20.  Execution of Three Instructions in a 4-Stage Pipeline Conventional
  • 21. Pipeline Performance  The potential increase in performance resulting from pipelining is proportional to the number of pipeline stages.  However, this increase would be achieved only if all pipeline stages require the same time to complete, and there is no interruption throughout program execution.  Unfortunately, this is not true.  Floating point may involve many clock cycle  Stalling involves halting the flow of instructions until the required result is ready to be used. However stalling wastes processor time by doing nothing while waiting for the result.  Pipeline stall causes degradation in pipeline performance.
  • 22. Pipeline Performance  Any condition that causes a pipeline to stall is called a hazard. Data hazard – when an instruction depend on the result of a previous instruction, but this result is not yet available.  Instruction (control) hazard – a delay in the availability of an instruction causes the pipeline to stall for example branch.  Structural hazard – the situation when two instructions require the use of a given hardware resource at the same time.
  • 23. Data Hazards  We must ensure that the results obtained when instructions are executed in a pipelined processor are identical to those obtained when the same instructions are executed sequentially.  Hazard occurs A ← 3 + A B ← 4 × A  No hazard A ← 5 × C B ← 20 + C  When two operations depend on each other, they must be executed sequentially in the correct order.  Another example: Mul R2, R3, R4 Add R5, R4, R6
  • 24. Data Hazards F1 F2 F3 I1 (Mul) I2 (Add) I3 D1 D3 E1 E3 E2 W3 Instruction Figure 8.6. Pipeline stalled by data dependency between D2 and W1. 1 2 3 4 5 6 7 8 9Clock cycle W1 D2A W2 F4 D4 E4 W4I4 D2 Time Figure 8.6. Pipeline stalled by data dependency between D2 and W1. Mul R2, R3, R4 Add R5, R4, R6
  • 25. Data dependency solutions  Hardware interlocks: is a circuit that detects instructions whose source operands are destinations of instructions Farther up in the pipeline.  Operand forwarding : uses special h/w to detect a conflict and then avoid it by routing the data through special paths between pipeline segments .  delayed load :the compiler for such computers is designed to detect a data conflict and reorder the instructions as necessary to delay the loading of the Conflicting data by inserting no –operation instructions. Example I1: Mul R2, R3, R4 NOP NOP I2: Add R5, R4, R6
  • 26. Instruction Hazards  One of the major problems in operating an instruction pipeline is the occurrence of branch instructions.  1- Unconditional branch always change the sequential program flow by loading the program counter with the target address.  2- Conditional branch the control selects the target instruction if the condition is satisfied or the next sequential instruction if the condition is not satisfied.
  • 27. 1-Unconditional Branches F2I2 (Branch) I3 Ik E2 F3 Fk Ek Fk+1 Ek+1Ik+1 Instruction Figure 8.8. An idle cycle caused by a branch instruction. Execution unit idle 1 2 3 4 5Clock cycle Time F1I1 E1 6 X
  • 28. Unconditional Branches  The time lost as a result of a branch instruction is referred to as the branch penalty.  The previous example instruction I3 is wrongly fetched and branch target address k will discard the i3.  Typically the Fetch unit has dedicated h/w which will identify the branch target address as quick as possible after an instruction is fetched.
  • 29. Instruction Queue and Prefetching  branch instruction stalls the pipeline.  Many processor employs dedicated fetch unit which will fetch the instruction and put them into a queue.  It can store several instruction at a time.  A separate unit called dispatch unit, takes instructions from the front of the queue and send them to the execution unit.
  • 31. 2- Conditional Braches  A conditional branch instruction introduces the added hazard caused by the dependency of the branch condition on the result of a previous instruction.  The decision to branch cannot be made until the execution of that instruction has been completed.
  • 32. Delayed Branch Add LOOP Shift_left R1 Decrement Branch=0 R2 LOOP NEXT (a) Original program loop LOOP Decrement R2 Branch=0 Shift_left LOOP R1 NEXT (b) Reordered instructions Figure 8.12. Reordering of instructions for a delayed branch. Add R1,R3 R1,R3
  • 33. Addressing Modes  Addressing modes include simple ones and complex ones.  In choosing the addressing modes to be implemented in a pipelined processor, we must consider the effect of each addressing mode on instruction flow in the pipeline:  Side effects  The extent to which complex addressing modes cause the pipeline to stall  Whether a given mode is likely to be used by compilers
  • 34. Addressing Modes  In a pipelined processor, complex addressing modes do not necessarily lead to faster execution.  Advantage: reducing the number of instructions / program space  Disadvantage: cause pipeline to stall / more hardware to decode / not convenient for compiler to work with  Conclusion: complex addressing modes are not suitable for pipelined execution.
  • 35. Addressing Modes  Good addressing modes should have:  Access to an operand does not require more than one access to the memory  Only load and store instruction access memory operands  The addressing modes used do not have side effects  Register, register indirect, index
  • 36. RISC pipeline • RISC (Reduced Instruction Set Computer) • 1- To use an efficient instruction pipeline • a) to implement an instruction pipeline using a small number of • suboperations, with each begin executed in one cycle. • b) because the fixed length instruction format , the decoding of the • operation can occur at the same time as register selection. • 2- Data transfer instruction in RISC are limited to load and store • instruction.by using cache memory. • 3-One of major advantage of RISC is ability to execute instruction • at the rate of one per clock cycle that can achieve pipeline • segments requiring just one clock cycle. • 4- The compiler supported that translates the high-level language • program into machine language program. • .
  • 37. RISC pipeline  Instruction Cycle of Three-Stage Instruction Pipeline.  I: Instruction Fetch from program memory  A: Decode, Read Registers, ALU Operation  E: Transfer the output of ALU to a register, Transfer EA to a data memory for loading or storing , Transfer branch address to the program counter.  Types of instructions - 1- Data Manipulation Instructions - 2- Load and Store Instructions - 3- Program Control Instructions