SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Mohamed Abd Elhay
 History Overview .
 CPU Architecture.
 Memories.
 Microcontroller Families.
CPU design divide into three parts:
 The datapath
does all of the actual data processing
 A control unit
uses the programmer’s instructions to tell
the datapath what to do
 An instruction
set is the programmer’s interface to CPU
Control Unit
and
Datapath
Control Unit and Datapath
• Processor data-path is the hardware part of the
processor that performs the processing
operations.
• It helps understand how data is transferred
from one component of the processor to
another component
Three main functionality of a processor
datapath :
o Computations ALU
o Fast temporary storage Register file
o Large memory storage RAM
1)Arithmetic Logic Unit :
» A and B are two n-bit inputs
» FS is m-bit function select
code
» F is n-bit result
» Status bits to provide more
information about result F :
► Z = 1 result is zero
► N = 1 result is negative
► V = 1 signed overflow
► C = 1 carry out
A
B
Output
Flags
Control & Selection
2)Register File :
» A number of registers
grouped together
» You can read two
registers at once by
supplying AA and BA
» You can write at a register
using the DA and D inputs
and setting WR = 1
• CPU Registers are classified into two main
categories
– User-visible registers
– Control and status registers
2)Register File :
• User-visible registers
– These are registers that are visible to the programmer
to use for programming the processor.
– They are further categorized as follows:
• General purpose:
– Used by programmer to store data, or perform
operations on them
• Data
– Can be used for storage/retrieval of data only,
not for operations
2)Register File :
• User-visible registers
• Address Registers:
– They are dedicated for storing addresses specific to
memory operations frequently required
– Examples are: Stack pointer & Segment pointer
• Condition Codes:
– They are flags that are set by the CPU as a result of
logic and arithmetic operations
2)Register File :
• Control and Status Registers
– These are a set of essential registers for proper operation. They are
usually not visible to the programmer, although some of them are
so
– Examples are:
• Program Counter (PC):
Contains the address of the instruction to be fetched
• Instruction Register (IR):
Contains the instruction most recently fetched
• Memory address register (MAR): Contains the address
of the location in the memory to be fetched/stored
• Memory buffer register (MBR):
Contains the data to be loaded/stored in the memory
2)Register File :
»Still not completed !!
What is in the DataPath ? (cont.)‫‏‬
► Complete Datapath:
» To write to RAM
» To read from RAM
» Need a constant
► WHO decide WHICH
Control
Unit
Control signals
Status signals
Program
Data path
The control unit connects programs with the datapath :
» It converts program instructions into control signals
for the datapath : WR, DA, AA, BA, MB, FS, MW, MD
» It executes program instructions in the correct
sequence
» It generates the “constant” input for the datapath
The datapath also sends information back to the control
unit For instance, the ALU status bits V, C, N, Z can be
inspected by branch instructions to alter a program’s
control flow
Control Unit
Flags
IR
Clock
Control
Signals
• Execution of instructions is the basic responsibility of the control unit
• The action of executing an instruction is called “instruction‫‏‬cycle”
• Instruction cycles are broken down into smaller actions micro-
operations
• micro-operations ,the action is simple and accomplishes very little
• The‫‏‬control‫‏‬unit‟s‫‏‬heart‫‏‬beat‫‏‬is‫‏‬the‫‏‬processor‫‏‬clock,‫‏‬each‫“‏‬clock‫‏‬
cycle”,‫‏‬the‫‏‬control‫‏‬unit‫‏‬performs‫‏‬one‫‏‬or‫‏‬more‫‏‬micro-operations
• The instruction cycle is broken down into:
– Fetch Cycle
– Indirect Cycle
– Execute Cycle
– Interrupt Cycle
CPU operation Code (binary) Code (hex)
Add register R1 to register R0 0000.1100.0000.0001 0C01
instruction cycle
Four main modules in the control unit :
» Program Counter (PC) register
Keep track of the instruction currently being executed
» Instruction decoder
takes a machine language instruction and produces the matching control
signals for the datapath
» Instruction RAM
Memory that contains the instructions of the program
» Branch control unit
Determines the next value of the PC depending on the jumps / branches
instructions
Program Counter (PC) :
»Addresses the instruction memory
»On each clock cycle, the counter
does one of two things.
►If Load = 0, the PC increments, so
the next instruction will be executed.
►If Load = 1, the PC is updated with Data,
which represents some address specified
in a jump or branch instruction
Load
Data
ADRS
Instruction
RAM
OUT
PC
Instruction Decoder :
» The instruction decoder takes a
machine language instruction and
produces the matching control signals
for datapath
» These signals tell the datapath which
registers or memory locations to
access and what ALU operations to
perform
(to the datapath)‫‏‬
Load
Data
DA AA BA MB FS MDWR MW
PC
ADRS
Instruction
RAM
OUT
Instruction Decoder
Branch Control Unit :
» decides what the PC’s next
value should be :
► For jumps, the PC should be loaded
with the target address specified in
the instruction
► For branch instructions, the PC
should be loaded with the target
address only if the corresponding
status bit is true
► For all other instructions, the PC
should just increment
DA AABA MB FS MD WR MW
V
C
N
Z
Branch
Control
ADRS
Instruction
RAM
OUT
Instruction Decoder
PC
► The basic control unit
On each clock cycle:
» An instruction is read from the
instruction memory
» The instruction decoder generates
the matching datapath control
word
» Datapath registers are read and
sent to the ALU or the data
memory
» ALU or RAM outputs are written
back to the register file
» The PC is incremented, or reloaded
for branches and jumps.
DA AABA MB FS MD WR
V
C
N
Z
Branch
Control
ADRS
Instruction
RAM
OUT
Instruction Decoder
PC
Harvard arch.:
includes two memory units :
► An instruction memory holds the
program
► A separate data memory is used
for computations
► The advantage is that we can read
an instruction and load or store
data in the same clock cycle
Harvard Vs Von Neumann
Harvard Vs Von Neumann
Von Neumann arch.:
includes one memory unit :
a single main memory that holds both
program instructions and data
W R
DA
AA
B A
FS
V
C
N
Z
MB
MD
MW
constant
DA AA B A MB FS MD W R M W
V
C
N
Z
Branch
Control
PC
ADRS
Instruction
RAM
OUT
Instruction Decoder
D
Register file
A B
1 0
Mux B
ADRS DATA
Data RAM
OUT
A B
ALU
G
0 1
Mux D
Control Unit Datapath
That is it the whole processor
RISC CISC
Reduced Instruction Set Computer Complex Instruction Set Computer
optimize execution of instructions by
single instruction limiting capabilities
integrate several functionalities in one
instruction
The compiler or programmer
synthesizes complicated operations
by combining several simple
instructions. (ex: divide operation)
The Compiler is simple as has wide
verity of instructions to perform the
complicate operation
RISC CISC
simple operations that can each
execute in a single cycle
the instructions are often take many cycles to
execute.
have a large general-purpose register
set.
dedicated registers for specific purposes
Any register can handle with ALU dedicated registers specific for ALU operation
ALU can’t deal with Memory directly ALU can deal with memory directly
Due to Memory accesses are costly :
the core can operate at higher clock
frequencies.
and operate at lower clock frequencies
Separate load and store instructions
transfer data between the register bank
and external memory are needed to all
ALU operations
Separate load and store instructions transfer
data between the register bank and external
memory aren’t needed to all ALU
operations
Helps to pipeline execution of instructions
 History Overview .
 CPU Architecture.
 Memories.
 Microcontroller Families.
ROM Types
MROM
• Masked ROM
• Programmed by the manufacturer.
• The term‫„‏‬masked‟‫‏‬comes‫‏‬from‫‏‬the‫‏‬manufacturing‫‏‬process
• In case of a large-scale production, the price is very low.
PROM
• Programmable rom
• Also called One time programmable ROM
• enables programmer to download a program into it one time only.
• If an error is detected after downloading, the only thing you can do is to download
the correct program to another chip.
UV EPROM
• UV Erasable Programmable ROM
• It enables data to be erased under strong ultraviolet light.
• After a few minutes it is possible to download a new program.
EEPROM
• ELECTRICALLY ERASABLE PROGRAMMABLE ROM
• can be erased by exposing it to an electrical charge
Flash Memory
• Invented in the 80s in the laboratories of INTEL
• Represented as the successor to the UV EPROM.
• Can be written and cleared practically an unlimited number of times,
• most microcontrollers are manufactured in flash technology.
ROM Types
SRAM:
• Static random access memory
• uses multiple transistors, typically four to six, for each memory cell
• doesn't have a capacitor in each cell.
DRAM:
• Dynamic random access memory
• has memory cells with a paired transistor and capacitor requiring constant
refreshing.
ROM Types
 History Overview .
 CPU Architecture.
 Memories.
 Microcontroller Families.
P
R
E
P
H
R
A
L
S
•‫‏‬Number‫‏‬of‫‏‬I/O‫‏‬pins‫‏‬required‫‏‬
•‫‏‬Interfaces/peripherals‫‏‬required‫‏‬
•‫‏‬Memory‫‏‬requirements‫‏‬
•‫‏‬Number‫‏‬of‫‏‬interrupts‫‏‬required‫‏‬
•‫‏‬Real-Time considerations
•‫‏‬Development‫‏‬environment‫‏‬
•‫‏‬Processing‫‏‬speed‫‏‬required‫‏‬
•‫‏‬Memory‫‏‬architecture‫‏‬
•‫‏‬Power‫‏‬requirements‫‏‬
•‫‏‬Life‫‏‬cycle‫‏‬costs‫‏‬
•‫‏‬Vendor‫‏‬support‫‏‬

Más contenido relacionado

La actualidad más candente

Processor Organization
Processor OrganizationProcessor Organization
Processor OrganizationDominik Salvet
 
01. Basics of Computer Hardware
01. Basics of Computer Hardware01. Basics of Computer Hardware
01. Basics of Computer HardwareAkhila Dakshina
 
chapter 1 introduction to operating system
chapter 1 introduction to operating systemchapter 1 introduction to operating system
chapter 1 introduction to operating systemAisyah Rafiuddin
 
Computer memory
Computer memoryComputer memory
Computer memorynikunjandy
 
Random access memory
Random access memoryRandom access memory
Random access memoryRuchi Maurya
 
Computer registers
Computer registersComputer registers
Computer registersDeepikaT13
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingTushar Swami
 
Computer Hardware
Computer HardwareComputer Hardware
Computer Hardwarenitinmote
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and DesignKamal Acharya
 
Computer Hardware Basics
Computer Hardware BasicsComputer Hardware Basics
Computer Hardware BasicsMark Rotondella
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.CS_GDRCST
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture NotesFellowBuddy.com
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris manovishnu murthy
 

La actualidad más candente (20)

Storage devices
Storage devicesStorage devices
Storage devices
 
Processor Organization
Processor OrganizationProcessor Organization
Processor Organization
 
System unit
System unitSystem unit
System unit
 
operating system
operating systemoperating system
operating system
 
memory hierarchy
memory hierarchymemory hierarchy
memory hierarchy
 
Computer memory
Computer memoryComputer memory
Computer memory
 
01. Basics of Computer Hardware
01. Basics of Computer Hardware01. Basics of Computer Hardware
01. Basics of Computer Hardware
 
chapter 1 introduction to operating system
chapter 1 introduction to operating systemchapter 1 introduction to operating system
chapter 1 introduction to operating system
 
Computer memory
Computer memoryComputer memory
Computer memory
 
Random access memory
Random access memoryRandom access memory
Random access memory
 
Computer registers
Computer registersComputer registers
Computer registers
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
 
Computer Hardware
Computer HardwareComputer Hardware
Computer Hardware
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
Computer Hardware Basics
Computer Hardware BasicsComputer Hardware Basics
Computer Hardware Basics
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Usb
UsbUsb
Usb
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture Notes
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
 
register
registerregister
register
 

Destacado

How PHP Works ?
How PHP Works ?How PHP Works ?
How PHP Works ?Ravi Raj
 
Windows vs. mac
Windows vs. macWindows vs. mac
Windows vs. macmattso88
 
Memory - RAM and its types
Memory - RAM and its typesMemory - RAM and its types
Memory - RAM and its typesAbhay Matthew
 
SSD - Solid State Drive PPT by Shyam jos
SSD - Solid State Drive PPT by Shyam jos SSD - Solid State Drive PPT by Shyam jos
SSD - Solid State Drive PPT by Shyam jos Shyam Jos
 
A presentation on Motherboard
A presentation on MotherboardA presentation on Motherboard
A presentation on MotherboardShripal Oswal
 
Hard Disk Drive versus Solid State Drive
Hard Disk Drive versus Solid State DriveHard Disk Drive versus Solid State Drive
Hard Disk Drive versus Solid State DriveDac Khue Nguyen
 
AMD Processor
AMD ProcessorAMD Processor
AMD ProcessorAli Fahad
 
History of CPU Architecture
History of CPU ArchitectureHistory of CPU Architecture
History of CPU ArchitectureTim Hall
 
Introduction to Motherboard
Introduction to Motherboard Introduction to Motherboard
Introduction to Motherboard Makrand Patil
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphicsAmandeep Kaur
 

Destacado (18)

How PHP Works ?
How PHP Works ?How PHP Works ?
How PHP Works ?
 
How PHP works
How PHP works How PHP works
How PHP works
 
Windows vs. mac
Windows vs. macWindows vs. mac
Windows vs. mac
 
Solid state drives
Solid state drivesSolid state drives
Solid state drives
 
Memory - RAM and its types
Memory - RAM and its typesMemory - RAM and its types
Memory - RAM and its types
 
Parallel Computing
Parallel ComputingParallel Computing
Parallel Computing
 
DDR3
DDR3DDR3
DDR3
 
SSD PPT BY SAURABH
SSD PPT BY SAURABHSSD PPT BY SAURABH
SSD PPT BY SAURABH
 
SSD - Solid State Drive PPT by Shyam jos
SSD - Solid State Drive PPT by Shyam jos SSD - Solid State Drive PPT by Shyam jos
SSD - Solid State Drive PPT by Shyam jos
 
A presentation on Motherboard
A presentation on MotherboardA presentation on Motherboard
A presentation on Motherboard
 
Hard Disk Drive versus Solid State Drive
Hard Disk Drive versus Solid State DriveHard Disk Drive versus Solid State Drive
Hard Disk Drive versus Solid State Drive
 
AMD Processor
AMD ProcessorAMD Processor
AMD Processor
 
History of CPU Architecture
History of CPU ArchitectureHistory of CPU Architecture
History of CPU Architecture
 
Motherboard ppt
Motherboard pptMotherboard ppt
Motherboard ppt
 
Introduction to Motherboard
Introduction to Motherboard Introduction to Motherboard
Introduction to Motherboard
 
Ram presentation
Ram presentationRam presentation
Ram presentation
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 

Similar a CPU Architecture

ICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxSirRafiLectures
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Subhasis Dash
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basicsLucky Sithole
 
Computer System Architecture - Computer System Architecture
Computer System Architecture - Computer System ArchitectureComputer System Architecture - Computer System Architecture
Computer System Architecture - Computer System Architecturessusera1e32a1
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationAmrutaMehata
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 finalKhalid Elmeadawy
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1Hatem Abd El-Salam
 
TMSLF2407 DSP Controller
TMSLF2407 DSP ControllerTMSLF2407 DSP Controller
TMSLF2407 DSP ControllerANIRUDDHMAINI1
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2parthivrathodlits
 
Memory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycleMemory & the fetch decode-execute cycle
Memory & the fetch decode-execute cyclechantellemallia
 
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001SOLOMONCHINAEMEUCHEA
 
PattPatelCh04.ppt
PattPatelCh04.pptPattPatelCh04.ppt
PattPatelCh04.pptDipakShow2
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and ArchitectureVinit Raut
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded SystemZakaria Gomaa
 

Similar a CPU Architecture (20)

ICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptxICT-Lecture_12(VonNeumannArchitecture).pptx
ICT-Lecture_12(VonNeumannArchitecture).pptx
 
Chap 3 CA.pptx
Chap 3 CA.pptxChap 3 CA.pptx
Chap 3 CA.pptx
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
CAO.pptx
CAO.pptxCAO.pptx
CAO.pptx
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basics
 
Computer System Architecture - Computer System Architecture
Computer System Architecture - Computer System ArchitectureComputer System Architecture - Computer System Architecture
Computer System Architecture - Computer System Architecture
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 final
 
Cpu
CpuCpu
Cpu
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1
 
TMSLF2407 DSP Controller
TMSLF2407 DSP ControllerTMSLF2407 DSP Controller
TMSLF2407 DSP Controller
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2
 
Memory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycleMemory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycle
 
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
HHCJ AMUMARA: COMPUTER STUDIES LECTURE NOTE FOR SS2-001
 
Chapter01 (1).ppt
Chapter01 (1).pptChapter01 (1).ppt
Chapter01 (1).ppt
 
Bc0040
Bc0040Bc0040
Bc0040
 
PattPatelCh04.ppt
PattPatelCh04.pptPattPatelCh04.ppt
PattPatelCh04.ppt
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
 

Más de محمدعبد الحى (16)

Iso26262 component reuse_webinar
Iso26262 component reuse_webinarIso26262 component reuse_webinar
Iso26262 component reuse_webinar
 
Interfacing using ِAtmega16/32
Interfacing using ِAtmega16/32 Interfacing using ِAtmega16/32
Interfacing using ِAtmega16/32
 
Can bus
Can busCan bus
Can bus
 
Lin bus
Lin busLin bus
Lin bus
 
Embedded Systems in Automotive
Embedded Systems in Automotive Embedded Systems in Automotive
Embedded Systems in Automotive
 
MATLAB Programming
MATLAB Programming MATLAB Programming
MATLAB Programming
 
8 bit microcontroller
8 bit microcontroller8 bit microcontroller
8 bit microcontroller
 
Matlab workshop
Matlab workshopMatlab workshop
Matlab workshop
 
Timers
TimersTimers
Timers
 
Interrupts
InterruptsInterrupts
Interrupts
 
Uart
UartUart
Uart
 
Sw testing
Sw testingSw testing
Sw testing
 
Rtos
RtosRtos
Rtos
 
Dio
DioDio
Dio
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Day1
Day1Day1
Day1
 

Último

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 

Último (20)

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 

CPU Architecture

  • 2.  History Overview .  CPU Architecture.  Memories.  Microcontroller Families.
  • 3. CPU design divide into three parts:  The datapath does all of the actual data processing  A control unit uses the programmer’s instructions to tell the datapath what to do  An instruction set is the programmer’s interface to CPU
  • 5. • Processor data-path is the hardware part of the processor that performs the processing operations. • It helps understand how data is transferred from one component of the processor to another component
  • 6. Three main functionality of a processor datapath : o Computations ALU o Fast temporary storage Register file o Large memory storage RAM
  • 7. 1)Arithmetic Logic Unit : » A and B are two n-bit inputs » FS is m-bit function select code » F is n-bit result » Status bits to provide more information about result F : ► Z = 1 result is zero ► N = 1 result is negative ► V = 1 signed overflow ► C = 1 carry out A B Output Flags Control & Selection
  • 8. 2)Register File : » A number of registers grouped together » You can read two registers at once by supplying AA and BA » You can write at a register using the DA and D inputs and setting WR = 1
  • 9. • CPU Registers are classified into two main categories – User-visible registers – Control and status registers 2)Register File :
  • 10. • User-visible registers – These are registers that are visible to the programmer to use for programming the processor. – They are further categorized as follows: • General purpose: – Used by programmer to store data, or perform operations on them • Data – Can be used for storage/retrieval of data only, not for operations 2)Register File :
  • 11. • User-visible registers • Address Registers: – They are dedicated for storing addresses specific to memory operations frequently required – Examples are: Stack pointer & Segment pointer • Condition Codes: – They are flags that are set by the CPU as a result of logic and arithmetic operations 2)Register File :
  • 12. • Control and Status Registers – These are a set of essential registers for proper operation. They are usually not visible to the programmer, although some of them are so – Examples are: • Program Counter (PC): Contains the address of the instruction to be fetched • Instruction Register (IR): Contains the instruction most recently fetched • Memory address register (MAR): Contains the address of the location in the memory to be fetched/stored • Memory buffer register (MBR): Contains the data to be loaded/stored in the memory 2)Register File :
  • 14. What is in the DataPath ? (cont.)‫‏‬ ► Complete Datapath: » To write to RAM » To read from RAM » Need a constant ► WHO decide WHICH
  • 16. The control unit connects programs with the datapath : » It converts program instructions into control signals for the datapath : WR, DA, AA, BA, MB, FS, MW, MD » It executes program instructions in the correct sequence » It generates the “constant” input for the datapath The datapath also sends information back to the control unit For instance, the ALU status bits V, C, N, Z can be inspected by branch instructions to alter a program’s control flow
  • 18. • Execution of instructions is the basic responsibility of the control unit • The action of executing an instruction is called “instruction‫‏‬cycle” • Instruction cycles are broken down into smaller actions micro- operations • micro-operations ,the action is simple and accomplishes very little • The‫‏‬control‫‏‬unit‟s‫‏‬heart‫‏‬beat‫‏‬is‫‏‬the‫‏‬processor‫‏‬clock,‫‏‬each‫“‏‬clock‫‏‬ cycle”,‫‏‬the‫‏‬control‫‏‬unit‫‏‬performs‫‏‬one‫‏‬or‫‏‬more‫‏‬micro-operations
  • 19. • The instruction cycle is broken down into: – Fetch Cycle – Indirect Cycle – Execute Cycle – Interrupt Cycle
  • 20. CPU operation Code (binary) Code (hex) Add register R1 to register R0 0000.1100.0000.0001 0C01 instruction cycle
  • 21. Four main modules in the control unit : » Program Counter (PC) register Keep track of the instruction currently being executed » Instruction decoder takes a machine language instruction and produces the matching control signals for the datapath » Instruction RAM Memory that contains the instructions of the program » Branch control unit Determines the next value of the PC depending on the jumps / branches instructions
  • 22. Program Counter (PC) : »Addresses the instruction memory »On each clock cycle, the counter does one of two things. ►If Load = 0, the PC increments, so the next instruction will be executed. ►If Load = 1, the PC is updated with Data, which represents some address specified in a jump or branch instruction Load Data ADRS Instruction RAM OUT PC
  • 23. Instruction Decoder : » The instruction decoder takes a machine language instruction and produces the matching control signals for datapath » These signals tell the datapath which registers or memory locations to access and what ALU operations to perform (to the datapath)‫‏‬ Load Data DA AA BA MB FS MDWR MW PC ADRS Instruction RAM OUT Instruction Decoder
  • 24. Branch Control Unit : » decides what the PC’s next value should be : ► For jumps, the PC should be loaded with the target address specified in the instruction ► For branch instructions, the PC should be loaded with the target address only if the corresponding status bit is true ► For all other instructions, the PC should just increment DA AABA MB FS MD WR MW V C N Z Branch Control ADRS Instruction RAM OUT Instruction Decoder PC
  • 25. ► The basic control unit On each clock cycle: » An instruction is read from the instruction memory » The instruction decoder generates the matching datapath control word » Datapath registers are read and sent to the ALU or the data memory » ALU or RAM outputs are written back to the register file » The PC is incremented, or reloaded for branches and jumps. DA AABA MB FS MD WR V C N Z Branch Control ADRS Instruction RAM OUT Instruction Decoder PC
  • 26. Harvard arch.: includes two memory units : ► An instruction memory holds the program ► A separate data memory is used for computations ► The advantage is that we can read an instruction and load or store data in the same clock cycle Harvard Vs Von Neumann
  • 27. Harvard Vs Von Neumann Von Neumann arch.: includes one memory unit : a single main memory that holds both program instructions and data
  • 28. W R DA AA B A FS V C N Z MB MD MW constant DA AA B A MB FS MD W R M W V C N Z Branch Control PC ADRS Instruction RAM OUT Instruction Decoder D Register file A B 1 0 Mux B ADRS DATA Data RAM OUT A B ALU G 0 1 Mux D Control Unit Datapath That is it the whole processor
  • 29. RISC CISC Reduced Instruction Set Computer Complex Instruction Set Computer optimize execution of instructions by single instruction limiting capabilities integrate several functionalities in one instruction The compiler or programmer synthesizes complicated operations by combining several simple instructions. (ex: divide operation) The Compiler is simple as has wide verity of instructions to perform the complicate operation
  • 30. RISC CISC simple operations that can each execute in a single cycle the instructions are often take many cycles to execute. have a large general-purpose register set. dedicated registers for specific purposes Any register can handle with ALU dedicated registers specific for ALU operation ALU can’t deal with Memory directly ALU can deal with memory directly Due to Memory accesses are costly : the core can operate at higher clock frequencies. and operate at lower clock frequencies Separate load and store instructions transfer data between the register bank and external memory are needed to all ALU operations Separate load and store instructions transfer data between the register bank and external memory aren’t needed to all ALU operations Helps to pipeline execution of instructions
  • 31.  History Overview .  CPU Architecture.  Memories.  Microcontroller Families.
  • 32.
  • 33. ROM Types MROM • Masked ROM • Programmed by the manufacturer. • The term‫„‏‬masked‟‫‏‬comes‫‏‬from‫‏‬the‫‏‬manufacturing‫‏‬process • In case of a large-scale production, the price is very low. PROM • Programmable rom • Also called One time programmable ROM • enables programmer to download a program into it one time only. • If an error is detected after downloading, the only thing you can do is to download the correct program to another chip.
  • 34. UV EPROM • UV Erasable Programmable ROM • It enables data to be erased under strong ultraviolet light. • After a few minutes it is possible to download a new program. EEPROM • ELECTRICALLY ERASABLE PROGRAMMABLE ROM • can be erased by exposing it to an electrical charge Flash Memory • Invented in the 80s in the laboratories of INTEL • Represented as the successor to the UV EPROM. • Can be written and cleared practically an unlimited number of times, • most microcontrollers are manufactured in flash technology. ROM Types
  • 35. SRAM: • Static random access memory • uses multiple transistors, typically four to six, for each memory cell • doesn't have a capacitor in each cell. DRAM: • Dynamic random access memory • has memory cells with a paired transistor and capacitor requiring constant refreshing. ROM Types
  • 36.  History Overview .  CPU Architecture.  Memories.  Microcontroller Families.