Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf ·...
Transcript of Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf ·...
![Page 1: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/1.jpg)
Lecture 02 Introduction to Embedded Systems
Jin-Tai Yan
Department of Computer Science & Information Engineering
2016/09/26
![Page 2: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/2.jpg)
What is an Embedded System ?
• An embedded system is a computer system embedded in a device with a dedicated function
• Wikipedia -- Embedded System is a special-purpose computer system designed to perform one or a few dedicated functions
it does not provide programmability to users
2
� it does not provide programmability to users
![Page 3: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/3.jpg)
Preview of Embedded Systems
• Embedded systems cover a wide range of electronics gadgets
� iPhone, Android phone, MP3 player.
� Refrigerator, Washer, TV..
� Embedded systems are virtually everywhere in your life
3
![Page 4: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/4.jpg)
Characteristics in Embedded Systems
• Since embedded system is dedicated to specific tasks, design engineers try to optimize hardware/software components of the systems� Reduce power and cost
� Increase reliability and performance
• Even though embedded systems cover a wide range of special-purpose systems, there are common special-purpose systems, there are common characteristics� Low cost - Cheap to be competitive
• Memory is very small compared to a general-purpose computer system
• Lightweight processors are used in embedded systems
� Low power - In case of portable devices• Low-power processors are used in embedded systems
4
![Page 5: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/5.jpg)
Characteristics in Embedded Systems(Cont)
� High performance - Meet the computing requirements of applications
• Users want to watch video on portable devices
• Gaming gadgets like playstation should provide high performance
� Real-time property - Job should be done within a time limit
• Aerospace applications, Car control systems, Medical gadgets are critical in terms of time constraint – Otherwise, it could lead to critical in terms of time constraint – Otherwise, it could lead to catastrophe such as loss of life
• It is challenging to satisfy the characteristics
� You may not be able to achieve high performance while maintaining low power consumption and making use of cheap components
� you got to do your best in a given circumstance to be competitive in the market
5
![Page 6: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/6.jpg)
Development in Embedded Systems
• Watches
• Refrigerators
• Picture Frames
• Desks
6
![Page 7: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/7.jpg)
Evolution of Watches
![Page 8: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/8.jpg)
Evolution of Refrigerators
![Page 9: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/9.jpg)
Evolution of Picture Frames
![Page 10: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/10.jpg)
Evolution of Desks
![Page 11: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/11.jpg)
Applications in Embedded Systems
• Phone and Tablets
• Robotics
• Automotives
• Military
• Networking Devices
11
• Networking Devices
• Medical Devices
• Implantable Medical Devices
• Other Gadgets
![Page 12: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/12.jpg)
Phones and Tablets
12
• Communication
� Wifi
� GSM/3G/LTE
� Bluetooth/NFC
• Graphics and Video Processing
• OS
• Android / Windows / iOS
![Page 13: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/13.jpg)
Robotics
13
![Page 14: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/14.jpg)
Automotives
14
![Page 15: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/15.jpg)
Example: Mercedes S-Class
![Page 16: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/16.jpg)
Automotive Electronics Platform
![Page 17: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/17.jpg)
Electronics Devices in Automotives
17
![Page 18: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/18.jpg)
Powertrain Device in Automotive
18
![Page 19: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/19.jpg)
Cars Are Getting Smarter
• Electronics represents 40% of total cost of a car
• 90% of new car features require software
19
![Page 20: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/20.jpg)
Military
20
![Page 21: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/21.jpg)
Networking Devices
21
![Page 22: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/22.jpg)
Medical Devices
22
![Page 23: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/23.jpg)
Implantable Medical Devices
23
![Page 24: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/24.jpg)
Other Gadgets
24
![Page 25: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/25.jpg)
Why is it different from Desktop Development ?
• Embedded Systems normally come with constraints in hardware resources
� Processing
� Memory
� Storage
� Power
� Display
25
� Display
� Input/Output devices
• Embedded system applications often comes with real time system constraints
� Latency
� Throughput
• System has a strong association between the HW and SW
![Page 26: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/26.jpg)
Cross-Platform Development
• Development Environment is different from target environment
• Need for cross platform development and debugging tools
26
![Page 27: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/27.jpg)
Embedded Systems Classification
• Two main families of embedded system platforms:
� Microcontroller Family
� Microprocessor Family
27
![Page 28: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/28.jpg)
Embedded Systems: Microcontrollers
• Examples: PIC (MicroChip), AVR (Atmel), …
• Used for example in Arduino Boards
• Originally 8/16 bit but recently there are 32 bit chips
• Simple instruction set
• No or simple OS Support
• Limited performance (clock speed up to 10s MHz)
28
• Limited performance (clock speed up to 10s MHz)
• Programming in assembly, or C
• Useful in small systems with lower Cost
• Typical usage:
� Interfacing to sensors
� Control of motors in simple robotics systems
� Simple home automation
![Page 29: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/29.jpg)
Embedded Systems: Microprocessors
• Examples: ARM, Intel ATOM, MIPS
• Used for example in Raspberry Pi, BeagleBone Black, …
• 32 bit (and sometimes 64 bits)
• Support Linux and other RTOSs
• Higher performance (clock speed in 100s MHz to few GHz)
• Programming in C/C++ (sometimes with little assembly), Java, Python
• Strong library support (act as a small computer)
29
• Strong library support (act as a small computer)
• Useful in more complicated systems but with higher cost
• Typical Usage:
� Sophisticated control systems
� Audio Processing
� Image Processing
� Video Processing
� Communication Systems
� Advanced guidance and navigation systems
![Page 30: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/30.jpg)
HW/SW Stack in Embedded Systems
• Identical to the general-computer systems
Application Software
30
OS / Device Drivers
Hardware
![Page 31: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/31.jpg)
Components in Embedded Systems(1)
• Hardware � It is mainly composed of processor (1 or more), memory,
I/O devices including network devices, timers, sensors etc.
31
![Page 32: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/32.jpg)
Example: Digital Camera
�Digital Camera Block Diagram
![Page 33: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/33.jpg)
Example: Digital Camera
�Memory �Controllers
�Processor
�Interface
�Software�(Application Programs)
�Analog �Digital �Analog
�Coprocessors
�Converters
�Processor
�ASIC
![Page 34: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/34.jpg)
Components in Embedded Systems(2)
• Operating Systems(OS)� Multitasking (multithreaded) OS is required, as
embedded applications become complicated • Networking, GUI, Audio, Video
• CPU is context-switched to process multiple jobs
� Operating system footprint should be small enough to fit into memory of an embedded systeminto memory of an embedded system
• Real-time operating systems (RTOS) such as VxWorks and uC/OS-II have been used because they are light-weighted in terms of memory requirement
• Heavy-weighted OSs such as iOS, Android, Windows Mobile, and embedded Linux (uClinux) are used, as embedded processors support computing power and advanced capabilities such as MMU (Memory Management Unit)
• Device drivers for I/O devices
34
![Page 35: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/35.jpg)
Real-Time Systems
• Real-Time Operating System (RTOS)� Multitasking operating system intended for real-time
applications
� RTOS facilitates the creation of real-time systems
� RTOS does not necessarily have a high throughput
� RTOS is valued more for how quickly and/or predictably it can respond to a particular event
• Hard real-time systems are required to complete a
Hard real-time systems
• Hard real-time systems are required to complete a critical task within a guaranteed amount of time
• Soft real-time systems are less restrictive
� Implementing real-time system requires a careful design of scheduler
• System must have the priority-based scheduling
• Real-time processes must have the highest priority
• Process dispatch latency must be small
35
![Page 36: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/36.jpg)
OSs in Embedded Systems
• RTOSs
� pSOS
� VxWorks
� VRTX (Versatile Real-Time Executive)
� uC/OS-II
• Palm OS & Symbian OS
� Palm OS: Embedded operating system initially developed by U.S. � Palm OS: Embedded operating system initially developed by U.S. Robotics-owned Palm Computing, Inc. for personal digital assistants (PDAs) in 1996
� Symbian OS: Proprietary operating system designed for mobile devices by Symbian Ltd. A descendant of Psion's EPOC and runs exclusively on ARM processors
• Android (http://www.android.com/)
� Open Handset Alliance Project
� Based on modified version of Linux 2.6 kernel
� Currently supporting ARM, MIPS, Power Architecture and x86
36
![Page 37: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/37.jpg)
uClinux
• A port of Linux to systems without a Memory Management Unit (MMU)
� http://www.uclinux.org/
• uClinux has been ported to many microcontrollers� ARM7TDMI (ARM)� ARM7TDMI (ARM)
� Dragonball, ColdFire, 68K Derivatives, QUICC (Motorola)
� Blackfin (ADI)
� i960 (Intel)
� Microblaze (Xilinx)
� V850E (NEC)
37
![Page 38: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/38.jpg)
Operating Systems in Embedded Systems
• uClinux (source: Wikipedia) - as of 2009
� The use of a Linux operating system in embedded computer systems
� According to survey conducted by Venture Development Corporation, Linux was used by 18% of embedded engineers
� Embedded versions of Linux are designed for devices with relatively limited resources, such as cell phones and set-top boxes
� Due to concerns such as cost and size, embedded devices usually have much less RAM and secondary storage than desktop computers, and are much less RAM and secondary storage than desktop computers, and are likely to use flash memory instead of a hard drive
� Since embedded devices are used for specific purposes rather than general purposes, developers optimize their embedded Linux distributions to target specific hardware configurations and usage situations
• These optimizations can include reducing the number of device drivers and software applications, and modifying the Linux kernel to be a real-time operating system
� Instead of a full suite of desktop software applications, embedded Linux systems often use a small set of free software utilities such as busybox, and replace the glibc C standard library with a more compact alternative such as dietlibc, uClibc, or Newlib.
38
![Page 39: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/39.jpg)
Components in Embedded Systems (3)
• Application Software
� Run on top of operating system
� Execute tasks that users wish to perform
• Web surfing, Audio, Video playback
39
![Page 40: Lecture 02 Introduction to Embedded Systems140.126.122.189/upload/1052/E02806A2017141354161.pdf · Multitasking operating system intended for real-time applications RTOS facilitates](https://reader034.fdocuments.us/reader034/viewer/2022042202/5ea341df9e74bd4ed06fca70/html5/thumbnails/40.jpg)
Design Flow in Embedded System
Planning & Architect
(modeling & simulation)
Hardware Design with CAD tools
ASIC/SoC design
ASIC/SoC chip
40
simulation) with CAD tools
System prototype board
Hardware debugging & Software development Final product
� ASIC: Application-Specific Integrated Circuit
� SoC: System-on-Chip