You are on page 1of 82

Embedded Systems Development

Dr. Y S Rao

What are Embedded Systems


They are Embedded in They are not desktops Not mainframes or minis Automotive- engine doors mirrors engine, doors, A heating furnace controller- Thermostat A mobile phone bil h Medical device DSP based systems Avionics
2

Embedded Processors
Embedded vs. Desktop Processors Applications

Embedded Processors: Cell phones / pagers / PDAs DAQ Q Controls (Automotive, Industrial) Smart Media Desktop Processors: D kt computers Desktop t Notebook computers / Laptops

Advantages: Lower cost Optimized Instruction Set Lower Power consumption Smaller footprint Disadvantages: Sl Slower clock speeds l k d Less Processing power

Why Use Embedded Systems


U User f functionality portability ti lit User convenience, comfort - HVAC, Auto,
Appliances, GPS, TV remote, DVR, iPod

Low power and safety iron, coffee maker, LED


Lighting

Commercial/industrial applications Complex features to be simplified Replace electro-mechanical systems C t reduction Cost d ti Quality improvement
4

An Embedded System

Inputs

Microcontroller (uC)

Outputs

An Embedded Control System

Inputs I t

Microcontroller (uC)

Outputs

Feedback

Beware of the computer!

computers + SoCs = hardware / software mix complete change in device interaction ever-growing number of critical applications

Embedded Systems on Chip


Many processing units g Large embedded software

CPU

DSP

GLU

RAM

ROM

FPGA

Hardware or Software?
8

Why Computerizing Objects? y p g j


1. Simplicity and uniformity of digital information texts, images, sounds, movies, money, forces,... texts images sounds movies money forces count, store, organize, transmit, encrypt, visualize,... 2. Th f b l The fabulous i f information engine i i Moore : computers => microprocessors => SoCs progress i th sensor fi ld in the field 3. Advances in numerical methods control & information theory algorithmics numerical analysis i l l i
9

Applications and Constraints pp


flight-control, engines, brakes, fuel, power, climate safety-critical => certification trajectory, attitude, image, telecom mission-critical mission critical => very high quality

telephone, audio, TV, DVD, games business critical => time-to market + quality pacemakers, diabet control, robot surgeons life-critical => TBD (!)
10

Microcontroller Manufacturers
ARM Advanced RISC Machines Atmel Cypress- programmable blocks Freescale Semiconductor- uC, DSP Intel 8051/8052 cores Intel Microchip NEC Renasas Sharp ST Mi Microelectronics l t i Texas Instruments- uC, DSP a y others Many ot e s
11

Microcontrollers Spectrum p
$0.15 - $0.20 Far Eastern parts A 4-bit 4 pin $0.35 ST part 4 bit 4-pin $0 35 Musical gift card uC 8-bit 8K flash,1K RAM, 16-I/O 8-Bit, 256K flash, 32K RAM, 64-I/O 8 Bit, 64 I/O 32-Bit, 2M Flash, 64K RAM, TPU A high end $50 Marvell processor
GbE, USB HS

DSPs
12

Design Goal: Reliability


Mission Critical Lif Th t i Life-Threatening 24/7/365 Cant reboot!
13

Design Goal: Performance


Multitasking and Scheduling O ti i d I/O Optimized Assembly L A bl Language

Limits, Inaccuracies of Fixed Precision

14

Design Issues g
Design Methodology Time To Market Clock Speed Cl k S d Power Consumption Silicon Technology Consumer Market: Minimize Manufacturing Cost. No chance for future modification.

15

A Low End Microcontroller


Flash
256 x 12

Clock RISC Reset Watch Dog RAM


16 Bytes y

I/O (3)

Input (1)

16

Microcontroller Functionality y
Core processor - Voltages Memor Fl h RAM, EEPROM, FRAM Memory Flash, RAM EEPROM FRAM,
DDR2

Input/Output iinterface voltage t f lt Timers Interrupts Serial Communication- SPI,, I2C,, UART USB, CAN-BUS, IR, SD-Cards Analog A/D DAC, C A/D, DAC Comparator, O t Op-amp
17

A Typical Microcontroller
RAM Flash
EEPROM

Clock Reset Power Core

I/O

Timers

Comm

Analog

18

Power-On Reset Modules


Internal reset Internal and/or e ternal reset external Programmable threshold voltage Programmable duration Programmable Osc startup time Brown-out condition - programmable Hysteresis Watchdog timer
19

Battery Powered Applications y pp


Sleep mode C rrents do n to 20nA Currents down All kinds of modes available Reduced clock frequencies Core options Selective peripherals sleep mode Wake up modes clocks, ti l k timers, i t interrupts t Watchdog timer
20

Why Worry About Power ? Microprocessor Clock Rates

21

Process Technology and Supply Voltage

22

Why Worry About Power ? Portability

Battery industry does not have a Gordon Moore

23

A Typical Microcontroller
RAM Flash
EEPROM

Clock Reset Power Core

I/O

Timers

Comm

Analog

24

A High End Microcontroller


JTAG 2MB Flash 64-Ch DMA 32K Cache K NEXUS 64KB SRAM 32-Ch TPU (2)

Freescale 32-Bit MPC5554

CAN Bus (3)

DSP

MMU

A/D 40-Ch

PLL

64-Ch I/O

32-Bit External Bus

25

Microcontroller Selection Criterion


Speed of operation, complexity 8/16/32 Bits Cost HW/SW tradeoffs Power consumption - TI, Microchip, Freescale Memory Size Flash, RAM, EEPROM # of I/O Analog A/D, DAC, Comparator, Op-amp Serial Communication- SPI, I2C, USB, IR, GbE Product Family D Development t l l t tools Timers input capture, output compare Environmental conditions
26

Embedded Systems Development y p System development Electronics PCB Layout Software Mechanical Product qualification DFM design for manufacturability
27

System Development y p Architecture Complexity MIPS required Complexityi d Sub-systems interface - Master/slave Communication - Networking protocols Power budget HW/SW tradeoffs uC selection C l ti System tests regulatory agencies y g y g
28

Electronics Development p Design specs


D i f t t bilit Design for testability uC and components selection Worst case analyses Schematics CAD tools, Design rule checks Simulations Proof of concept, Prototyping Design validation Product qualification
29

Electronics Development Tools p Schematic capture- Orcad, PADS, Cadence, Mentor


Analog simulation- pSpice, LTSpice Logic S u at o Orcad, Cadence, Mentor og c Simulation- O cad, Cade ce, e to
VHDL, Verilog

Worst case analyses- simulations Proof of concept, Prototyping- PALs, FPGAs p, yp g DFMEA- UL, agencies approval Reliability predictions - MTBF
30

ASICs & Programmable Logic g g Application Specific ICs


PAL PLD, FPGA uCs with PLDs PAL, PLD FPGA Gate Arrays S Standard Cells C Custom ICs Languages- VHDL, Verilog Functional simulation Timing simulations Floor planning Back-annotation

31

PCB Layout y CAD tools- Orcad, Protel, PADS, Allegro, Mentor


Netlist # of layers Mechanical outline 3D fit considerations- diff pair, impedance matching Noise considerations diff-pair impedance-matching Thermal considerations DRC Gerber output Fabrication
32

Real -Time Software Development

Hold on there!
What is real time software?
33

Software Development p Specs


Architecture SW Design C C++, Languages C, C++ Assembly OS Simulations Tools compilers, assemblers, programmers, emulators Real time aspects - ISRs p SW/HW tradeoffs y g System integration
34

Real Time Software Development p Timers Interrupts Tasks Priorities


35

Real Time Software


External Event Timer 1 External Event Timer n

I/O

MicroController Core SW

Prioritized Interrupts

Inputs

Task 1 Task 2 Task n


36

Real Time Software Development p

Interrupts ISRs
C v/s Assembly Timers input capture and output compare Tasks and priorities RTOS Worst case analysis

37

Programming Languages Used in New E b dd d D i N Embedded Designs


90.0% 80.0% 70.0% 60.0% 50.0% 40.0% 40 0% 30.0% 20.0% 10.0% 0.0% Assembly C C++ Java Other

1998 1999 1998-1999 1999-2000

38

Use of Real-Time Kernels in New Embedded Designs.


100.0% 80 0% 80.0% 60.0% 40.0% 20.0% 0.0% 4-bit 8-bit 16-bit 32-bit 64-bit Special

39

Real Time Systems


Real time systems have to guarantee that they will respond to an external event within a specified amount of time time. Real Time systems dont have to be real fast fast. They do have to be reliably on on time.

40

Type of Real Time Systems

Based on the type of timing guarantee they provide, real time systems are classified as soft real soft time or hard real time.

41

Soft Real Time systems


Soft real time systems provide a time guarantee, but missing an event is not catastrophic. catastrophic For example image example, decoding used during satellite TV reception must be completed within a frame time. If this guarantee is missed, there will be a visible glitch Annoying glitch. but not catastrophic!
42

Hard Real Time Systems


Hard real time systems are used when missing a timing deadline will lead to catastrophic results For example a results. example, missile guidance system should not miss any events!

43

So why use soft real time systems at all?


Both soft and hard real time systems provide a real time guarantee. But if we can afford to miss a few events this events, guaranteed response time can be much shorter. shorter Soft real time systems would be used in non-critical non critical applications which need to be very fast.
44

Is real time software any different? diff ?


Interrupt handling has to be specially careful. Since interrupt handling and task scheduling is done at the operating system level, level special real time compliant operating systems should be used.

45

What are watchdog timers?


Most embedded system software is in the form of an endless loop, which waits for events and processes them when they occur. A watchdog timer helps with system recovery if there is a hang up while servicing some event event.

46

47

Software Development - Tools p

ProgrammersE l t Emulators- JTAG Simulators Assemblers Compilers Linkers Loaders CASE tools
Version control

development, in-circuit, field

48

Architecture

components dimensioning communication

Word, Excel, Visio System C

Micro-Architecture RTL design circuits DFT (test) Place&Route $ 1,000,000 Masks Chips

concurrency pipeline resource s a g esou ce sharing gates, clocks registers, RAMs critical path cells, clock trees area, speed testability scan insertion

Word, Visio

VHDL, Verilog

Verilog + ...

49

Translation of Code on Host : Compiling g

C Source File (s)

C Compiler Preprocessing Compiling C Header File (s)

C Object File (s)

Linker

C System Libraries

C Executable File

Host C H Computer

Embedded System

50

The build and load process for desktop application programs.


Object Files b l
Compiler Linker r

Executable Image File


Loader

Assembler

Read-Write Memory (RAM)

Run-Time Library:
Boot Process

Operating System Image:

51

The build and load process for embedded application programs. b dd d li ti


Object j Files
Compiler Locator Assembler Linker

ecutab e Executable Image File

ROM Image File

Read-Write Memory (RAM)

Re-Entrant Library: Real-Time Kernel:

Program Initialization
Read-Only Memory (ROM)

ROM "Burner"

52

What is ISP?
In-System Programmable (ISP) means :

The ability to reconfigure the logic and f d functionality of a ti lit f device, board or complete electronic system. system This can be done before, during and after its manufacture and shipment to the end user.

53

Case Studies

54

Mobile Phone User Interface


Touch Screen Freescale 68HC05 Power Battery Keypad Inputs MicroPhone Freescale Dragonball 68328 LCD Driver Graphics LCD Radio

Speaker

55

Postal Mail Sorting Device


Power Supply pp y Postal Mail Pieces

Optical Encoder E d

Optical Isolation I l ti

Freescale 68HCxx

Flash RAM PLD

RS232

PC Application
56

eBook
Rechargeable Battery

PCMCIA Touch Screen

PC/104 Pentium Processor

Video

Xilinx FPGA

Graphics LCD

57

Product: Hunter Programmable Digital P bl Di it l Thermostat. Microprocessor: 4-bit

58

Product:Vendo VMAX 720 vending machine. Microprocessor: 8-bit Motorola 68HC11.

59

Product: Sonicare Plus toothbrush. Microprocessor: 8 bit Zilog Z8. 8-bit Z8

60

Product: Miele P d t Mi l dishwashers. Microprocessor: 8-bit Motorola 8 bit M t l 68HC05.

61

Product: NASA's Mars Sojourner Rover. Microprocessor: 8-bit Intel 80C85.

62

Product: CoinCo USQ-712 coin g changer. Microprocessor: 8-bit Motorola 68HC912.

63

Product: Garmin StreetPilot GPS Receiver. Microprocessor: 16-bit.

64

Product: TIQIT Computer s Computers Matchbox PC. Microprocessor: 32 bit 32-bit AMD Elan SC410.

65

Product: Palm Vx handheld. Microprocessor: 32-bit Motorola Dragonball EZ.

66

Product: Motorola i1000plus iDEN MultiService Digital Phone Phone. Microprocessor: Motorola 32 bit MCORE 32-bit MCORE.

67

Product: Rio 800 MP3 Player. Microprocessor: 32-bit RISC.

68

Product: RCA RC5400P DVD player. Microprocessor: 32-bit ISC 32 bi RISC.

69

Product: IBM Researchs Linux wrist watch prototype. Microprocessor: 32-bit ARM RISC.

70

Product: Sony Aibo ERS-110 Robotic Dog. Microprocessor: 64-bit MIPS RISC.

71

72

73

Web Servers get smaller

74

iPic : Tiny Web Server Web-Server

2mm 2mm, 2mm*2mm PIC 12c508 512b ROM 24b ROM, RAM, 6bits IO 4MHz RC IO,

75

76

Embedded Systems
Classification

77

Classification

1. A t 1 Autonomous 2. R al ti 2 Real-time 3. N t k d 3 Networked 4. M bil C t i 4 Mobile Categories


78

1. 1 Autonomous Systems
Autonomous systems function in standalone mode. Many Embedded systems used for process control in manufacturing units and automobiles fall this category category. Ex: Air-conditioner, CD players

79

2. Real-time Systems Real time


R l ti Real time embedded systems are b dd d t required to carry out specific tasks in a specified amount of time. ifi d t f ti These systems are extensively used to carry out time critical tasks in process control Ex: Boiler Plant
80

3. Networked Embedded Systems


Monitor plant parameters, such as temperature, pressure, and humidity, and the data over the network to a centralized system for online monitoring. Ex: Web camera monitoring the plant floor transmits its video output to a remote controlling organization.
81

4. Mobile``````
Mobile gadgets need to store data bases locally in their memory. These gadgets imbibe powerful computing and communication p g capabilities to perform real-time tasks and handle multimedia applications. The gadgets embed powerful processor and OS, and a lot of memory with minimal power consumption. ith i i l ti
82

You might also like