embedded systems dinesh sharma microelectronics group, ee department. iit bombay mumbai 400 076

36
Embedded Systems Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Post on 20-Dec-2015

266 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Embedded SystemsEmbedded Systems

Dinesh Sharma

Microelectronics group, EE department.

IIT Bombay

Mumbai 400 076

Page 2: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

What are embedded systems? Differences from other micro-controller

systems How are embedded systems designed?

(Hardware and Software) Critical Design challenges Tools of the trade Future directions

Page 3: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

What are embedded Systems?

An embedded system is closely integrated with the main system

It may not interact directly with the environment

For example – A micro-computer in a car ignition control

Page 4: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Examples of Embedded Systems

MP3 music players Mobile phone units Domestic appliances Data switches Automotive controls Embedded memories to keep configuration

information

Page 5: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

A typical Embedded System A typical embedded system would have:

– A micro-controller to provide the “intelligence”

– Interfacing circuits to connect with the main application

– Real time software– Dedicated hardware for functions whose

implementation in software might be too slow– Test and maintenance hardware

Page 6: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

So is So is “embedded systems” “embedded systems” just another name for just another name for

micro-controller systems?micro-controller systems?

Not at all!

Page 7: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

How are embedded micro-controller systems different?

An embedded micro-controller runs a single program which never terminates!

There is no (separate) operating system or monitor program – the operating system has to be merged with the application program.

Most embedded micro-controllers have to respond in real time.

In practice, all embedded systems are resource constrained. For example, an 8052 based system has only 256 bytes of RAM.

Page 8: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Design of Embedded Systems

Task partitioning between hardware and software

Hardware design and integration Software development System integration Test strategies

Page 9: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Partitioning

Many tasks can be performed in hardware or in software – for example: timing.

The choice between hardware and software is driven by considerations of speed, cost, need for flexibility in modification of underlying algorithms.

Hardware adds a “per unit cost” – where as software adds a “fixed cost”.

Typically, only those functions are implemented in hardware whose speed specifications cannot be met by software solution.

Page 10: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Hardware Design Since a micro-controller in an embedded system

will run just one program all the time, hardware resources must be matched to the needs of this particular application.

Modern technology has made it possible to put the entire electronics – inclusive of sensors, analog circuits, digital circuits etc. on a single chip. (System On a Chip or SoC).

The degree of integration used will depend on cost, need for small size, availability of components etc.

Page 11: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Hardware design challanges

Compatibility of system components with each other

Interface design (linear to digital, asynchronous to synchronous etc.)

Low power design Modularity and ability to upgrade the system in

the field. Designing for easy testability is difficult. Time to market

Page 12: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Low Power DesignEspecially important in 3 cases

Battery operated and mobile systems – e.g. a portable MP3 music player

Systems with a limited power source – such as a smart public call booth which derives power from phone lines.

High complexity and speed systems – where heat dissipation is a problem

Page 13: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Low Power Design Techniques

Power smart blocks which go to a low power or off mode when not in use.

Reduced voltage swing on loaded buses Coding schemes which minimise the

number of transitions on signal lines

Page 14: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

MechatronicsMechanics controlled by Electronic Systems.

Mechanical System

Sensors Transducers

Actuators

Electrical System

User Interface

Page 15: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

An embedded system may contain :

Data Conversion Devices A D D A

Control Elements MicroControllers

Driver Circuits Motor drivers, etc.

User Interface Key Boards, Display

Transfer of control functions to electronics can result in significant reduction in cost, size, weight and response time.

Page 16: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

An example system using MEMS

Page 17: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Sensing Position and Velocity

Potentiometric measurements for position

Linear Variable Differential Transformer

Page 18: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Distance Measurement

Slotted disk acts as light interrupter

There are two channels which are in phase quadrature

Edges are counted to give the position

Alternate edges imply travel in the same dir.

Two edges in the same channel imply reversal of direction.

Page 19: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Accelerometers: Principle of operation

Page 20: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Measurement of Displacement

Dual Capacitance differential method

Page 21: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Putting it all together

Hardware/Software partitioning Hardware Development Software Development Interfacing Electrical and Mechanical parts Test strategies

Page 22: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Software Design

Software must provide the algorithms etc. needed for implementing the applications.

These algorithms often have an impact on the choice of hardware as well. For example, whether a DSP processor should be used or not.

Most embedded system software needs to be real time software.

Watchdog timers may be needed.

Page 23: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Real Time Systems

Real time systems have to guarantee that they will respond to an external event within a specified amount of time.

Real Time systems don’t have to be “real fast”. They do have to be reliably “on time”.

Page 24: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Types of Real Time Systems

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

Page 25: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Soft Real Time systems

Soft real time systems provide a time guarantee, but missing an event is not catastrophic. For example, image 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 – but not catastrophic!

Page 26: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Hard Real Time Systems

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

Page 27: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

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 guaranteed response time can be much shorter.

Soft real time systems would be used in non-critical applications, which require high speed.

Page 28: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Design strategies forsoft and hard real time systems

The time guarantee provided by soft real time systems is statistical in nature – whereas that provided by hard real time systems is absolute.

Design of soft real time systems optimises average case response – whereas hard real time systems must be designed for worst case situations.

Page 29: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Is real time software any different?

Interrupt handling has to be specially careful.

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

Page 30: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

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.

Page 31: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076
Page 32: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Tools of the trade ….

Open source systems like real time Linux are becoming extremely popular.

Real time Linux provides the luxury of development on an advanced system and then migration to the target hardware.

Because there is no royalty to be paid, a large number of developers are now choosing open source systems. Example: Simputer – the palm computer designed in India. Even the Sony play station runs Linux.

Page 33: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Future Directions

Many more embedded systems will be full systems on a single chip.

Already, there are development efforts for appliances like a disposable blood tester with on chip chemical and bio-sensors and processing electronics. (A water safety tester is being developed at IIT Bombay).

Page 34: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Tools of the Trade ……

Excellent public domain tools are available for software development / debugging and emulation. For example, SDCC is a powerful C compiler / assembler/ debugger which supports a large variety of processors (Z80, 8051, ARM, AVR, PIC … etc.)

Hardwarde description languages ease the job of designing with IP cores.

Page 35: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Future directions ….

Embedded systems will be developed in unusual applications. For example: stress detectors built into walls, powered and accessed by RF beams.

Existing applications will become far more sophisticated with standardised user interfaces – such as web interfaces with XML.

Page 36: Embedded Systems Dinesh Sharma Microelectronics group, EE department. IIT Bombay Mumbai 400 076

Future directions for developers

More and more multi-disciplinary expertise will be required. For example – biology-chemistry-electronics and VLSI for bio-sensors

Fields of micro-processors, VLSI, communications and information technology will merge for developing embedded systems