SlideShare a Scribd company logo
EMBEDDED SYSTEMS
Eng : Hatem Abd El-Salam
INTRODUCTION 1
COMPUTER
• The computer is device that I write a code on it and it is doing an operation
Component:
 Processor
 Memory
 IO
Processor
IO Memory
EMBEDDED SYSTEMS
• Embedded systems is computing system have
 Processor
 Memory
 IO
• But minimal specification because it has one job
• It is two ways to impalement Embedded systems
 System On Chip (SOC)
 System Board (SB)
SOC SB
Performance The same The same
Cost Cheaper Costly
Power consumption lower higher
size smaller bigger
SOC VS SB
• Microcontroller is a SOC.
MICROPROCESSOR VS MICROCONTROLLER
introduction to embedded systems part 1
MICRO-CONTROLLER
• Basically a microcontroller can be described as a computer on a chip. a
single chip containing a CPU, non-volatile memory (RAM), volatile
memory(ROM), a timer and an I/O control unit.
• A microcontroller apart from the above mentioned components usually also
include serial communication capabilities, interrupt controls and analog I/O
capabilities.
• Used for a few dedicated functions determined by the system designer.
MICRO-CONTROLLER
• Microcontrollers don’t work alone in the circuit it must interfaces with other on
chip devices like Sensors, Switches, Leds, LCD, Keypad and DC Motor
• Microcontroller can accept inputs from some components and provide outputs
to other components within any given system.
• Differences in requirements, make the manufacturers produce different
microcontrollers with different memory sizes, number of I/O lines and number
of integrated peripheral devices. Other wise they are all similar to use.
MICRO-PROCESSOR
• Just a CPU has to add externally memory, clock, input/output interfaces, timer
and all other needed peripheral. This is the reason a microprocessor has so
many pins.
• The difference between a microcontroller and a microprocessor is that the
microprocessor is a general purpose computer while a microcontroller is a
computer dedicated to one or just a few tasks.
It contains :
 Control Unit (CU)
 the Arithmetic Logic Unit (ALU)
 Instruction Decoder and some Special Registers
MICRO-PROCESSOR
• Microprocessor function: is to fetch the instructions from the memory then
decode and execute them.
• Example:
• CPU=ALU + Registers + Control unit
• Microprocessor alone is useless
MICRO-PROCESSOR
Control Unit:
• The control unit is the circuitry that controls the flow of data through the
processor, and coordinates the activities of the other units within it.
• In other word it is in charge of the entire Instruction (Machine) cycle
MICRO-PROCESSOR
Arithmetic Logic Unit :
• An ALU is an integrated circuit within CPU or GPU that performs arithmetic and logic
operations.
• Arithmetic instructions include:
 Addition
 Subtraction
 shifting operations
• Logic instructions include:
 AND
 OR
 XOR
 NOT operations
introduction to embedded systems part 1
CPU Registers
• Program Counter
(PC)
• Instruction
Register (IR)
• Instruction
Decoder (ID)
• Stack Pointer
(SP)
• Status Register
(SREG)
• Index Registers
(X,Y)
• Accu. Registers
(A,B)
• General Purpose
Registers (GPR)
(R0, R1,
……R31)
Internal Buses
• Data Bus
• Address Bus
• Control Lines
CPU Architectures
• Harvard
• Von Neumann
Instruction Sets
• CISC
• RISC
CPU Registers
• Program Counter
(PC)
• Instruction
Register (IR)
• Instruction
Decoder (ID)
• Stack Pointer
(SP)
• Status Register
(SREG)
• Index Registers
(X,Y)
• Accu. Registers
(A,B)
• General Purpose
Registers (GPR)
(R0, R1,
……R31)
Internal Buses
• Data Bus
• Address Bus
• Control Lines
CPU Architectures
• Harvard
• Von Neumann
Instruction Sets
• CISC
• RISC
PROGRAM COUNTER (PC)
• Most important CPU register
• Holds the address of the next instruction in program memory space
• The size (width) of the program counter is directly related to the size of the
μC’s program memory
INSTRUCTION REGISTER (IR)
• Contains the next instruction (Op-Code) to be decoded by the Instruction
Decoder.
INSTRUCTION DECODER (ID)
• Takes Op-Code stored in the instruction register and decodes it then tells the
CPU what to do for it and enable the components for this operation
STACK POINTER (SP)
• The stack pointer is basically a register that holds either:
 "the memory address of the last location on that stack where data are stored“ or
 "the memory address of the next available location on the stack to store data"
• The definition depends on the design of the μC
STATUS REGISTER (SREG)
• Contains flags represent the status of the last operation to control the following instructions
• Flags as:
 Overflow flag
o Indicates that the result is too large to fit in the register width.
 Negative flag
o Indicates that the result is negative
 Zero flag
o Indicates that the result was zero.
 Carry flag
o Indicates a carry in the last arithmetic or logical operation
 Half-carry flag
o Indicates that a bit carry was produced between the 4-bit halves of a byte operand as a result of the last arithmetic
operation
 Global Interrupt mask
INDEX REGISTERS
• Index Register : Used in indirect addressing modes, as the accessed
• address = index register + offset mentioned in code
ACCUMULATOR REGISTERS
• An Accumulator is a register in which intermediate arithmetic and logic results
are stored
• Access to main memory is slower than access to a register like the accumulator
because the technology used for the large main memory is slower (but
cheaper) than that used for a register.
GENERAL PURPOSE REGISTERS (GPR)
• General purpose registers are available to store any transient data required
by the program.
• In general the more registers a CPU has available, the faster it can work.
CPU Registers
• Program Counter
(PC)
• Instruction
Register (IR)
• Instruction
Decoder (ID)
• Stack Pointer
(SP)
• Status Register
(SREG)
• Index Registers
(X,Y)
• Accu. Registers
(A,B)
• General Purpose
Registers (GPR)
(R0, R1,
……R31)
Internal Buses
• Data Bus
• Address Bus
• Control Lines
CPU Architectures
• Harvard
• Von Neumann
Instruction Sets
• CISC
• RISC
CPU Registers
• Program Counter
(PC)
• Instruction
Register (IR)
• Instruction
Decoder (ID)
• Stack Pointer
(SP)
• Status Register
(SREG)
• Index Registers
(X,Y)
• Accu. Registers
(A,B)
• General Purpose
Registers (GPR)
(R0, R1,
……R31)
Internal Buses
• Data Bus
• Address Bus
• Control Lines
CPU Architectures
• Harvard
• Von Neumann
Instruction Sets
• CISC
• RISC
introduction to embedded systems part 1
DATA BUS
• These are the lines that actually carry the data being transferred
• Wider data buses generally mean higher performance
• The bandwidth of the data bus is how much information can flow through it,
and is a function of the bus width (in bits) and its speed (in MHz)
ADDRESS BUS
• The address bus is the set of lines that carry information about where in
memory the data is to be transferred to or from
• The width of the address bus controls the address ability of the processor,
which is how much system memory the processor can read or write to
• The width of the address and data buses aren't linked
CONTROL LINES
• The control bus carries commands from the CPU and returns status signals
from the devices.
• For example:
 Memory chip READ/WRITE (R/W) lines
 IO device Chip Enable (CE) lines
CPU Registers
• Program Counter
(PC)
• Instruction
Register (IR)
• Instruction
Decoder (ID)
• Stack Pointer
(SP)
• Status Register
(SREG)
• Index Registers
(X,Y)
• Accu. Registers
(A,B)
• General Purpose
Registers (GPR)
(R0, R1,
……R31)
Internal Buses
• Data Bus
• Address Bus
• Control Lines
CPU Architectures
• Harvard
• Von Neumann
Instruction Sets
• CISC
• RISC
HARVARD
• Separate memory areas for program instruction and data
• Two or more internal buses which allow simultaneous access to both instructions
and data
• If the fetched instruction requires an operation on data memory, the CPU can
fetch the next program instruction while it uses the data bus for its data
operation
• Speed up execution time with cost of more hardware complexity
introduction to embedded systems part 1
VON NEUMANN
• Has a single common memory space for Data and Program instructions
• Single data bus which fetches both instructions and data
• Each time the CPU fetches a program instruction it may have to perform one
or more read/write operations to data memory space. It must wait until these
subsequent operations are complete before it can fetch and decode the next
program instruction. (Von-Neumann bottleneck)
• The advantage of this architecture lies in its simplicity and economy
introduction to embedded systems part 1
HARVARD VS VON NEUMANN
CPU Registers
• Program Counter
(PC)
• Instruction
Register (IR)
• Instruction
Decoder (ID)
• Stack Pointer
(SP)
• Status Register
(SREG)
• Index Registers
(X,Y)
• Accu. Registers
(A,B)
• General Purpose
Registers (GPR)
(R0, R1,
……R31)
Internal Buses
• Data Bus
• Address Bus
• Control Lines
CPU Architectures
• Harvard
• Von Neumann
Instruction Sets
• CISC
• RISC
CISC
• Complex Instruction Set Computer (CISC)
 CISC is an old concepts that dates back when memory access was slow
 CISC aimed to integrate several functionalities in one instruction, in order to limit the
program size, and thus limit memory access in order to gain some speed
 Number of instructions are reduced by having multiple operations within a single
instruction
• Examples: x86, Motorola 68k
RISC
• Reduced Instruction Set Computing (RISC)
 As memory technology developed more and more, memory access became faster
 RISC aims to optimize execution of instructions by limiting the capabilities of a single
instruction and having consistent instructions’ execution time (Instruction Pipelining)
 Large and uniform register file
• Small number of instructions that actually reference memory (e.g. STORE, LOAD)
• All other instructions work on the registers only
 Hardware that helps parallel operations (Harvard architecture)
• Examples: ARM, Atmel AVR, PowerPC
CISC VS RISC
Consider this example:
• This CISC assembly code
clear 0x1000 ; clear memory location 0x1000
• Becomes the following RISC assembly code
xor r1,r1 ; clear register 1
store r1,0x1000 ; clear memory location 0x1000
CISC VS RISC
The Performance Equation:
• The following equation is commonly used for expressing a computer's
performance ability:
 The CISC approach attempts to minimize the number of instructions per program,
sacrificing the number of cycles per instruction.
 RISC does the opposite, reducing the cycles per instruction at the cost of the number of
instructions per program.
introduction to embedded systems part 1

More Related Content

PPTX
Embedded system 8051 Microcontroller
PPTX
Ethernet, Point-to-Point Protocol, ARP
PPT
16 control unit
ODP
axi protocol
PPTX
Data communication and network Chapter -1
DOC
Darshan Dehuniya - Resume - ASIC Verification Engineer (1)
PPT
Applications of Time Division multiplexing : statistical TDM
Embedded system 8051 Microcontroller
Ethernet, Point-to-Point Protocol, ARP
16 control unit
axi protocol
Data communication and network Chapter -1
Darshan Dehuniya - Resume - ASIC Verification Engineer (1)
Applications of Time Division multiplexing : statistical TDM

What's hot (20)

PPTX
Memory organization
PPTX
Multiple access communication
PDF
Embedded Systems (18EC62) – Embedded System Design Concepts (Module 4)
PPTX
Serial Communication & Embedded System Interface
PPTX
Presentation energy efficient code converters using reversible logic gates
PPTX
Csma protocols
PPT
INA333 - Zero Drift Instrumentation Amplifier
PPTX
AMBA BUS.pptx
PPTX
EC8791 UML-model train controller
PPTX
Computer System Overview,
PPSX
System on chip architectures
PPTX
PDF
Soc architecture and design
PPTX
System verilog assertions
PPTX
DMA presentation [By- Digvijay]
PPTX
Memory Organization
PDF
R&c
PDF
Module 4 advanced microprocessors
PPT
Routing protocols-network-layer
PPTX
TDMA Time Division Multiple Access
Memory organization
Multiple access communication
Embedded Systems (18EC62) – Embedded System Design Concepts (Module 4)
Serial Communication & Embedded System Interface
Presentation energy efficient code converters using reversible logic gates
Csma protocols
INA333 - Zero Drift Instrumentation Amplifier
AMBA BUS.pptx
EC8791 UML-model train controller
Computer System Overview,
System on chip architectures
Soc architecture and design
System verilog assertions
DMA presentation [By- Digvijay]
Memory Organization
R&c
Module 4 advanced microprocessors
Routing protocols-network-layer
TDMA Time Division Multiple Access
Ad

Similar to introduction to embedded systems part 1 (20)

PPTX
Computer Organisation & Architecture (chapter 1)
PPTX
CAO.pptx
PPTX
Unit 1 computer architecture (1)
PDF
Computer Organization and Architechuture basics
PPTX
Embedded systems 101 final
PPTX
Alisksdjdhdhhdhdhdhdhhdhdheheksjsjs.pptx
PPTX
Mces MOD 1.pptx
PPT
Computer Architecture and Organization ppt
PPTX
Processors selection
PPTX
L1_Unit-1 Introduction to Embedded System.pptx
PPTX
Module -4_microprocessor (1).pptx
PPTX
basicfunctionalunit-190124043726555.pptx
PPTX
MICRO-PROCESSORS and MICRO -CONTROLLER topic
PPT
Microprocessor
PPTX
Computer Organization : CPU, Memory and I/O organization
PPTX
Computer_Organization_and_Architecture.pptx
PPTX
Computer_Organization and architecture _unit 1.pptx
PPTX
It very good ppt because it is good ppt method
PPTX
1.1.2 Processor and primary storage components.pptx
PPT
Microprocessor Systems and Interfacing Slides
Computer Organisation & Architecture (chapter 1)
CAO.pptx
Unit 1 computer architecture (1)
Computer Organization and Architechuture basics
Embedded systems 101 final
Alisksdjdhdhhdhdhdhdhhdhdheheksjsjs.pptx
Mces MOD 1.pptx
Computer Architecture and Organization ppt
Processors selection
L1_Unit-1 Introduction to Embedded System.pptx
Module -4_microprocessor (1).pptx
basicfunctionalunit-190124043726555.pptx
MICRO-PROCESSORS and MICRO -CONTROLLER topic
Microprocessor
Computer Organization : CPU, Memory and I/O organization
Computer_Organization_and_Architecture.pptx
Computer_Organization and architecture _unit 1.pptx
It very good ppt because it is good ppt method
1.1.2 Processor and primary storage components.pptx
Microprocessor Systems and Interfacing Slides
Ad

More from Hatem Abd El-Salam (16)

PDF
Java- language Lecture 7
PDF
Java- language Lecture 6
PDF
Java- language Lecture 5
PDF
Java- language Lecture 4
PDF
Java- language Lecture 3
PDF
Java- Language Lecture 2
PDF
Java- language Lecture 1
PDF
introduction to embedded systems part 2
PDF
C- language Lecture 8
PDF
C- language Lecture 7
PDF
C- language Lecture 6
PDF
C- language Lecture 5
PDF
C- language Lecture 4
PDF
C- language Lecture 3
PDF
C- Language Lecture 2
PDF
C-language Lecture 1
Java- language Lecture 7
Java- language Lecture 6
Java- language Lecture 5
Java- language Lecture 4
Java- language Lecture 3
Java- Language Lecture 2
Java- language Lecture 1
introduction to embedded systems part 2
C- language Lecture 8
C- language Lecture 7
C- language Lecture 6
C- language Lecture 5
C- language Lecture 4
C- language Lecture 3
C- Language Lecture 2
C-language Lecture 1

Recently uploaded (20)

PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Classroom Observation Tools for Teachers
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Insiders guide to clinical Medicine.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
master seminar digital applications in india
PPTX
Pharma ospi slides which help in ospi learning
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Complications of Minimal Access Surgery at WLH
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
TR - Agricultural Crops Production NC III.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Module 4: Burden of Disease Tutorial Slides S2 2025
O5-L3 Freight Transport Ops (International) V1.pdf
Classroom Observation Tools for Teachers
Sports Quiz easy sports quiz sports quiz
Supply Chain Operations Speaking Notes -ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Computing-Curriculum for Schools in Ghana
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Insiders guide to clinical Medicine.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
master seminar digital applications in india
Pharma ospi slides which help in ospi learning
human mycosis Human fungal infections are called human mycosis..pptx
Microbial diseases, their pathogenesis and prophylaxis
Complications of Minimal Access Surgery at WLH

introduction to embedded systems part 1

  • 1. EMBEDDED SYSTEMS Eng : Hatem Abd El-Salam INTRODUCTION 1
  • 2. COMPUTER • The computer is device that I write a code on it and it is doing an operation Component:  Processor  Memory  IO Processor IO Memory
  • 3. EMBEDDED SYSTEMS • Embedded systems is computing system have  Processor  Memory  IO • But minimal specification because it has one job • It is two ways to impalement Embedded systems  System On Chip (SOC)  System Board (SB)
  • 4. SOC SB Performance The same The same Cost Cheaper Costly Power consumption lower higher size smaller bigger SOC VS SB • Microcontroller is a SOC.
  • 7. MICRO-CONTROLLER • Basically a microcontroller can be described as a computer on a chip. a single chip containing a CPU, non-volatile memory (RAM), volatile memory(ROM), a timer and an I/O control unit. • A microcontroller apart from the above mentioned components usually also include serial communication capabilities, interrupt controls and analog I/O capabilities. • Used for a few dedicated functions determined by the system designer.
  • 8. MICRO-CONTROLLER • Microcontrollers don’t work alone in the circuit it must interfaces with other on chip devices like Sensors, Switches, Leds, LCD, Keypad and DC Motor • Microcontroller can accept inputs from some components and provide outputs to other components within any given system. • Differences in requirements, make the manufacturers produce different microcontrollers with different memory sizes, number of I/O lines and number of integrated peripheral devices. Other wise they are all similar to use.
  • 9. MICRO-PROCESSOR • Just a CPU has to add externally memory, clock, input/output interfaces, timer and all other needed peripheral. This is the reason a microprocessor has so many pins. • The difference between a microcontroller and a microprocessor is that the microprocessor is a general purpose computer while a microcontroller is a computer dedicated to one or just a few tasks. It contains :  Control Unit (CU)  the Arithmetic Logic Unit (ALU)  Instruction Decoder and some Special Registers
  • 10. MICRO-PROCESSOR • Microprocessor function: is to fetch the instructions from the memory then decode and execute them. • Example: • CPU=ALU + Registers + Control unit • Microprocessor alone is useless
  • 11. MICRO-PROCESSOR Control Unit: • The control unit is the circuitry that controls the flow of data through the processor, and coordinates the activities of the other units within it. • In other word it is in charge of the entire Instruction (Machine) cycle
  • 12. MICRO-PROCESSOR Arithmetic Logic Unit : • An ALU is an integrated circuit within CPU or GPU that performs arithmetic and logic operations. • Arithmetic instructions include:  Addition  Subtraction  shifting operations • Logic instructions include:  AND  OR  XOR  NOT operations
  • 14. CPU Registers • Program Counter (PC) • Instruction Register (IR) • Instruction Decoder (ID) • Stack Pointer (SP) • Status Register (SREG) • Index Registers (X,Y) • Accu. Registers (A,B) • General Purpose Registers (GPR) (R0, R1, ……R31) Internal Buses • Data Bus • Address Bus • Control Lines CPU Architectures • Harvard • Von Neumann Instruction Sets • CISC • RISC
  • 15. CPU Registers • Program Counter (PC) • Instruction Register (IR) • Instruction Decoder (ID) • Stack Pointer (SP) • Status Register (SREG) • Index Registers (X,Y) • Accu. Registers (A,B) • General Purpose Registers (GPR) (R0, R1, ……R31) Internal Buses • Data Bus • Address Bus • Control Lines CPU Architectures • Harvard • Von Neumann Instruction Sets • CISC • RISC
  • 16. PROGRAM COUNTER (PC) • Most important CPU register • Holds the address of the next instruction in program memory space • The size (width) of the program counter is directly related to the size of the μC’s program memory
  • 17. INSTRUCTION REGISTER (IR) • Contains the next instruction (Op-Code) to be decoded by the Instruction Decoder.
  • 18. INSTRUCTION DECODER (ID) • Takes Op-Code stored in the instruction register and decodes it then tells the CPU what to do for it and enable the components for this operation
  • 19. STACK POINTER (SP) • The stack pointer is basically a register that holds either:  "the memory address of the last location on that stack where data are stored“ or  "the memory address of the next available location on the stack to store data" • The definition depends on the design of the μC
  • 20. STATUS REGISTER (SREG) • Contains flags represent the status of the last operation to control the following instructions • Flags as:  Overflow flag o Indicates that the result is too large to fit in the register width.  Negative flag o Indicates that the result is negative  Zero flag o Indicates that the result was zero.  Carry flag o Indicates a carry in the last arithmetic or logical operation  Half-carry flag o Indicates that a bit carry was produced between the 4-bit halves of a byte operand as a result of the last arithmetic operation  Global Interrupt mask
  • 21. INDEX REGISTERS • Index Register : Used in indirect addressing modes, as the accessed • address = index register + offset mentioned in code
  • 22. ACCUMULATOR REGISTERS • An Accumulator is a register in which intermediate arithmetic and logic results are stored • Access to main memory is slower than access to a register like the accumulator because the technology used for the large main memory is slower (but cheaper) than that used for a register.
  • 23. GENERAL PURPOSE REGISTERS (GPR) • General purpose registers are available to store any transient data required by the program. • In general the more registers a CPU has available, the faster it can work.
  • 24. CPU Registers • Program Counter (PC) • Instruction Register (IR) • Instruction Decoder (ID) • Stack Pointer (SP) • Status Register (SREG) • Index Registers (X,Y) • Accu. Registers (A,B) • General Purpose Registers (GPR) (R0, R1, ……R31) Internal Buses • Data Bus • Address Bus • Control Lines CPU Architectures • Harvard • Von Neumann Instruction Sets • CISC • RISC
  • 25. CPU Registers • Program Counter (PC) • Instruction Register (IR) • Instruction Decoder (ID) • Stack Pointer (SP) • Status Register (SREG) • Index Registers (X,Y) • Accu. Registers (A,B) • General Purpose Registers (GPR) (R0, R1, ……R31) Internal Buses • Data Bus • Address Bus • Control Lines CPU Architectures • Harvard • Von Neumann Instruction Sets • CISC • RISC
  • 27. DATA BUS • These are the lines that actually carry the data being transferred • Wider data buses generally mean higher performance • The bandwidth of the data bus is how much information can flow through it, and is a function of the bus width (in bits) and its speed (in MHz)
  • 28. ADDRESS BUS • The address bus is the set of lines that carry information about where in memory the data is to be transferred to or from • The width of the address bus controls the address ability of the processor, which is how much system memory the processor can read or write to • The width of the address and data buses aren't linked
  • 29. CONTROL LINES • The control bus carries commands from the CPU and returns status signals from the devices. • For example:  Memory chip READ/WRITE (R/W) lines  IO device Chip Enable (CE) lines
  • 30. CPU Registers • Program Counter (PC) • Instruction Register (IR) • Instruction Decoder (ID) • Stack Pointer (SP) • Status Register (SREG) • Index Registers (X,Y) • Accu. Registers (A,B) • General Purpose Registers (GPR) (R0, R1, ……R31) Internal Buses • Data Bus • Address Bus • Control Lines CPU Architectures • Harvard • Von Neumann Instruction Sets • CISC • RISC
  • 31. HARVARD • Separate memory areas for program instruction and data • Two or more internal buses which allow simultaneous access to both instructions and data • If the fetched instruction requires an operation on data memory, the CPU can fetch the next program instruction while it uses the data bus for its data operation • Speed up execution time with cost of more hardware complexity
  • 33. VON NEUMANN • Has a single common memory space for Data and Program instructions • Single data bus which fetches both instructions and data • Each time the CPU fetches a program instruction it may have to perform one or more read/write operations to data memory space. It must wait until these subsequent operations are complete before it can fetch and decode the next program instruction. (Von-Neumann bottleneck) • The advantage of this architecture lies in its simplicity and economy
  • 35. HARVARD VS VON NEUMANN
  • 36. CPU Registers • Program Counter (PC) • Instruction Register (IR) • Instruction Decoder (ID) • Stack Pointer (SP) • Status Register (SREG) • Index Registers (X,Y) • Accu. Registers (A,B) • General Purpose Registers (GPR) (R0, R1, ……R31) Internal Buses • Data Bus • Address Bus • Control Lines CPU Architectures • Harvard • Von Neumann Instruction Sets • CISC • RISC
  • 37. CISC • Complex Instruction Set Computer (CISC)  CISC is an old concepts that dates back when memory access was slow  CISC aimed to integrate several functionalities in one instruction, in order to limit the program size, and thus limit memory access in order to gain some speed  Number of instructions are reduced by having multiple operations within a single instruction • Examples: x86, Motorola 68k
  • 38. RISC • Reduced Instruction Set Computing (RISC)  As memory technology developed more and more, memory access became faster  RISC aims to optimize execution of instructions by limiting the capabilities of a single instruction and having consistent instructions’ execution time (Instruction Pipelining)  Large and uniform register file • Small number of instructions that actually reference memory (e.g. STORE, LOAD) • All other instructions work on the registers only  Hardware that helps parallel operations (Harvard architecture) • Examples: ARM, Atmel AVR, PowerPC
  • 39. CISC VS RISC Consider this example: • This CISC assembly code clear 0x1000 ; clear memory location 0x1000 • Becomes the following RISC assembly code xor r1,r1 ; clear register 1 store r1,0x1000 ; clear memory location 0x1000
  • 40. CISC VS RISC The Performance Equation: • The following equation is commonly used for expressing a computer's performance ability:  The CISC approach attempts to minimize the number of instructions per program, sacrificing the number of cycles per instruction.  RISC does the opposite, reducing the cycles per instruction at the cost of the number of instructions per program.