SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
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
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

Weitere ähnliche Inhalte

Ähnlich wie 5_Embedded Systems مختصر.pdf

Ähnlich wie 5_Embedded Systems مختصر.pdf (20)

PILOT Session for Embedded Systems
PILOT Session for Embedded Systems PILOT Session for Embedded Systems
PILOT Session for Embedded Systems
 
Embedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_MicrocontrollersEmbedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_Microcontrollers
 
Processors selection
Processors selectionProcessors selection
Processors selection
 
12429908.ppt
12429908.ppt12429908.ppt
12429908.ppt
 
Unit-I_ES.pdf
Unit-I_ES.pdfUnit-I_ES.pdf
Unit-I_ES.pdf
 
BAIT1003 Chapter 2
BAIT1003 Chapter 2BAIT1003 Chapter 2
BAIT1003 Chapter 2
 
lb.pptx
lb.pptxlb.pptx
lb.pptx
 
PPT MES class.pptx
PPT MES class.pptxPPT MES class.pptx
PPT MES class.pptx
 
MES PPT.pptx
MES PPT.pptxMES PPT.pptx
MES PPT.pptx
 
Network Processor - 2021.pptx
Network Processor - 2021.pptxNetwork Processor - 2021.pptx
Network Processor - 2021.pptx
 
introduction to embedded systems part 2
introduction to embedded systems part 2introduction to embedded systems part 2
introduction to embedded systems part 2
 
Microcontroller
Microcontroller Microcontroller
Microcontroller
 
Coa presentation3
Coa presentation3Coa presentation3
Coa presentation3
 
esunit1.pptx
esunit1.pptxesunit1.pptx
esunit1.pptx
 
Computer Basics
Computer BasicsComputer Basics
Computer Basics
 
Arm processor
Arm processorArm processor
Arm processor
 
M&amp;i(lec#01)
M&amp;i(lec#01)M&amp;i(lec#01)
M&amp;i(lec#01)
 
18CS44-MODULE1-PPT.pdf
18CS44-MODULE1-PPT.pdf18CS44-MODULE1-PPT.pdf
18CS44-MODULE1-PPT.pdf
 
I. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptI. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.ppt
 
Book on nptel microcontroller
Book on nptel microcontrollerBook on nptel microcontroller
Book on nptel microcontroller
 

Kürzlich hochgeladen

Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...motiram463
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Call Girls in Nagpur High Profile
 
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)kojalkojal131
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...Pooja Nehwal
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证tufbav
 
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...tanu pandey
 
SM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfSM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfStefanoBiamonte1
 
Introduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxIntroduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxJaiLegal
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointGetawu
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...amitlee9823
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...Amil baba
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证tufbav
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...Call Girls in Nagpur High Profile
 
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...amitlee9823
 

Kürzlich hochgeladen (20)

CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
 
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
 
SM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfSM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
 
Introduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxIntroduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptx
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power point
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
 
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
 

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
  • 34.
  • 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