Introduction to Embedded Systems
Outline Embedded systems overview What is embedded system Characteristics Elements of embedded system Trends in embedded system Design cycle 2
Computing Systems Most of us think of desktop computers PC Laptop Mainframe Server Maybe at most handheld computer (PDA) Embedded systems: a computing system that is part of or is embedded into another systems. 3
What is Embedded Systems? Computing system embedded within electronic devices Any device or collection of devices that contain one of more dedicated computers, microprocessors, or micro-controllers Combination of computer hardware and software designed to perform a specific function Broad definition: Any computing system that is not a desktop computer 4
Embedded System: Examples 5
Embedded System Types General purpose computing Personal digital assistant, Video games, set top boxes, wearable computers, automatic tellers Control systems Fuzzy control, PID control, Vehicle engines, chemical processes, nuclear power, flight control Signal processing Multimedia data compression Digital filtering Communication & Networking Routers, switches, firewalls, Surveillance, wireless sensor, 6
Embedded System Market Average household uses about 225 embedded processors; about 35 for the automobile itself Estimated 5 billion embedded processor in use --- 94% share of world market; Intel Pentium, Motorola PowerPC, etc. combined is only 6% [source: World Semiconductor Trade Statistics Bluebook] 7
Why study embedded systems? Key elements of our society today Many new applications every day Requires knowledge of both software and hardware Ignored in traditional computer science curriculum Isn t it only about hardware? NO!!! Experienced embedded systems designers are in high demand and short supply 8
Embedded systems characteristics: User s viewpoint Single function Dedicated to a task or tasks Tight constraints Size, power, cost, time-to-market Real time and reactive Respond to environment in real time Safety critical Failure of hw/sw can be life threatening 9
Embedded system s characteristics: Developer s viewpoint Concurrent development of hardware and software: hardware/software codesign Variety of microprocessors Variety of operating systems mostly real time (RTOS) May not even have any OS services like printf Fewer system resources than desktop system Requires specialized development tools Debugging extremely difficult Hardware and software should be extremely robust 10
Typical Design Constraints Small Size, Low Weight Handheld electronics Transportation applications weight costs money Low Power Battery power for 8+ hours (laptops often last only 2 hours) Limited cooling may limit power even if AC power available Harsh environment Heat, vibration, shock Power fluctuations, RF interference, lightning Water, corrosion, physical abuse Real-time and Safety critical operation Must function correctly and/or in-time Must not function incorrectly Extreme cost sensitivity $.05 adds up over 1,000,000 units 11
A typical embedded system Minimally Requirement for an Embedded System NMI Address Bus Microprocessor Data Bus Status Bus Other Peripheral Devices Glue Logic and Address Decode Clock Generation and Distribution To Outside World Random Access Memory - RAM I/O Interface ( D/A, A/D, Digital ) Read Only Memory - ROM ( FLASH ) Communications Watchdog Timer Real Time Clock To outside world To other devices To host Computer To User I/F 12 Source: Arnold S. Berger
Elements of an embedded system To Outside World Source: Arnold S. Berger Peripheral Bus DEBUG Port Microprocessor 4, 8, 16, 32, 4 bit bus CISC, RISC, DSP Integrated peripherals Debug/Test Port Caches Pipeline Multiprocessing Systems Software Application Code Driver Code / BIOS Real Time Operating System User Interface Communications Protocol Stacks C, C++, Assembly Language, ADA Legacy Code Key Point: Although vastly different in complexity and design, common architectural traits allow us to design and debug a wide variety of systems Non-volatile memory EPROM, FLASH, DISK Hybrid Volatile Memory DRAM, SRAM Hybrid System Clocks RTC circuitry System clocks Integrated in uc Imported/Exported Custom Devices ASIC FPGA PAL Standard Devices I/O Ports Peripheral Controllers Communication Devices Ethernet RS-232 SCSI Centronics Proprietary Microprocessor Bus Custom PCI VME PC-102 13
Trends in embedded system Higher integration Microprocessor Micro-controller System-on-Chip (SOC) Hardware/software co-design Mature design flow 14
Higher Integration (1) Microprocessor An integrated circuit which forms the central processing unit for a computer or embedded controller, but requires additional support circuitry to function Example: Pentium, AMD K6 etc. Program memory Data Storage I/O Microprocessor I/O I/O Clock To outside world Source: Arnold S. Berger 15
Higher Integration (2) Micro-controller A microprocessor plus additional peripheral support devices integrated into a single package Peripheral support devices may include: Serial ports ( COM ), Parallel Ports, Ethernet ports, A/D & D/A Interval timers, watchdog timers, event counter/timers, real time clock ( RTC ) Other local processors ( DSP, numeric coprocessor, peripheral controller ) Example: Motorola coldfire Program Memory Microprocessor Core I/O Data Storage I/O I/O Real-time Clock To outside world Source: Arnold S. Berger 16
Higher Integration (3) System-on-chip (SOC) A microprocessor plus additional peripheral support devices integrated into a single chip Example: Intel StrongARM 17 Source: Intel
Moore s Law Driving Factor Predicted by Intel co-founder Gordon Moore 65 IC transistor capacity has doubled roughly every 18 months for the past several decades Process technology can put more and more functionality on the same chip as CPU at reduced cost Source: Intel 18
Liming Factor Design productivity gap Growing design gap between what technology can offer and our ability to design in that technology Source: ITRS 99 19
Core based SOC design Intellectual Property (IP) circuits or cores are pre-designed and pre-verified functional units IP s are reusable implying lower design cost Core examples: Processors: ARM, PowerPC,.. Memory: RAM, memory controller, Peripherals: PCI, DMA controller, Multimedia: MPEG/JPEG encoder/decoder Digital Signal Processor (DSP) Telecommunication: Ethernet controller, router,.. 20
Hardware/Software Co-design In the past: Hardware and software design technologies were very different At present Recently matured synthesis technique enables a unified view of hardware and software Compilers (1960's,1970's) Assembly instructions Assemblers, linkers (1950's, 1960's) Machine instructions Microprocessor plus program bits: software Sequential program code (e.g., C, VHDL) Implementation Behavioral synthesis (1990's) Register transfers RT synthesis (1980's, 1990's) Logic equations / FSM's Logic synthesis (1970's, 1980's) Logic gates VLSI, ASIC, or PLD implementation: hardware The choice of hardware versus software for a particular function is simply a tradeoff among various design metrics, like performance, power, size, cost, and especially flexibility; there is no fundamental difference between what hardware or software can implement. 21 Source: Vahid/Givargis
Design Flow Requirements Specification Architecture Components System Integration 22
Requirements Functional Inputs and Outputs Analog/Digital/Mechanical Periodic/Non-periodic/Bits per data Button/Display Functions What does the system do? Non-functional Performance Manufacturing cost Power consumption Physical size and weight 23
Specification A precise description of the requirements Unambiguous and understandable Unified Modeling Language (UML) is a visual language that nicely captures the specification Blurs the distinction between h/w and s/w UML models the behavior of embedded system Automatic code generator could generate HDL or C++ code for the actual design implementation 24
Architecture Design How the system implements the functions described in the specification System structure in terms of components Hardware/Software partitioning Hardware and software in embedded system work together to solve a problem Partitioning decision is usually dictated by speed, flexibility, and cost 25
Architecture Design (Contd.) Technology Performance/ Cost Time until running Time to high performance Time to change code functionality Speed ASIC Very High Very Long Very Long Impossible FPGA Medium Medium Long Medium ASIP/ DSP High Long Long Long Flexibility Generic Low- Medium Very Short Not Attainable Very Short 26
Component Design & System Integration Implementing hardware and software Putting components together Verification 27
What is expected of embedded system designer? Need to understand the big picture Hardware can no longer be a black box Design software with Real time constraints Low power Small code size Willing to acquire domain specific knowledge 28
Techniques needed in Embedded Systems Low-level: Microcontrollers, FPGA/ASIC, assembly language, A/D, D/A Device Drivers High-level: Object oriented Design, C/C++, Real Time Operating Systems May use Java, Windows CE, Linux, Meta-level: Creative solutions to highly constrained problems Likely in the future: Unified Modeling Language, embedded networks 29
References Embedded Systems Design: An Introduction to Processes, Tools and Techniques, by Arnold S. Berger, CMP Books, 2001 30