• No results found

Embedded Systems

N/A
N/A
Protected

Academic year: 2022

Share "Embedded Systems"

Copied!
41
0
0

Loading.... (view fulltext now)

Full text

(1)

Embedded Systems

(AI and Embedded Systems?)

Kavi Arya

CSE Dept.

IIT-Bombay

(2)

Plan

• Embedded Systems I ntro + examples

- ERTS Lab Microcontroller workshop

• Formal Approaches to building ESW

– Modeling languages

• New language paradigms

– Esterel, Handel-C, AHIR, …

• AI and Embedded Systems

– AI finally coming of age

• Project E-Yantra

(3)

Microcontroller Workshop

Dates:

– Periodic

Introduction to the Firebird robot

– Introduction to AVR Atmega 128 microcontroller – I/O control

– Velocity control using PWM

– Interrupt programming: Closed loop posn control of robot using position encoders

– LCD interfacing

– Serial communication

Applications:

– White line following

– Adaptive Cruise Control application

(4)

• from computers to embedded and networked SoCs

• complete change in device interaction

• growing number of critical applications

Beware of the computer!

(5)

The most difficult real-time manoeuver ever

(6)

Here should be a fabulous drawing of Hergé’s

"Explorers on the Moon".

Drunk Captain Haddock has become a satellite of the Adonis asteroid. To catch him, Tintin, courageously standing on the rocket's side,

asked Pr. Calculus to start the rocket's atomic engine.

At precisely the right time, he shouts "STOP"!

This is the trickiest real-time manoeuver ever

performed by man. It required a perfect understanding of Newtonian Mechanics and absolute synchrony.

The most difficult real-time manoeuver ever

(7)

Computing

without Computers

(or, the changing nature of computers

or, where/what is hardware?)

(8)

Computing without Computers*

• Changes in how we design and deliver computing power

– Reconfigurable computing and custom computing

– i.e. turn sw into hw - everything speeds up - no computer to slow us

• Computer features

– Seq one-step-at-a-time, machines - their strength and their weakness.

– Strength because flexible, standard products

– Easy to program and deliver a wide range of applications cheaply

• Today’s computers surrounded by other chips

– graphics processing, display handling, network interfacing, sound generation, wireless comm., etc.

– Computer could in principle handle by itself - if it were fast enough.

– We are used to having computers run applications software, – Supported by a range of functions embedded in hardware.

*Prof. Ian Page, University of Oxford, 1990’s

(9)

Changes Happening

• New ways of designing/delivering computer capability

– PCs, mobile phones, etc.

• Changing structure of electronics & computing industry

– Largest manufacturer of cameras?

• Changing products that people buy as well as the way that they buy and use them

– Tape-recorder -> Walkman -> digital players -> iPod -> … – Books -> ebooks -> …

– Mainframe -> minicomps -> PCs -> servers -> cloud

• Changing how money is made out of delivering electronic products to customers

– Products changing into services

– Potentially deep and far-ranging effects of sustainability

(10)

Technological & economic drivers of change

• Nature of silicon industry

• Extraordinary consequences of Moore’s Law.

• Focus moving away from ASIC (application

specific chip) technology towards standard chip products and thus lower prototype costs

• Big winner: reconfigurable hardware - in particular FPGA chips

• Can reduce the $6M development cost of a new

chip to a few dollars and a few days

(11)

Why do Things Have to Change?

• Sheer size of modern FPGAs

– Costly to design using traditional approaches based around conventional Electronic Design Automation (EDA) techn.

• Reasons for difficulty:

– Multi-million-gate sizes available – Shortage of electronic design skills

– Need design rapidly and reliably to mkt pressures

– Need for frequent rework to update hardware in service

• Situation no worse than designing other types of chips

– But FPGAs enable substantial reductions in the time to implement a new product.

• Need for similar reduction in time to design as well

(12)

Why do Things Have to Change?

• Pressure on productivity of design engineers working on complex systems.

• Time has come to design hardware using software engineering - rather than hw engg - methodologies.

• Complexity of system is the basic problem, and

Moore’s Law doubles complexity every 18 months.

• Advances in software engineering help produce complex systems with more easily available design skills, making large profits

• We expect new designers, with/without hardware

design skills, will design hardware in future

(13)

Present Reality

• Proliferation:

– > 30 times as many computers are used in embedded systems as in general-purpose personal computers.

• Design increasingly difficult – Design options are huge

• Communication

– Interaction between devices

– Uncertainty that must be modeled into a system

• Open Source

– “Sun opens Niagara chip design to world”by Ashlee Vance in Mountain View…

published Tuesday 6th December 2005

– Sun moved to "open source" the UltraSPARC T1's design – Source of design in Verilog

– Verification suite and simulation models, instruction set

architecture specification (UltraSPARC Architecture 2005) and a Solaris OS port" for the UltraSPARC T1.

Other companies can create versions of the low-power chip to handle other software than the web and application server loads Sun has aimed at with its new servers.

• "You don't know where it's going to go,"

Said Sun's CEO Scott McNealy, during a product launch event in New York. "That's the beauty of it."

(14)

Embedded System

Diversity

(15)

Diverse Applications and Constraints

Trajectory & attitude control, imaging, transmission,...

most often mission-critical => extra high quality

Phones, audio, TV, DVD, games, ...

time-to market and quality are business critical

Flight control, power, brakes, landing gear, displays,...

most often safety-critical => certification

Pacemakers, glucosis control, robot surgeons,...

life-critical => ???

(16)

Embedded Systems

• Single functional in early days (not now!)

– e.g. pager, mobile phone

• Tightly constrained

– cost, size, performance, power, etc.

• Reactive & real-time

– e.g. car’s cruise controller

=. delay in computation => failure of system

(17)

Software Engineering…

Why we need it?

(18)

Common Design Metrics

• NRE (Non-recurring engineering) cost

• Unit cost

• Size (bytes, gates)

• Performance (execution time)

• Power (more power=> more heat & less battery time)

• Flexibility (ability to change functionality)

• Time to prototype

• Time to market

• Maintainability

• Correctness

• Safety (probability that system won’t cause harm)

(19)

Why Is Embedded Software Not Just Software On Small Computers?

• Embedded = Dedicated

• Interaction with physical processes – sensors, actuators, processes

• Critical properties are not all functional

– real-time, fault recovery, power, security, robustness

• Heterogeneity

– hardware/software tradeoffs, mixed architectures

• Concurrency

– interaction with multiple processes

• Reactivity

– operating at the speed of the environment

These features look more like hardware!These features look more like hardware!

(20)

What is Embedded SW?

• What is it

not

?

• Application software can be recompiled and executed on any number of hardware platforms so long as the basic services/libraries are provided.

– It is divided by vertical market segments (application domains)

– Well-established methodologies, architectures,…

– HW platform independent, highly portable

• Any SW that has no direct relationship with HW.

(21)

Current Technology

Extrapolation of traditional software techniques

• Programs written in conventional languages

C subsets, MISRA C for automobile Java for telephone / smartcards

• Glued together by OS services

A wide variety of embedded OS (VxWorks, OSEK)

• With some reuse and standardisation effort

Classical software models largely inadequate

•Too powerful, hard to verify

•often subsets of rich languages=>doesn’t make them simpler

(22)

Current Bottleneck

• Intrinsic application complexity grows rapidly

analog / digital interface: more objects to control

embedded algorithmics: signal, display, alarm, power...

richer hardware architecture: P, DSP, ASIP, ASIC, FPGA

• Performance adds complexity

footprint / power minimization interferes with logical design technology independence is still difficult

=> Verification bottleneck

applications hard to verify off- site

hardware / software interaction difficult

(23)

• Therac 25 : lethal irradiations

• Dharan's Patriot

• Ariane V

• Mars Explorer, Mars Polar Lander

• High-end automobile problems

• Pentium, SMP cpu networks

• Telephone and camera bugs

Bugs grow faster than Moore's law!

Enemy number 1 : the bug

(24)

Other Important Issues

• Hardware / software partitioning

hardware / software source code independence

link between programming and performance analysis

• Operating Systems / scheduling

well-studied field: rate-monotonic, earliest deadline first, etc.

newer computation models need less explicit scheduling

• Fault tolerance

software redundancy, voting algorithms, etc.

CRCs, TT networks

(25)

How to avoid or control bugs?

Traditional : better verification by fancier simulation

• Next step : better design using specific techniques

better and more reusable specifications

simpler computation models, formalisms, semantics

reduce architect / designer and customer / provider distance reduce hardware / software distance

Requires better tooling

higher- level models and synthesis

formal property verification / program equivalence certified libraries

(26)

Anatomy of Embedded Applications

• CC : continuous control, signal processing

differential equation solving, filters

specs and simulation in Matlab / Scilab, manual or automatic code

• FSM : finite state machines, state transition systems

discrete control, protocols, networking, drivers, security, etc.

flat or hierarchical state machines, manual or automatic code

• Calc : calculation intensive

navigation, security, etc.

C, manual + libraries

• Web : web-like navigation, audio / video streaming

consumer electronics, infotainment systems data-flow networks, embedded Java

(27)

Global Coordination

ABS Engine control

Light control

Supension Gearbox

Clutch

Airbags

Direction

Anticollision Alarm detection Automatic

toll

GPS

ABS

Panel Engine control

Infotainment

Light control

Supension Gearbox

Clutch

Airbags

Direction

Climate

Sleep detector Alarm detection Automatic

toll

GPS

Seat adjust

Embedded Systems in

Automobiles

(28)

Global Coordination ???

CC+FSM CC+FSM+Calc

FSM

CC CC+FSM

CC+FSM

CC+FSM

CC

CC+FSM+Calc CC+FSM

FSM

Calc+FSM CC+FSM

Web + Calc +FSM

CC+FSM

CC+FSM

FSM

(29)

Design Issues

(or, how do we build these systems?)

(30)

Functional Design & Mapping

HW1 HW2 HW3 HW4

Hardware Interface RTOS/Drivers

Thread

Architectural Design

F1 F2

F3

F4

F5

Functional Design

(F3) (F4)

(F5)

(F2)

Source:

Ian Phillips, ARM

VSIA 2001

Source:

Source:

Ian Phillips, ARM Ian Phillips, ARM

VSIA 2001

(31)

Trends

• Moore’s Law

– IC transistor capacity doubles every 18 mths – 1981: leading edge chip had 10k transistors – 2002: leading edge chip has 150M transistors

– 2010: Leading edge Intel processor has 0.5B trans in 107sq.mm – Why? reducing trans size, increasing chip size, clever circuits – Changing due to paradigm shifts: sys design tools, nanotech, ...

• Designer productivity has improved due to better tools:

– Compilation/Synthesis tools – Libraries/IP

– Test/verification tools – Standards

– Languages and frameworks (Handel-C, Lava, Esterel, …) – 1981: designer produced 100 transistors per month

– 2002 designer produces 5000 transistors per month – 2010 designer produces ???

(32)

Reconfigurable Computing Lab --

Hardware Environment

(33)

ERTS Lab Spinoff:

Project E-Yantra

Robots for College Education

(34)

Rs. 90,000

IITB Robots (initial cost)

IITB Fire Bird 2A Rs.12,000

IITB Fire Bird 2B Rs.15,000

Robots available internationally

Rs.37,80,000

Rs.28,350

(35)

*ERTS Lab Robot Development

March 2005 July 2005 January 2006

September 2006 December 2006 January 2007

*Embedded & Real-Time Systems Lab, KReSIT, IIT-Bombay

(36)

Fire Bird Educational Robot

Designed by: ERTS LAB CSE IIT BOMBAY

Features:

Incorporates 5 years experience teaching Embedded Systems at IIT-Bombay

Low-cost (Rs.15k)

Open source design

Modular & versatile

Excellent documentation

Support through

(www.nex-robotics.com)

Good for teaching/research

Extensive software support

(37)

CS308 Embedded Systems + Robotics Lab

(38)

E

- Yantra

(http://www.e-yantra.com)

• Genesis:

– From our teaching experience of Embedded Sys.

• Goal:

– Design/ deploy Robots in Engg. Colleges – Conduct Workshops as part of Continuing

Education Program for faculty/ students

– Creation of Web based Educational resources – Low-cost robots (to build and maintain)

– Student projects (open source) for others to use

(39)

Work products

Robots developed:

– Fire Bird V 8051 (for existing courses) – Fire Bird V AVR (current teaching usage)

– Fire Bird V ARM7 (Base platform for advanced/ research use)

Key documentation developed:

– Fire Bird V 8051 software manual – Fire Bird V 8051 hardware manual

– Fire Bird V ATMEGA2560 software manual – Fire Bird V ATMEGA2560 Hardware manual

Teaching material:

– Lecture slides, course notes, assignments, quizzes, etc.

– “How-to” set-up and administer a lab

– Lots of project video+code to be uploaded

Sharing:

– E-Yantra Website http://www.e-yantra.com

Demo:

– FBV-8051 with camera pod controlled by GUI over wireless link – FBV-AVR following white line (ACC)

(40)

Coming at your local engineering college…

MHRD’s E-Yantra: The Next Wave of Robotics

(41)

Conclusion

• We have simultaneous optimisations of competing design metrics: speed, size, power, complexity, etc.

• We need a “Renaissance Engineer”

– with holistic view of design process and comfortable with

technologies ranging from hardware, software to formal methods

• Maturation of system-building tools

– enables unified view of hardware/ software co-design.

• Design efforts now focus at higher levels of abstraction

=> abstract specifications refined into programs then into gates and logic.

• There is no fundamental difference of between what hardware and software can implement.

References

Related documents

Ironically, at a time when computing is almost the definition of innovation, research in both software and hardware at universities and much of industry is becoming insular,

Hennessy, “Computer Organization and Design: The hardware/software interface”, Fifth Edition.... Types of

• The data design transforms the information domain model created during analyses into data structure that will be required to implement software.. • The architecture designs define

• In the process of converting data to information, a computer uses hardware and software.. At the simplest level, all computers consist of these two basic components; the hardware

Department of Mechanical Engineering Zakir Husain College of Engg...  Quality Function Deployment (QFD) is an approach to “design of equipment” introduced in Japan in 1966 by

 Task patterns—defines a problem associated with a software engineering action or work task and relevant to successful software.

According to the objective of our work our literature review can be categorized hardware based system design, hardware design for image processing and full ref- erence quality

In the context of software development using object-oriented methodologies, in this chapter,using both class point and use case point approach the main aim is software project’s