Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Lecture 02 Introduction to Embedded Systems
Jin-Tai Yan
Department of Computer Science & Information Engineering
2016/09/26
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
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
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
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
Development in Embedded Systems
• Watches
• Refrigerators
• Picture Frames
• Desks
6
Evolution of Watches
Evolution of Refrigerators
Evolution of Picture Frames
Evolution of Desks
Applications in Embedded Systems
• Phone and Tablets
• Robotics
• Automotives
• Military
• Networking Devices
11
• Networking Devices
• Medical Devices
• Implantable Medical Devices
• Other Gadgets
Phones and Tablets
12
• Communication
� Wifi
� GSM/3G/LTE
� Bluetooth/NFC
• Graphics and Video Processing
• OS
• Android / Windows / iOS
Robotics
13
Automotives
14
Example: Mercedes S-Class
Automotive Electronics Platform
Electronics Devices in Automotives
17
Powertrain Device in Automotive
18
Cars Are Getting Smarter
• Electronics represents 40% of total cost of a car
• 90% of new car features require software
19
Military
20
Networking Devices
21
Medical Devices
22
Implantable Medical Devices
23
Other Gadgets
24
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
Cross-Platform Development
• Development Environment is different from target environment
• Need for cross platform development and debugging tools
26
Embedded Systems Classification
• Two main families of embedded system platforms:
� Microcontroller Family
� Microprocessor Family
27
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
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
HW/SW Stack in Embedded Systems
• Identical to the general-computer systems
Application Software
30
OS / Device Drivers
Hardware
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
Example: Digital Camera
�Digital Camera Block Diagram
Example: Digital Camera
�Memory �Controllers
�Processor
�Interface
�Software�(Application Programs)
�Analog �Digital �Analog
�Coprocessors
�Converters
�Processor
�ASIC
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
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
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
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
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
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
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