SlideShare uma empresa Scribd logo
1 de 16
Simple CPU Instruction
Set Design
• It actually takes very little hardware to implement a simple CPU.
• An instruction fetch unit, which grabs the next instruction. The bits of the
instruction are what activate different parts of the CPU circuit to make
things happen.
• A register file, from which operands are read, and results are written.
• An arithmetic unit, which performs operations on the operands.
• There are a few key tricks used throughout these designs:
• In a circuit, feeding the output of the circuit back around to its own input,
recycling the same values over and over.
• Most CPUs operate on values of more than one bit. Using a single bus to
represent multiple bits with a single line dramatically simplifies the circuit
schematic compared to the physically more realistic approach of drawing
separate wires for each bit. Logisim calls this "Data Bits"; most other tools
call it a "bus".
• A multiplexor selects one input line from a set of inputs, based on
"select line". For example, an 8-in mux has a 3 bit select input, which
is a binary code indicating which of the 8 inputs to select as the
output. Multiplexors are used:
• In the register file, to select which register should provide input data for
arithmetic. The register select lines are controlled by the input register portion
of the instruction being executed.
• In the arithmetic unit, to pick the output of one arithmetic circuit from
those listed. The arithmetic select lines are controlled by the opcode portion
of the instruction.
11-bit instruction
set CPU
Pipelining in Computer Architecture
Introduction-
•A program consists of several number of instructions.
•These instructions may be executed in the following two ways-
1.Non-Pipelined Execution
2.Pipelined Execution
Pipelining in Computer Architecture
• 1. Non-Pipelined Execution
• In non-pipelined architecture,
• All the instructions of a program are executed sequentially one after
the other.
• A new instruction executes only after the previous instruction has
executed completely.
• This style of executing the instructions is highly inefficient.
Pipelining in Computer Architecture
Example-
• Consider a program consisting of three instructions.
• In a non-pipelined architecture, these instructions execute one after
the other as-
• If time taken for executing one instruction = t, then-
• Time taken for executing ‘n’ instructions = n x t
Pipelining in Computer Architecture
2. Pipelined Execution-
• Multiple instructions are executed parallelly.
• This style of executing the instructions is highly efficient.
• Instruction Pipelining-
• Instruction pipelining is a technique that implements a form of
parallelism called as instruction level parallelism within a
single processor.
• A pipelined processor does not wait until the previous
instruction has executed completely.
• Rather, it fetches the next instruction and begins its
execution.
Pipelining in Computer Architecture
Pipelined Architecture
• The hardware of the CPU is split up into several functional units.
• Each functional unit performs a dedicated task.
• The number of functional units may vary from processor to processor.
• These functional units are called as stages of the pipeline.
• Control unit manages all the stages using control signals.
• There is a register associated with each stage that holds the data.
• There is a global clock that synchronizes the working of all the stages.
• At the beginning of each clock cycle, each stage takes the input from its
register.
• Each stage then processes the data and feed its output to the
register of the next stage.
Pipelining in Computer Architecture
• Four-Stage Pipeline
1.Instruction fetch (IF)
2.Instruction decode (ID)
3.Instruction Execute (IE)
4.Write back (WB)
• To implement four stage pipeline,
• The hardware of the CPU is divided into four functional units.
• Each functional unit performs a dedicated task.
Pipelining in Computer Architecture
• Stage-01:
• First functional unit performs instruction fetch.
• It fetches the instruction to be executed.
• Stage-02:
• Second functional unit performs instruction decode.
• It decodes the instruction to be executed.
• Stage-03:
• Third functional unit performs instruction execution.
• It executes the instruction.
• Stage-04:
• Fourth functional unit performs write back.
• It writes back the result so obtained after executing the instruction.
Pipelining in Computer Architecture
• Execution
• Instructions of the program execute parallelly.
• When one instruction goes from nth stage to (n+1)th stage,
another instruction goes from (n-1)th stage to nth stage.
• Phase-Time Diagram-
• Phase-time diagram shows the execution of instructions in the
pipelined architecture.
• The following diagram shows the execution of three instructions
in four stage pipeline architecture.
Pipelining in Computer Architecture
• Time taken to execute three instructions in four stage pipelined
architecture = 6 clock cycles.
In non-pipelined architecture,
Time taken to execute three instructions would b
= 3 x Time taken to execute one instruction
= 3 x 4 clock cycles
= 12 clock cycles
Pipelining in Computer Architecture
Performance of Pipelined Execution
• The following parameters serve as criterion to estimate the
performance of pipelined execution-
• Speed Up
• Efficiency
• Throughput
Simple CPU Instruction Set Design.pptx

Mais conteúdo relacionado

Semelhante a Simple CPU Instruction Set Design.pptx

Computer organisation and architecture .
Computer organisation and architecture .Computer organisation and architecture .
Computer organisation and architecture .MalligaarjunanN
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with PipeliningAneesh Raveendran
 
Pipelining 16 computers Artitacher pdf
Pipelining   16 computers Artitacher  pdfPipelining   16 computers Artitacher  pdf
Pipelining 16 computers Artitacher pdfMadhuGupta99385
 
Computer arithmetic in computer architecture
Computer arithmetic in computer architectureComputer arithmetic in computer architecture
Computer arithmetic in computer architectureishapadhy
 
03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.pptChABiDRazZaQ
 
pipelining-190913185902.pptx
pipelining-190913185902.pptxpipelining-190913185902.pptx
pipelining-190913185902.pptxAshokRachapalli1
 
Pipelining in Computer System Achitecture
Pipelining in Computer System AchitecturePipelining in Computer System Achitecture
Pipelining in Computer System AchitectureYashiUpadhyay3
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Microchip's PIC Micro Controller
Microchip's PIC Micro ControllerMicrochip's PIC Micro Controller
Microchip's PIC Micro ControllerMidhu S V Unnithan
 
SOC System Design Approach
SOC System Design ApproachSOC System Design Approach
SOC System Design ApproachA B Shinde
 
Computer organisation and architecture updated unit 2 COA ppt.pptx
Computer organisation and architecture updated unit 2 COA ppt.pptxComputer organisation and architecture updated unit 2 COA ppt.pptx
Computer organisation and architecture updated unit 2 COA ppt.pptxMalligaarjunanN
 
Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxManimegalaM3
 
Unit 2 ca- control unit
Unit 2 ca- control unitUnit 2 ca- control unit
Unit 2 ca- control unitBBDITM LUCKNOW
 
Pipelining, processors, risc and cisc
Pipelining, processors, risc and ciscPipelining, processors, risc and cisc
Pipelining, processors, risc and ciscMark Gibbs
 

Semelhante a Simple CPU Instruction Set Design.pptx (20)

Computer organisation and architecture .
Computer organisation and architecture .Computer organisation and architecture .
Computer organisation and architecture .
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with Pipelining
 
Pipelining 16 computers Artitacher pdf
Pipelining   16 computers Artitacher  pdfPipelining   16 computers Artitacher  pdf
Pipelining 16 computers Artitacher pdf
 
Computer arithmetic in computer architecture
Computer arithmetic in computer architectureComputer arithmetic in computer architecture
Computer arithmetic in computer architecture
 
03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt
 
Control unit
Control unit Control unit
Control unit
 
pipelining-190913185902.pptx
pipelining-190913185902.pptxpipelining-190913185902.pptx
pipelining-190913185902.pptx
 
Pipelining in Computer System Achitecture
Pipelining in Computer System AchitecturePipelining in Computer System Achitecture
Pipelining in Computer System Achitecture
 
Debate on RISC-CISC
Debate on RISC-CISCDebate on RISC-CISC
Debate on RISC-CISC
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Unit iii
Unit iiiUnit iii
Unit iii
 
Microchip's PIC Micro Controller
Microchip's PIC Micro ControllerMicrochip's PIC Micro Controller
Microchip's PIC Micro Controller
 
Pipelining slides
Pipelining slides Pipelining slides
Pipelining slides
 
Coa.ppt2
Coa.ppt2Coa.ppt2
Coa.ppt2
 
Digital-Unit-III.ppt
Digital-Unit-III.pptDigital-Unit-III.ppt
Digital-Unit-III.ppt
 
SOC System Design Approach
SOC System Design ApproachSOC System Design Approach
SOC System Design Approach
 
Computer organisation and architecture updated unit 2 COA ppt.pptx
Computer organisation and architecture updated unit 2 COA ppt.pptxComputer organisation and architecture updated unit 2 COA ppt.pptx
Computer organisation and architecture updated unit 2 COA ppt.pptx
 
Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptx
 
Unit 2 ca- control unit
Unit 2 ca- control unitUnit 2 ca- control unit
Unit 2 ca- control unit
 
Pipelining, processors, risc and cisc
Pipelining, processors, risc and ciscPipelining, processors, risc and cisc
Pipelining, processors, risc and cisc
 

Mais de ssuser3aa461

Embedded system timing analysis.pptx
Embedded system timing analysis.pptxEmbedded system timing analysis.pptx
Embedded system timing analysis.pptxssuser3aa461
 
Border Gateway Protocol & IPV6.pptx
Border Gateway Protocol & IPV6.pptxBorder Gateway Protocol & IPV6.pptx
Border Gateway Protocol & IPV6.pptxssuser3aa461
 
unit2-210710110327.pdf
unit2-210710110327.pdfunit2-210710110327.pdf
unit2-210710110327.pdfssuser3aa461
 
intro-to-cnn-April_2020.pptx
intro-to-cnn-April_2020.pptxintro-to-cnn-April_2020.pptx
intro-to-cnn-April_2020.pptxssuser3aa461
 
COMPONENT INTERFACING.pptx
COMPONENT INTERFACING.pptxCOMPONENT INTERFACING.pptx
COMPONENT INTERFACING.pptxssuser3aa461
 

Mais de ssuser3aa461 (6)

Embedded system timing analysis.pptx
Embedded system timing analysis.pptxEmbedded system timing analysis.pptx
Embedded system timing analysis.pptx
 
Border Gateway Protocol & IPV6.pptx
Border Gateway Protocol & IPV6.pptxBorder Gateway Protocol & IPV6.pptx
Border Gateway Protocol & IPV6.pptx
 
unit2-210710110327.pdf
unit2-210710110327.pdfunit2-210710110327.pdf
unit2-210710110327.pdf
 
intro-to-cnn-April_2020.pptx
intro-to-cnn-April_2020.pptxintro-to-cnn-April_2020.pptx
intro-to-cnn-April_2020.pptx
 
5. Recursive.ppt
5. Recursive.ppt5. Recursive.ppt
5. Recursive.ppt
 
COMPONENT INTERFACING.pptx
COMPONENT INTERFACING.pptxCOMPONENT INTERFACING.pptx
COMPONENT INTERFACING.pptx
 

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Simple CPU Instruction Set Design.pptx

  • 2. • It actually takes very little hardware to implement a simple CPU. • An instruction fetch unit, which grabs the next instruction. The bits of the instruction are what activate different parts of the CPU circuit to make things happen. • A register file, from which operands are read, and results are written. • An arithmetic unit, which performs operations on the operands.
  • 3. • There are a few key tricks used throughout these designs: • In a circuit, feeding the output of the circuit back around to its own input, recycling the same values over and over. • Most CPUs operate on values of more than one bit. Using a single bus to represent multiple bits with a single line dramatically simplifies the circuit schematic compared to the physically more realistic approach of drawing separate wires for each bit. Logisim calls this "Data Bits"; most other tools call it a "bus".
  • 4. • A multiplexor selects one input line from a set of inputs, based on "select line". For example, an 8-in mux has a 3 bit select input, which is a binary code indicating which of the 8 inputs to select as the output. Multiplexors are used: • In the register file, to select which register should provide input data for arithmetic. The register select lines are controlled by the input register portion of the instruction being executed. • In the arithmetic unit, to pick the output of one arithmetic circuit from those listed. The arithmetic select lines are controlled by the opcode portion of the instruction.
  • 6. Pipelining in Computer Architecture Introduction- •A program consists of several number of instructions. •These instructions may be executed in the following two ways- 1.Non-Pipelined Execution 2.Pipelined Execution
  • 7. Pipelining in Computer Architecture • 1. Non-Pipelined Execution • In non-pipelined architecture, • All the instructions of a program are executed sequentially one after the other. • A new instruction executes only after the previous instruction has executed completely. • This style of executing the instructions is highly inefficient.
  • 8. Pipelining in Computer Architecture Example- • Consider a program consisting of three instructions. • In a non-pipelined architecture, these instructions execute one after the other as- • If time taken for executing one instruction = t, then- • Time taken for executing ‘n’ instructions = n x t
  • 9. Pipelining in Computer Architecture 2. Pipelined Execution- • Multiple instructions are executed parallelly. • This style of executing the instructions is highly efficient. • Instruction Pipelining- • Instruction pipelining is a technique that implements a form of parallelism called as instruction level parallelism within a single processor. • A pipelined processor does not wait until the previous instruction has executed completely. • Rather, it fetches the next instruction and begins its execution.
  • 10. Pipelining in Computer Architecture Pipelined Architecture • The hardware of the CPU is split up into several functional units. • Each functional unit performs a dedicated task. • The number of functional units may vary from processor to processor. • These functional units are called as stages of the pipeline. • Control unit manages all the stages using control signals. • There is a register associated with each stage that holds the data. • There is a global clock that synchronizes the working of all the stages. • At the beginning of each clock cycle, each stage takes the input from its register. • Each stage then processes the data and feed its output to the register of the next stage.
  • 11. Pipelining in Computer Architecture • Four-Stage Pipeline 1.Instruction fetch (IF) 2.Instruction decode (ID) 3.Instruction Execute (IE) 4.Write back (WB) • To implement four stage pipeline, • The hardware of the CPU is divided into four functional units. • Each functional unit performs a dedicated task.
  • 12. Pipelining in Computer Architecture • Stage-01: • First functional unit performs instruction fetch. • It fetches the instruction to be executed. • Stage-02: • Second functional unit performs instruction decode. • It decodes the instruction to be executed. • Stage-03: • Third functional unit performs instruction execution. • It executes the instruction. • Stage-04: • Fourth functional unit performs write back. • It writes back the result so obtained after executing the instruction.
  • 13. Pipelining in Computer Architecture • Execution • Instructions of the program execute parallelly. • When one instruction goes from nth stage to (n+1)th stage, another instruction goes from (n-1)th stage to nth stage. • Phase-Time Diagram- • Phase-time diagram shows the execution of instructions in the pipelined architecture. • The following diagram shows the execution of three instructions in four stage pipeline architecture.
  • 14. Pipelining in Computer Architecture • Time taken to execute three instructions in four stage pipelined architecture = 6 clock cycles. In non-pipelined architecture, Time taken to execute three instructions would b = 3 x Time taken to execute one instruction = 3 x 4 clock cycles = 12 clock cycles
  • 15. Pipelining in Computer Architecture Performance of Pipelined Execution • The following parameters serve as criterion to estimate the performance of pipelined execution- • Speed Up • Efficiency • Throughput