SlideShare a Scribd company logo
1
5. Embedded Systems
By:
Dr. Mohammed Abdul-Muttaleb
Life Support
Embedded Systems
❖ Definition 1) Any device that includes a programmable computer but is not itself a
general-purpose computer.
or 2) Embedded systems are computing systems with tightly coupled hardware and
software integration, that are designed to perform a dedicated function.
❖ Take advantage of application characteristics to optimize the design:
• Does not need all the general-purpose elements.
Household
Appliances
Communication
Avionics
Example: Automotive Embedded Systems
• Modern embedded systems are often based on microcontrollers (i.e.
CPUs with integrated memory or peripheral interfaces)
• For example, today’s high-end automobile have > 80
microprocessors:
• 3-bit microcontroller checks seat belt;
• microcontrollers run dashboard devices;
• 16/32-bit microprocessor controls engine.
• Thousands lines of code
Embedded Systems
❖Characteristics of Embedded Systems:
•Real-time operation.
•Low manufacturing cost.
•Low power.
•Portable
• Designing hardware for embedded systems is challenging, because
the designers have to be, very careful, for a lot of reasons…
Embedded System Design
Embedded System Design
1. Required Hardware
–How many processors? How much memory?
• Let’s design an elevator control’ system.
• How much data would the system need to process in single cycles? The largest would be
the highest number of floors the elevator has to travel up. Assuming that the number is 50
(for a 50-storey building), we need to store all the numbers from 0 to 50 and the processor
should be able to process those numbers.
• In such cases, an 6-bit processor (one which can process 8 bits in one clock cycle) is more
than enough since it will be able to process any number between 0 and 127.
Embedded System Design
2. Power Consumption
Why is Power Consumption an Issue?
• Portable systems - battery life time!
• Systems with a very limited power budget: Mars
Pathfinder, autonomous vehicle and helicopter, ...
• Desktops and servers: high power consumption -
raises temperature
• One of the main difficulties with developing high
performance chips is heat extraction.
How do we minimize power?
• Sleep mode: A common practice to prevent the microcontroller from drawing
maximum power is to put it into deep sleep mode when it’s idle. In deep sleep
mode, microcontrollers often consume a tiny fraction of the maximum current,
often in nano-amps. interrupts can then be used to wake up the
microcontroller.
• Dynamic change of the processor frequency: low frequency could be used
during the idle periods and a high frequency during the intensive calculations
• Turn off unnecessary devices: Turn off wifi, Bluetooth, etc..
• Code optimization…
Embedded System Design
How to minimize power?: code optimization
Some tips:
• Reduce the usage of variables
• Use bit shift operation instead of
multiplication and division
• Switch instead of if-else
• Work with interrupt
• Use decrement loop…
Decrement loop
• A decremented loop will generate less
assembly code as compared to an
incremented loop.
• That is because in an increment loop, a
comparison instruction is needed to
compare the loop index with the
maximum value in every loop to check if
the loop index reaches the maximum
value. On the contrary in a decrement
loop, this comparison is not needed any
more because the decremented result of
the loop index will set the zero flag in
SREG if it reaches zero.
Embedded System Design: code optimization
• How do we reduce size/weight?
• Flexibility and Upgradeability
• Use Reduced Instruction Set Compute (RISC) Architecture instead of Complex
Instruction Set Computer (CISC).
• You’re not going to find a Core i7 in an embedded system!
Embedded System Design
RISC Architecture
• Small set of simple and general instructions, rather than a large set of
complex and specialized instructions
• Smartphones and tablet computers such as the iPad and Android devices
use of ARM architecture processors which is RISC-based systems.
• The CISC approach attempts to minimize the number of instructions per
program, sacrificing the number of cycles per instruction.
•. A CISC processor is easier to control and command because it carries
out some of the more complicated functions automatically but requires
more time
• An x86 (or x64) processor belongs CISC family. This type of processor has
a more complicated instruction. ‫هذه‬
‫ية‬‫ر‬‫معما‬
‫مستخدمة‬
‫ي‬
‫ف‬
‫معالجات‬
‫انت‬
‫ل‬
CISC Architecture
CISC RISC
Many instructions More complex instruction than
RISC
Few instructions
Instructions have varying lengths Instructions have fixed lengths
Instructions execute in varying times Instructions execute in 1 bus cycles
Many instructions can access memory
Requires more memory access
Few instructions can access memory
• Load from memory to a register
• Store from register to memory
In one instruction, the processor can both
• read memory and
• write memory
No one instruction can both read and write
memory in the same instruction
Fewer and more specialized registers.
• some registers contain data,
• others contain addresses
Many identical general purpose registers
CISC vs RISC
CISC RICS
LOAD R1, A
LOAD R2, B
PROD A, B
STORE R3, A
MULT A,B
Microcontrollers vs Microprocessors
• Microcontrollers have RAM, ROM, EEPROM embedded
in it while microprocessor has to use external circuits.
• Processing speed of microcontrollers is about 8 MHz to 50 MHz while the
speed of general microprocessors is above 1 GHz.
• Microprocessor is generally used for general purpose processing while
microcontroller is used for a specific purpose.
B.Random Access Memory (RAM): Also called Read/Write Memory,
requires external power to maintain memory content. The term random
access refers to the ability to access any memory cell directly. Types of
RAM that are of interest:
• Dynamic RAM (DRAM): DRAM is a RAM device that requires
periodic refreshing to retain its content.
• Static RAM (SRAM): SRAM is a RAM device that retains its content as long
as power is supplied by an external power source. SRAM does not
require periodic refreshing and it is faster than DRAM.
• Non-Volatile RAM (NVRAM): NVRAM is a special type of SRAM that
has backup battery power so it can retain its content after the main
system power is shut off.
Embedded System Memory: RAM
DRAM Memory Technology
• Dynamic random-access memory
• Capacitor charge state indicates stored value
• Whether the capacitor is charged or discharged indicates storage of 1 or 0
• 1 capacitor
• 1 access transistor
• Capacitor leaks
• Needs Recherche after each read (destructive read)
21
DRAM
Dynamic RAM
• DRAM stores the binary information in the form of electric charges on
capacitors.
• The capacitors are provided inside the chip by MOS transistors.
• The capacitors tends to discharge with time and must be periodically
recharged by refreshing the dynamic memory.
• DRAM offers reduced power consumption and larger storage capacity
in a single memory chip.
• High capacity, low cost, low speed, low power consumption.
SRAM Memory Technology
24
• Static random access memory
• Two cross coupled inverters store a single bit
• 6 Transistors in total
• 4 transistors for storage (each invertor has 2 transistor)
• 2 transistors for access
Static RAM
• SRAM consists essentially of internal latches that store the binary
information.
• The stored information remains valid as long as power is applied to
the unit.
• SRAM is easier to use and has shorter read and write cycles.
• Low capacity, high cost, high speed, high power consumption.
Hard Disk Drives (HDDs)
Read/Write Head
Side View
Platters
• HDD is an electromechanical data storage device that uses magnetic storage to store
and retrieve digital information using one or more rigid rapidly rotating disks (platters)
coated with magnetic material.
• Speed is dependent on rotation speed (5400, 7200…10000)
SSD vs HDD
Reliability on storage
retention
SSDs typically start to lose data after
about 5-10 years
If kept in a dry environment at low
temperature, HDDs can retain their data
for a very long period.
Power consumption
High performance flash-based SSDs.
No moving parts(eliminate
seek/rotational delay)
Consume more power due to motors
Durability Can tolerate shock Shock can damage the hard
Weight Light weight Heavier weight
Speed High (250-500MB) Low (75-140 MB)
Solid State Hard (SSD)
• Like a memory stick, the SSD stores information on microchips and
contains no moving parts.
• Most SSD manufacturers use non-volatile NAND flash memory in the
construction of their SSDs because of the lower cost compared with
DRAM and the ability to retain the data without a constant power
supply.
• Replace rotating magnetic media with non- volatile
memory (battery backed DRAM)
Types of Memories
Type Size Latency Cost/bit
Register < 1KB < 1ns $$$$
On-chip SRAM 8KB-6MB < 2ns $$$
Off-chip SRAM 1Mb – 16Mb < 10ns $$
DRAM 64MB – 1TB < 100ns $
Disk (SSD, HDD) 40GB – 1PB < 20ms < $1/GB
CAPACITY
SPEED
and
COST
Flash Memory
• Invented in 1984 by a Japanese engineer (Fujio Masuoka) at TOSHIBA
• Non-volatile memory technology
• Very fast eraser process similar to a camera flash
• Has limited number of write cycles (endurance)
34
Floating Gate MOSFET (FGMOS)
• The fundamental build block of flash memory is FGMOS
FGMOS states
• Reading logic “0” and logic “1”
• Programming to “0” and “1”
Logic One “1”
Reading Data (logic “1”)
Reading data (Logic “0”)
Erasing (Programming to zero)
Erasing (Erasing to 1)
There are two types of flash memory: NOR Flash and NAND Flash
New technology for storing data
SLC: Single layer Cell
QLC: Quad layer Cell TLC: Triple layer Cell
5_Embedded Systems  مختصر.pdf
NAND vs NOR
• NOR for high reliability mobile phone and low capacity such as
medical devices and instruments
• NAND high memory not needing fast reading time such as camera
and flash memory
NAND Flash
Page addressable (e.g., 512 Bytes )
Slow random reads (~30us)
fast writes (~3.5ms to erase 120KB)
Higher density
Used for normal storage
NOR Flash
Reads at byte granularity
Fast random reads (~120ns)
slow writes (~520ms to erase 120KB)
Lesser density
Primarily used as code storage
Question
• Why NOR flash is an attractive technology for storing program’s
binary on an embedded platform? Focus on Read speed, and write
speed for reasoning.
47

More Related Content

PPT
Embeded system by Mitesh Kumar
PPTX
Introduction to embedded System.pptx
PPT
Embedded systems-unit-1
PDF
PILOT Session for Embedded Systems
PPTX
ARM Processor architecture
PPT
Ppt embedded
PPT
Embedded
Embeded system by Mitesh Kumar
Introduction to embedded System.pptx
Embedded systems-unit-1
PILOT Session for Embedded Systems
ARM Processor architecture
Ppt embedded
Embedded

Similar to 5_Embedded Systems مختصر.pdf (20)

PPT
Embedded
PDF
Embedded systems introduction
PPTX
Microcontroller overview 1
PPT
Microcontrollers and intro to real time programming 1
PPTX
Introduction to Embedded C++.pptx
PPTX
Module-3 ADVANCED MICROCONTROLLER IMP.pptx
PDF
Summer training embedded system and its scope
PPTX
Prerna sharma
PPTX
Embedded systems - UNIT-1 - Mtech
DOCX
Project Report On Micro-controller Embedded System
PDF
Giao trinh he thong nhung vdk h8
PPTX
Microcontroller(18CS44) module 1
PDF
E-Note_19681_Content_Document_20240512114009AM.pdf
PPT
ritesh (3)
PPT
Introduction to embedded systems powerpoint
PPTX
Week 2(b) - Processing Data in Computer.pptx
PPT
Introduction to embedded systems
PPTX
UNIT 1.pptx
DOCX
edited doc
Embedded
Embedded systems introduction
Microcontroller overview 1
Microcontrollers and intro to real time programming 1
Introduction to Embedded C++.pptx
Module-3 ADVANCED MICROCONTROLLER IMP.pptx
Summer training embedded system and its scope
Prerna sharma
Embedded systems - UNIT-1 - Mtech
Project Report On Micro-controller Embedded System
Giao trinh he thong nhung vdk h8
Microcontroller(18CS44) module 1
E-Note_19681_Content_Document_20240512114009AM.pdf
ritesh (3)
Introduction to embedded systems powerpoint
Week 2(b) - Processing Data in Computer.pptx
Introduction to embedded systems
UNIT 1.pptx
edited doc
Ad

Recently uploaded (20)

PPTX
DEATH AUDIT MAY 2025.pptxurjrjejektjtjyjjy
PPTX
AIR BAG SYStYEM mechanical enginweering.pptx
PPTX
quadraticequations-111211090004-phpapp02.pptx
PPTX
Group 4 [BSIT-1C] Computer Network (1).pptx
PDF
PakistanCoinageAct-906.pdfdbnsshsjjsbsbb
PPTX
Subordinate_Clauses_BlueGradient_Optimized.pptx
PPTX
1.pptxsadafqefeqfeqfeffeqfqeqfeqefqfeqfqeffqe
PPT
Hypersensitivity Namisha1111111111-WPS.ppt
PPTX
unit1d-communitypharmacy-240815170017-d032dce8.pptx
PPTX
Fundamentals of Computer.pptx Computer BSC
PDF
-DIGITAL-INDIA.pdf one of the most prominent
PPTX
A Clear View_ Interpreting Scope Numbers and Features
DOCX
Edukasi kultural untuk kita semua maka c
PDF
ICT grade for 8. MATATAG curriculum .P2.pdf
PDF
Maxon CINEMA 4D 2025 Crack Free Download Latest Version
PDF
Presented by ATHUL KRISHNA.S_20250813_191657_0000.pdf
PPT
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
PDF
Printing Presentation to show beginners.
PPTX
Computers and mobile device: Evaluating options for home and work
PPTX
rorakshsjppaksvsjsndjdkndjdbdidndjdbdjom.pptx
DEATH AUDIT MAY 2025.pptxurjrjejektjtjyjjy
AIR BAG SYStYEM mechanical enginweering.pptx
quadraticequations-111211090004-phpapp02.pptx
Group 4 [BSIT-1C] Computer Network (1).pptx
PakistanCoinageAct-906.pdfdbnsshsjjsbsbb
Subordinate_Clauses_BlueGradient_Optimized.pptx
1.pptxsadafqefeqfeqfeffeqfqeqfeqefqfeqfqeffqe
Hypersensitivity Namisha1111111111-WPS.ppt
unit1d-communitypharmacy-240815170017-d032dce8.pptx
Fundamentals of Computer.pptx Computer BSC
-DIGITAL-INDIA.pdf one of the most prominent
A Clear View_ Interpreting Scope Numbers and Features
Edukasi kultural untuk kita semua maka c
ICT grade for 8. MATATAG curriculum .P2.pdf
Maxon CINEMA 4D 2025 Crack Free Download Latest Version
Presented by ATHUL KRISHNA.S_20250813_191657_0000.pdf
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
Printing Presentation to show beginners.
Computers and mobile device: Evaluating options for home and work
rorakshsjppaksvsjsndjdkndjdbdidndjdbdjom.pptx
Ad

5_Embedded Systems مختصر.pdf

  • 1. 1 5. Embedded Systems By: Dr. Mohammed Abdul-Muttaleb Life Support
  • 2. Embedded Systems ❖ Definition 1) Any device that includes a programmable computer but is not itself a general-purpose computer. or 2) Embedded systems are computing systems with tightly coupled hardware and software integration, that are designed to perform a dedicated function. ❖ Take advantage of application characteristics to optimize the design: • Does not need all the general-purpose elements. Household Appliances Communication Avionics
  • 3. Example: Automotive Embedded Systems • Modern embedded systems are often based on microcontrollers (i.e. CPUs with integrated memory or peripheral interfaces) • For example, today’s high-end automobile have > 80 microprocessors: • 3-bit microcontroller checks seat belt; • microcontrollers run dashboard devices; • 16/32-bit microprocessor controls engine. • Thousands lines of code
  • 4. Embedded Systems ❖Characteristics of Embedded Systems: •Real-time operation. •Low manufacturing cost. •Low power. •Portable • Designing hardware for embedded systems is challenging, because the designers have to be, very careful, for a lot of reasons… Embedded System Design
  • 5. Embedded System Design 1. Required Hardware –How many processors? How much memory? • Let’s design an elevator control’ system. • How much data would the system need to process in single cycles? The largest would be the highest number of floors the elevator has to travel up. Assuming that the number is 50 (for a 50-storey building), we need to store all the numbers from 0 to 50 and the processor should be able to process those numbers. • In such cases, an 6-bit processor (one which can process 8 bits in one clock cycle) is more than enough since it will be able to process any number between 0 and 127.
  • 6. Embedded System Design 2. Power Consumption Why is Power Consumption an Issue? • Portable systems - battery life time! • Systems with a very limited power budget: Mars Pathfinder, autonomous vehicle and helicopter, ... • Desktops and servers: high power consumption - raises temperature • One of the main difficulties with developing high performance chips is heat extraction.
  • 7. How do we minimize power? • Sleep mode: A common practice to prevent the microcontroller from drawing maximum power is to put it into deep sleep mode when it’s idle. In deep sleep mode, microcontrollers often consume a tiny fraction of the maximum current, often in nano-amps. interrupts can then be used to wake up the microcontroller. • Dynamic change of the processor frequency: low frequency could be used during the idle periods and a high frequency during the intensive calculations • Turn off unnecessary devices: Turn off wifi, Bluetooth, etc.. • Code optimization… Embedded System Design
  • 8. How to minimize power?: code optimization Some tips: • Reduce the usage of variables • Use bit shift operation instead of multiplication and division • Switch instead of if-else • Work with interrupt • Use decrement loop…
  • 9. Decrement loop • A decremented loop will generate less assembly code as compared to an incremented loop. • That is because in an increment loop, a comparison instruction is needed to compare the loop index with the maximum value in every loop to check if the loop index reaches the maximum value. On the contrary in a decrement loop, this comparison is not needed any more because the decremented result of the loop index will set the zero flag in SREG if it reaches zero. Embedded System Design: code optimization
  • 10. • How do we reduce size/weight? • Flexibility and Upgradeability • Use Reduced Instruction Set Compute (RISC) Architecture instead of Complex Instruction Set Computer (CISC). • You’re not going to find a Core i7 in an embedded system! Embedded System Design
  • 11. RISC Architecture • Small set of simple and general instructions, rather than a large set of complex and specialized instructions • Smartphones and tablet computers such as the iPad and Android devices use of ARM architecture processors which is RISC-based systems. • The CISC approach attempts to minimize the number of instructions per program, sacrificing the number of cycles per instruction. •. A CISC processor is easier to control and command because it carries out some of the more complicated functions automatically but requires more time • An x86 (or x64) processor belongs CISC family. This type of processor has a more complicated instruction. ‫هذه‬ ‫ية‬‫ر‬‫معما‬ ‫مستخدمة‬ ‫ي‬ ‫ف‬ ‫معالجات‬ ‫انت‬ ‫ل‬ CISC Architecture
  • 12. CISC RISC Many instructions More complex instruction than RISC Few instructions Instructions have varying lengths Instructions have fixed lengths Instructions execute in varying times Instructions execute in 1 bus cycles Many instructions can access memory Requires more memory access Few instructions can access memory • Load from memory to a register • Store from register to memory In one instruction, the processor can both • read memory and • write memory No one instruction can both read and write memory in the same instruction Fewer and more specialized registers. • some registers contain data, • others contain addresses Many identical general purpose registers CISC vs RISC
  • 13. CISC RICS LOAD R1, A LOAD R2, B PROD A, B STORE R3, A MULT A,B
  • 14. Microcontrollers vs Microprocessors • Microcontrollers have RAM, ROM, EEPROM embedded in it while microprocessor has to use external circuits. • Processing speed of microcontrollers is about 8 MHz to 50 MHz while the speed of general microprocessors is above 1 GHz. • Microprocessor is generally used for general purpose processing while microcontroller is used for a specific purpose.
  • 15. B.Random Access Memory (RAM): Also called Read/Write Memory, requires external power to maintain memory content. The term random access refers to the ability to access any memory cell directly. Types of RAM that are of interest: • Dynamic RAM (DRAM): DRAM is a RAM device that requires periodic refreshing to retain its content. • Static RAM (SRAM): SRAM is a RAM device that retains its content as long as power is supplied by an external power source. SRAM does not require periodic refreshing and it is faster than DRAM. • Non-Volatile RAM (NVRAM): NVRAM is a special type of SRAM that has backup battery power so it can retain its content after the main system power is shut off. Embedded System Memory: RAM
  • 16. DRAM Memory Technology • Dynamic random-access memory • Capacitor charge state indicates stored value • Whether the capacitor is charged or discharged indicates storage of 1 or 0 • 1 capacitor • 1 access transistor • Capacitor leaks • Needs Recherche after each read (destructive read) 21 DRAM
  • 17. Dynamic RAM • DRAM stores the binary information in the form of electric charges on capacitors. • The capacitors are provided inside the chip by MOS transistors. • The capacitors tends to discharge with time and must be periodically recharged by refreshing the dynamic memory. • DRAM offers reduced power consumption and larger storage capacity in a single memory chip. • High capacity, low cost, low speed, low power consumption.
  • 18. SRAM Memory Technology 24 • Static random access memory • Two cross coupled inverters store a single bit • 6 Transistors in total • 4 transistors for storage (each invertor has 2 transistor) • 2 transistors for access
  • 19. Static RAM • SRAM consists essentially of internal latches that store the binary information. • The stored information remains valid as long as power is applied to the unit. • SRAM is easier to use and has shorter read and write cycles. • Low capacity, high cost, high speed, high power consumption.
  • 20. Hard Disk Drives (HDDs) Read/Write Head Side View Platters • HDD is an electromechanical data storage device that uses magnetic storage to store and retrieve digital information using one or more rigid rapidly rotating disks (platters) coated with magnetic material. • Speed is dependent on rotation speed (5400, 7200…10000)
  • 21. SSD vs HDD Reliability on storage retention SSDs typically start to lose data after about 5-10 years If kept in a dry environment at low temperature, HDDs can retain their data for a very long period. Power consumption High performance flash-based SSDs. No moving parts(eliminate seek/rotational delay) Consume more power due to motors Durability Can tolerate shock Shock can damage the hard Weight Light weight Heavier weight Speed High (250-500MB) Low (75-140 MB)
  • 22. Solid State Hard (SSD) • Like a memory stick, the SSD stores information on microchips and contains no moving parts. • Most SSD manufacturers use non-volatile NAND flash memory in the construction of their SSDs because of the lower cost compared with DRAM and the ability to retain the data without a constant power supply. • Replace rotating magnetic media with non- volatile memory (battery backed DRAM)
  • 23. Types of Memories Type Size Latency Cost/bit Register < 1KB < 1ns $$$$ On-chip SRAM 8KB-6MB < 2ns $$$ Off-chip SRAM 1Mb – 16Mb < 10ns $$ DRAM 64MB – 1TB < 100ns $ Disk (SSD, HDD) 40GB – 1PB < 20ms < $1/GB CAPACITY SPEED and COST
  • 24. Flash Memory • Invented in 1984 by a Japanese engineer (Fujio Masuoka) at TOSHIBA • Non-volatile memory technology • Very fast eraser process similar to a camera flash • Has limited number of write cycles (endurance) 34
  • 25. Floating Gate MOSFET (FGMOS) • The fundamental build block of flash memory is FGMOS
  • 26. FGMOS states • Reading logic “0” and logic “1” • Programming to “0” and “1”
  • 32. There are two types of flash memory: NOR Flash and NAND Flash
  • 33. New technology for storing data SLC: Single layer Cell QLC: Quad layer Cell TLC: Triple layer Cell
  • 35. NAND vs NOR • NOR for high reliability mobile phone and low capacity such as medical devices and instruments • NAND high memory not needing fast reading time such as camera and flash memory NAND Flash Page addressable (e.g., 512 Bytes ) Slow random reads (~30us) fast writes (~3.5ms to erase 120KB) Higher density Used for normal storage NOR Flash Reads at byte granularity Fast random reads (~120ns) slow writes (~520ms to erase 120KB) Lesser density Primarily used as code storage
  • 36. Question • Why NOR flash is an attractive technology for storing program’s binary on an embedded platform? Focus on Read speed, and write speed for reasoning. 47