Design of Embedded Systems UNIT I EMBEDDED DESIGN

  • Slides: 44
Download presentation
Design of Embedded Systems UNIT I EMBEDDED DESIGN LIFE CYCLE Product specification – Hardware

Design of Embedded Systems UNIT I EMBEDDED DESIGN LIFE CYCLE Product specification – Hardware / Software partitioning – Detailed hardware and software design – Integration – Product testing – Selection Processes – Microprocessor Vs Micro Controller – Performance tools – Bench marking – RTOS availability – Tool chain availability – Other issues in selection processes.

A “short” list of Embedded Systems Auto focus cameras n Network cards n ATMs

A “short” list of Embedded Systems Auto focus cameras n Network cards n ATMs n Pagers n Avionic systems n PDAs n Automatic transmission n Photocopiers n Battery Chargers n Portable Video games n Camcorders n Pont of Sales terminals n Cell phones n Printers n Cordless Phones n Scanners n Digital Cameras n Satellite phones n DVD players n Teleconferencing systems n Electronic Toys/Games n Televisions n Fax machines n Set-top boxes n Medical Equipment n VCR’s n Microwave ovens n Video phones n Modems and many more …. n Washers and dryers n

Embedded systems from real life Mobile Phones and Base Stations n Multiprocessor q 8

Embedded systems from real life Mobile Phones and Base Stations n Multiprocessor q 8 -bit/32 -bit for UI; DSP for signals q 32 -bit in IR port; 32 -bit in Bluetooth 8 -100 MB of memory All custom chips n Massive signal processing n n q n Several processing tasks per connected call Based on DSPs q q Standard or custom 100 s of processors

Embedded systems from real life Sewing Machine n User interface q q n ”Smart”

Embedded systems from real life Sewing Machine n User interface q q n ”Smart” q q n Embroidery patterns Touch-screen control Sets pressure of foot depending on task Raise foot when stopped New functions added by upgrading the software

Embedded systems from real life Cars n Multiple processors q q n Up to

Embedded systems from real life Cars n Multiple processors q q n Up to 100 Networked together Large diversity in processor types: q 8 -bit – door locks, lights, etc. q 16 -bit – most functions q 32 -bit – engine control, airbags n Multiple networks q n Body, engine, telematics, media, safety Functions by embedded processing: q ABS: Anti-lock braking systems q ESP: Electronic stability control q Airbags q Efficient automatic gearboxes q Theft prevention with smart keys q Blind-angle alert systems

Embedded systems from real life Smart Beer Glass Capacitive sensor fluid level 8 -bit,

Embedded systems from real life Smart Beer Glass Capacitive sensor fluid level 8 -bit, 8 -pin PIC processor Contact less transmission of power and readings Inductive coil for RF ID activation & power CPU and reading coil in the table. Reports the level of fluid in the glass, alerts servers when close to empty

Embedded systems from real life Extremely Large n Functions requiring computers: q q q

Embedded systems from real life Extremely Large n Functions requiring computers: q q q n Radar Weapons Damage control Navigation basically everything Computers: q q Large servers 1000 s of processors

Embedded systems from real life Inside Your PC n Custom processors q n 32

Embedded systems from real life Inside Your PC n Custom processors q n 32 -bit processors q q n Graphics, sound IR, Bluetooth Network, WLAN Harddisk RAID controllers 8 -bit processors q q USB Keyboard, mouse

Characteristics of Embedded Systems (1) § Must be dependable, • Reliability R(t) = probability

Characteristics of Embedded Systems (1) § Must be dependable, • Reliability R(t) = probability of system working correctly provided that is was working at t=0 • Maintainability M(d) = probability of system working correctly d time units after error occurred. • Availability A(t): probability of system working at time t • Safety: no harm to be caused • Security: confidential and authentic communication Even perfectly designed systems can fail if the assumptions about the workload and possible errors turn out to be wrong. Making the system dependable must not be an after-thought, it must be considered from the very beginning

Characteristics of Embedded Systems (2) § Must be efficient q q q § §

Characteristics of Embedded Systems (2) § Must be efficient q q q § § § Energy efficient Code-size efficient (especially for systems on a chip) Run-time efficient Weight efficient Cost efficient Dedicated towards a certain application Knowledge about behavior at design time can be used to minimize resources and to maximize robustness Dedicated user interface (no mouse, keyboard and screen) Hybrid systems (analog + digital parts).

Characteristics of Embedded § Many ES must Systems (3) meet real-time constraints q q

Characteristics of Embedded § Many ES must Systems (3) meet real-time constraints q q q § A real-time system must react to stimuli from the controlled object (or the operator) within the time interval dictated by the environment. For real-time systems, right answers arriving too late are wrong. „A real-time constraint is called hard, if not meeting that constraint could result in a catastrophe“ [Kopetz, 1997]. All other time-constraints are called soft. A guaranteed system response has to be explained without statistical arguments Frequently connected to physical environment through sensors and actuators,

Characteristics of Embedded Systems (4) § Typically, ES are reactive systems: „A reactive system

Characteristics of Embedded Systems (4) § Typically, ES are reactive systems: „A reactive system is one which is in continual interaction with is environment and executes at a pace determined by that environment“ [Bergé, 1995] Behavior depends on input and current state. automata model appropriate, model of computable functions inappropriate. n. Not every ES has all of the above characteristics. n. Def. : Information processing systems having most of the above characteristics are called embedded systems.

Why Embedded Systems Are Different? n n Embedded systems are dedicated to specific tasks,

Why Embedded Systems Are Different? n n Embedded systems are dedicated to specific tasks, whereas PCs are generic computing platforms. Embedded systems are supported by a wide array of processors and processor architectures. Embedded systems are usually cost sensitive. Embedded systems have real-time constraints.

Why Embedded Systems Are Different? n n If an embedded system is using an

Why Embedded Systems Are Different? n n If an embedded system is using an operating system at all, it is most likely using a real-time operating system (RTOS), rather than Windows 9 X, Windows NT, Windows 2000, Unix, Solaris, or HP- UX. The implications of software failure are much more severe in embedded systems than in desktop systems. Embedded systems often have power constraints. Embedded systems often must operate under extreme environmental conditions.

Why Embedded Systems Are Different? Embedded systems have far fewer system resources than desktop

Why Embedded Systems Are Different? Embedded systems have far fewer system resources than desktop systems. n Embedded systems often store all their object code in ROM. n Embedded systems require specialized tools and methods to be efficiently designed. n Embedded microprocessors often have dedicated debugging circuitry. n

An embedded system example -a digital camera Digital camera chip CCD A 2 D

An embedded system example -a digital camera Digital camera chip CCD A 2 D CCD preprocessor Pixel coprocessor D 2 A lens JPEG codec Microcontroller Multiplier/Accum DMA controller Memory controller n n n Display ctrl ISA bus interface UART LCD ctrl Single-functioned -- always a digital camera Tightly-constrained -- Low cost, low power, small, fast Reactive and real-time -- only to a small extent

Embedded System – A simplified view CPU embedded computer output analog input analog mem

Embedded System – A simplified view CPU embedded computer output analog input analog mem

Computer (programmable part) is surrounded by other sub-systems, sensors and actuators. The computer is

Computer (programmable part) is surrounded by other sub-systems, sensors and actuators. The computer is called the micro-controller. Its main functions are to monitor the physical parameters of the surrounding systems and to control these processes whenever needed. In some cases the CPU is a DSP.

Typical Embedded System Source : Embedded System Design Issues, Philip J. Koopman, ICCD 96

Typical Embedded System Source : Embedded System Design Issues, Philip J. Koopman, ICCD 96

Source : Embedded Systems Design, Arnold S. Berger HW / SW Design HW &

Source : Embedded Systems Design, Arnold S. Berger HW / SW Design HW & SW Development / Debug Hardware Design 51% Software Design Phase 7 : Maintenance and Upgrade 37% Cost to fix bugs Phase 6 : Acceptance testing and Design Phase 4 : Detailed Phase 5 : HW / SW Integration System Specification Phase 3 : Iteration Phase 2 : HW / SW Partitioning Phase 1 : Product Specification The Embedded Design Life Cycle System Test 12% Product Release

Tool-based view of the development cycle

Tool-based view of the development cycle

Product Specification n n A common factor for the successful products was that the

Product Specification n n A common factor for the successful products was that the design team (senior management, marketing, sales, quality assurance, and Engineering) shared a common vision of the product they were designing In-circuit emulators

Hardware/Software Partitioning n n Partitioning decision- to decide which portion of the problem will

Hardware/Software Partitioning n n Partitioning decision- to decide which portion of the problem will be solved in hardware and which in software It is possible to implement that algorithm purely in software (the CPU without the FPU example), purely in hardware (the dedicated modem chip example), or in some combination of the two (the video card example).

Laser Printer Design Algorithm Data enters the printer and must be transformed into a

Laser Printer Design Algorithm Data enters the printer and must be transformed into a legible ensemble of carbon dots fused to a piece of paper Concurrently, the processor services the data port and converts the incoming data stream into a stream of modulation and control signals to a laser tube, rotating mirror, rotating drum, and assorted paper-management “stuff. ”

Iteration and Implementation n This phase represents the early design work before the hardware

Iteration and Implementation n This phase represents the early design work before the hardware and software teams build “the wall” between them The hardware designers might be using simulation tools, such as architectural simulators, to model the performance of the processor and memory systems. The software designers are probably running code benchmarks on self-contained, single-board computers that use the target micro processor.

Hardware/Software Integration n Big Endian/Little Endian Problem

Hardware/Software Integration n Big Endian/Little Endian Problem

Debugging an embedded or real-time system n n n Run control — The ability

Debugging an embedded or real-time system n n n Run control — The ability to start, stop, peak, and poke the processor and memory. Memory substitution — Replacing ROMbased memory with RAM for rapid and easy code download, debug, and repair cycles. Real-time analysis — Following code flow in real time with real-time trace analysis.

Product Testing and Release n Testing is more than making sure the software doesn’t

Product Testing and Release n Testing is more than making sure the software doesn’t crash at a critical moment

Maintaining and Upgrading Existing Products n The majority of embedded system designers (around 60

Maintaining and Upgrading Existing Products n The majority of embedded system designers (around 60 percent) maintain and upgrade existing products, rather than design new products.

The Selection Process

The Selection Process

The Selection Process n n Is it available in a suitable implementation? Is it

The Selection Process n n Is it available in a suitable implementation? Is it capable of sufficient performance? Is it supported by a suitable operating system? Is it supported by appropriate and adequate tools?

Packaging the Silicon Microprocessor versus Microcontroller n Most embedded systems use microcontrollers instead of

Packaging the Silicon Microprocessor versus Microcontroller n Most embedded systems use microcontrollers instead of microprocessors

Microprocessor versus Microcontroller n In a microprocessor-based system, the CPU and the various I/O

Microprocessor versus Microcontroller n In a microprocessor-based system, the CPU and the various I/O functions are packaged as separate ICs n In a microcontroller-based system many, if not all, of the I/O functions are integrated into the same package with the CPU n The advantages of the microcontroller’s higher level of integration are easy to see: q Lower cost — One part replaces many parts. q More reliable — Fewer packages, fewer interconnects. q Better performance — System components are optimized for their environment. q Faster — Signals can stay on the chip. q Lower RF signature — Fast signals don’t radiate from a large PC board

Adequate Performance-Measuring Tools n The Dhrystone benchmark is a simple C program that compiles

Adequate Performance-Measuring Tools n The Dhrystone benchmark is a simple C program that compiles to about 2, 000 lines of assembly code and is independent of operating system services

Meaningful Benchmarking n n n Real benchmarking involves carefully balancing system requirements and variables

Meaningful Benchmarking n n n Real benchmarking involves carefully balancing system requirements and variables it’s important to analyze the real-time behavior of the processor Real-time performance can be generally categorized into two buckets: interrupt handling and task switching.

n EEMBC The EEMBC benchmark consists of industry-specific tests

n EEMBC The EEMBC benchmark consists of industry-specific tests

EEMBC n n EEMBC technical committee represent realworld algorithms against which the processor can

EEMBC n n EEMBC technical committee represent realworld algorithms against which the processor can be measured produces statistics on the number of times per second the algorithm executes and the size of the compiled code

RTOS Availability

RTOS Availability

RTOS Availability

RTOS Availability

Tool Chain Availability n When evaluating the tool chain, integrated coverage of these three

Tool Chain Availability n When evaluating the tool chain, integrated coverage of these three broad categories: q q q Compiler tools Hardware and software debugging tools Performance measuring tools

Compilers n n n n n In-line assembly Interrupt function Assembly language list file

Compilers n n n n n In-line assembly Interrupt function Assembly language list file generation Standard libraries Startup code RTOS support Tools integration Optimizations Support for Embedded C++ (EC++)

Hardware and Software Debugging Tools n n n An ICE An interface to on-chip

Hardware and Software Debugging Tools n n n An ICE An interface to on-chip hardware debugging resources A ROM emulator A logic analyzer A performance analyzer

Other Issues in the Selection Process n n n A prior commitment to a

Other Issues in the Selection Process n n n A prior commitment to a processor family A prior restriction on language Time-to-market factors

Summary n n n n n Definition of Embedded Systems Real Life Examples ES

Summary n n n n n Definition of Embedded Systems Real Life Examples ES Product Life Cycle in Design Hardware / Software partitioning Product testing Selection Processes – Microprocessor Vs Micro Controller Performance tools – Bench marking RTOS Micro Controller Other issues in selection processes.