63
CSE 237A Introduction to Embedded Systems Tajana Simunic Rosing Department of Computer Science and Engineering UCSD

Introduction to Embedded Systemscseweb.ucsd.edu/classes/wi08/cse237a/handouts/L1-introduction.pdf · Introduction to Embedded Systems ... survey an area and submit a report via email

  • Upload
    vomien

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

CSE 237A

Introduction to Embedded Systems

Tajana Simunic RosingDepartment of Computer Science and EngineeringUCSD

Welcome to CSE 237A!Instructor:

Tajana Simunic RosingEmail: tajana-at-ucsd.edu; put CSE237a in subject linePh. 858 534-4868

Office Hours: Tu 2-3pm, Th 5:30pm-6:30pm CSE 2118

Admin:Sheila Manalo

Email: [email protected]: (858) 534-8873 Office: CSE 2272

Class meets: Tu/Th: 3:30-4:50pm at 260 Galbraith hall

Class Website:http://www.cse.ucsd.edu/classes/wi08/cse237a/

Grades, announcements and discussion board:http://webct.ucsd.edu

About This CoursePart of a three course group

CSE 237A: Introduction to Embedded SystemsCSE 237B: Software for Embedded Systems (W’06)CSE 237C: Validation and Prototyping of ES (S’06)

Related courseECE 284: Wireless Embedded and Networked Systems – mainly sensor nets

Depth sequence: Embedded Systems and Software

Course Objectives

Develop an understanding of the technologies behind the embedded computing systems

technology capabilities and limitations of the hardware, software components methods to evaluate design tradeoffs between different technology choices. design methodologies

Overview of a few hot research topics in ES

TentativeSchedule

Wk Date Topic

1 Tuesday, January 08, 2008 Introduction

Thursday, January 10, 2008 Modeling

2 Tuesday, January 15, 2008 “

Thursday, January 17, 2008 “

3 Tuesday, January 22, 2008 “

Thursday, January 24, 2008 Platforms

4 Tuesday, January 29, 2008 CPUs

Thursday, January 31, 2008 Memory

5 Tuesday, February 05, 2008 I/O, Sensors, Actuators

Thursday, February 07, 2008 Mini Project Demos

6 Tuesday, February 12, 2008 RTOS

Thursday, February 14, 2008 Timing & Scheduling

7 Tuesday, February 19, 2008 Real time Communication

Thursday, February 21, 2008 Midterm

8 Tuesday, February 26, 2008 HW/SW Codesign

Thursday, February 28, 2008 Resource Management in ES

9 Tuesday, March 04, 2008 SoCs

Thursday, March 06, 2008 Topic research presentations

10 Tuesday, March 11, 2008 Topic research presentations

Thursday, March 13, 2008 Final project presentations

Friday, March 14, 2008 Final project presentations

Course RequirementsNo official graduate course as prerequisite, but, many assumptions!Knowledge

Digital hardware, basic electrical stuff, computer architecture (ISA, organization), programming & systems programming, algorithms and data structures

SkillsAdvanced ability to programBasic calculusAbility to look up references and track down pubs (Xplore etc)Strong ability to communicate your ideas (talks, reports)

InitiativeOpen-ended problems with no single answer requiring thinking and research

InterestHave strong interest in research in this or related fields

Course GradingHomework (3-4): 10%Midterm: 20% Topic research: 15%

survey an area and submit a report via email in .pdf or text format

Mini project 15%Group project; implement an energy efficient media player

Final Project: 35%20% effort/results; 5% report; 5% demo; 5% presentation

Class participation, attendance, engagement: 5%

Final ProjectImplementation projects

Use Intel’s XScale DVKDVK is targeted to development of wireless multimedia devices

Err on the side of picking up a risky project even if the results turn out to be disappointing or prove to be contrary to expected Groups 30 minute presentation & demo, report with strong style guidelines Sample projects are on previous class web page

may relate to your own researchWhat should be your goal?

something usefulsimilar style/quality as a conference paper and talkkey is to keep the project simple, and focused

Some previous final projectsFace recognition application Compression and decompression of video over cell-phone networks A wireless network with schedulingTime and Location Sensitive Messaging Protocol for Automated Message DeliveryJPG image viewerOn-line and adaptive dynamic power management techniquesComparison of Ad-hoc Routing Algorithms on XScale PlatformsA Steganography-Secured Transmission System

Project Timeline

TimelineProject topics and groups finalized by Week 4Detailed proposal and timeline by Week 5

Project mid-course report by Week 8Final project presentations the last week of classes (Th/F).

Topic InvestigationCan be derived off any lectureAvoid following types of topics:

A specific productyou will just repeat what the manufacturer’s web site already says

An ultra-broad area (e.g. ASIC or FPGA)hard to say anything coherent

Best topics are those that are about a "focused class" of something

Sample TopicsLow-power radio technologies (e.g. Zigbee)Routing algorithms for wireless ad-hoc networksThermal management techniques for SOCsEnergy sourcesDesign tools for embedded systemsMiddleware platforms for embedded systems

Reader & TextbooksNo textbookA set of papers will be required reading

will relate to the core topic of that classyou are expected to read it BEFORE the class

In addition I will give pointers to papers and web resources

Reference booksPeter Marwedel, “Embedded Systems Design,” Kluwer, 2004.“Embedded, Everywhere: A Research Agenda for Networked Systems of Embedded Computers,” National Research Council. http://www.nap.edu/books/0309075688/html/John A. Stankovic and Kirthi Ramamritham, "Hard Real-Time Systems," IEEE Computer Society Press. G.D. Micheli, W. Wolf, R. Ernst, “Readings in Hardware/Software Co-Design,” Morgan Kaufman.S.A. Edwards, “Languages for Digital Embedded Systems,” Kluwer, 2000.R. Melhem and R. Graybill, “Power Aware Computing,” Plenum, 2002.M. Pedram and J. Rabaey, “Power Aware Design Methodologies,” Kluwer, 2002.Bruce Douglass, "Real-Time UML - Developing Efficient Objects for Embedded Systems," Addison-Wesley, 1998. Hermann Kopetz, "Real-Time Systems : Design Principles for Distributed Embedded Applications," Kluwer, 1997. Hassan Gomaa, "Software Design Methods for Concurrent and Real-Time Systems," Addison-Wesley, 1993. P. Lapsley, J. Bier, A. Shoham, and E.A. Lee, “DSP Processor Fundamentals: Architectures and Features,” Berkeley Design technology Inc,, 2001.R. Gupta, "Co-synthesis of Hardware & Software for Embedded Systems," Kluwer, 1995.Felice Balarin, Massimiliano Chiodo, and Paolo Giusto, "Hardware-Software Co-Design of Embedded Systems : The Polis Approach," Kluwer, 1997. Jean J. Labrosse, "Embedded Systems Building Blocks : Complete And Ready To Use Modules In C ," R&D Publishing, 1995. Jean J. Labrosse, "uC / OS : The Real Time Kernel," R&D Publishing, 1992.

Embedded Systems on the WebBerkeley Design technology, Inc.: http://www.bdti.comEE Times Magazine: http://www.eet.com/Linux Devices: http://www.linuxdevices.comEmbedded Linux Journal: http://embedded.linuxjournal.comEmbedded.com: http://www.embedded.com/

Embedded Systems Programming magazineCircuit Cellar: http://www.circuitcellar.com/Electronic Design Magazine: http://www.planetee.com/ed/Electronic Engineering Magazine: http://www2.computeroemonline.com/magazine.htmlIntegrated System Design Magazine: http://www.isdmag.com/Sensors Magazine: http://www.sensorsmag.comEmbedded Systems Tutorial: http://www.learn-c.com/Collections of embedded systems resources

http://www.ece.utexas.edu/~bevans/courses/ee382c/resources/http://www.ece.utexas.edu/~bevans/courses/realtime/resources.html

Newsgroupscomp.arch.embedded, comp.cad.cadence, comp.cad.synthesis, comp.dsp, comp.realtime, comp.software-eng, comp.speech, and sci.electronics.cad

Embedded Systems CoursesAlberto Sangiovanni-Vincentelli @ Berkeley

EE 249: Design of Embedded Systems: Models, Validation, and Synthesis

http://www-cad.eecs.berkeley.edu/~polis/class/index.htmlBrian Evans @ U.T. Austin

EE382C-9 Embedded Software Systems http://www.ece.utexas.edu/~bevans/courses/ee382c/index.html

Edward Lee @ BerkeleyEE290N: Specification and Modeling of Reactive Real-Time Systems

http://ptolemy.eecs.berkeley.edu/~eal/ee290n/index.htmlMani Srivastava @ UCLA

EE202A: Embedded and Real Time Systemshttp://nesl.ee.ucla.edu/courses/ee202a/2003f/

Bruce R. Land @ CMUEE476: Designing with Microcontrollers

http://instruct1.cit.cornell.edu/courses/ee476

Conferences and JournalsConferences & Workshops

ACM/IEE DACIEEE ICCADIEEE RTSSACM ISLPEDIEEE CODES+ISSSCASESMany others…

Journals & MagazinesACM Transactions on Design Automation of Electronic SystemsACM Transactions on Embedded Computing SystemsIEEE Transactions on Computer-Aided Design IEEE Transactions on VLSI DesignIEEE Design and Test of Computers IEEE Transactions on Computers Journal of Computer and Software Engineering Journal on Embedded Systems

What are embedded systems and why should we care?

What are embedded systems?Systems which use computation to perform a specific functionembedded within a larger device and environmentHeterogeneous & reactive to environment

Main reason for buying is not information processing

Embedded processor market

Processors strongly affect SW development – keeps their prices highOnly 2% of processors drive PCs!ARM sells 3x more CPUs then Intel sells Pentiums79% of all high-end processors are used in embedded systems

Source: EETimes

Embedded Market GrowthWorldwide mobile phone sales have a 35% quarterly increaseWorldwide portable flash player market is expected to grow by a factor of 4 between 2003 and 2008Global 3G subscribers will double in the last yearThe number of broadband lines worldwide increased by almost 55% in the last 12 monthsDVR users will grow from 5% to 41% within 5 yrs

The future is embedded, Embedded is the future!

Source: www.itfacts.biz

Tied to advances in semiconductorsA typical chip in near future

50 square millimeters50 million transistors1-10 GHz, 100-1000 MOP/sq mm, 10-100 MIPS/mW

Cost is almost independent of functionallity10,000 units/wafer, 20K wafers/month$5 per partProcessor, MEMS, Networking, Wireless, Memory

But it takes $20M to build one today, going to $50+M

So there is a strong incentive to port your application, system, box to the “chip”

Source: RG UCSD

Trends in Embedded Systems

Increasing code sizeaverage code size: 16-64KB in 1992, 64K-512KB in 1996migration from hand (assembly) coding to high-level languages

Reuse of hardware and software componentsprocessors (micro-controllers, DSPs)software components (drivers)

Increasing integration and system complexityintegration of RF, DSP, network interfaces32-bit processors, IO processors (I2O)

Structured design and composition methods are essential.

Source: RG UCSD

Characteristics of Embedded SystemsApplication specificEfficient

energy, code size, run-time, weight, costDependable

Reliability, maintainability, availability, safety, securityReal-time constraints

Soft vs. hard Reactive - connected to physical environment

sensors & actuatorsHybrid

Analog and digitalDistributed

Composability, scalability, dependabilityDedicated user interfaces

embedded

real-time

embedded real-time

Embedded Systems: ApplicationsTransportationIndustrial process controllersSmart buildingsMedical systemsMilitarySecurityRoboticsComputer/Communication products, e.g., printers, FAX machines, ...Emerging multimedia applications & consumer electronics

e.g., cellular phones, personal digital assistants, video-conferencing servers, interactive game boxes, TV set-top boxes, ...Multimedia => Increasing computational demands, and

increased reliance on VLSI, HW/SW integration.

Applications• Medical systems

e.g. “artificial eye”

www.dobelle.com

• e.g. “micro-needles”

Source: ASV UCB

Applications

Medical health monitoringBio-monitors for ill and elderlyMonitor remotely 24x7Fast emergency response Automated drug deliveryExample: monitoring cardiac arrest can raise out-of-hospital survival rate from 6% to 20% and save 60k lives/yr

On-chip Chemistry

electromagnet area underneath device

arm 1

4 mm

holes for fluidic contact

holes for electrical contact

1 mm

arm 2 arm3

PedometerObvious computer work:

Count stepsKeep timeAveragesetc.

Hard computer work:Actually identify when a step is takenSensor feels motion of device, not of user feet

© Jakob Engblom

If you want to playLego mindstorms robotics kit

Standard controller8-bit processor64 kB of memory

Electronics to interface to motors and sensors

Good way to learn embedded systems

© Jakob Engblom

Mobile phonesMultiprocessor

8-bit/32-bit for UIDSP for signals32-bit in IR port32-bit in Bluetooth

8-100 MB of memoryAll custom chipsPower consumption & battery life depends on software

© Jakob Engblom

Inside the PCCustom processors

Graphics, sound32-bit processors

IR, BluetoothNetwork, WLANHard diskRAID controllers

8-bit processorsUSBKeyboard, mouse

© Jakob Engblom

Mobile base stationMassive signal processing

Several processing tasks per connected mobile phone

Based on DSPsStandard or custom100s of processors

© Jakob Engblom

Telecom SwitchRack-based

Control cardsIO cardsDSP cards...

Optical & copper connectionsDigital & analog signals

© Jakob Engblom

Smart Welding MachineElectronics control voltage & speed of wire feedAdjusts to operator

kHz sample rate1000s of decisions/second

Perfect weld even for quite clumsy operatorsEasier-to-use product, but no obvious computer

© Jakob Engblom

CarsMultiple processors networked together (~100), wide variety of CPUs:

8-bit – door locks, lights, etc; 16-bit – most functions; 32-bit – engine control, airbags

Multiple networksBody, engine, telematics, media, safety

90% of all innovations based on electronic systemsMore than 30% of cost is in electronics

© Jakob Engblom, ASV UCB

Source: ASV UCB

Forestry MachineNetworked computer system

Controlling arms & toolsNavigating the forestRecording the trees harvestedCrucial to efficient work

Processors16-bit processors in a network

© Jakob Engblom

Operator PanelEmbedded PC

Graphical display Touch panelJoystickButtonsKeyboard

Tough enough to be “out in the woods”

Amtrak Acela High Speed Train

High speed tilting train service between Boston, New York, and Washington, D.C.Built by Bombardier, uses FT-10 free topology twisted pair channel to monitor and control propulsion, power inverters, braking, fire protection systems, ride stability, safety, and comfort.

Transportation

Source: Echelon

Home Automation One of the largest European appliance manufacturers Embedded control system enables

Load optimization between appliancesLoad-shifting to low-rate hours

Internet connection enables e-services

Remote maintenance, diagnostics, etc.

Source: Echelon

Coeur Défense, ParisLocation and access

The biggest office property complex in Europe located at the heart of the central esplanade of the Paris-La Défense business district

The buildingProperty complex with a total floor area of 182,000 m² in two towers 180 metres high (39 floors) and 3 small (8-floors) buildings linked to each other by a "glass cathedral".

Building Automation System15000 embedded control devicesOne (1) i.LON™ 100 per floor (150 floors) for routing data

Building Automation

Source: Echelon

Energy Management Demand side management for battery chargers

Southern California Edison Goal: Shift 8,000 kW of on peak power capacity to off peak periodsNetwork integrator designed and installed a system of embedded control devices to operate battery charging equipment during off peak periods and provide remote web based monitoring and control interface

Source: Echelon

Management Center with LNSTM Servers

Data Concentrator

Power Line

IP

Electric Utility

World’s largest publicly traded utility uses embedded control devices

Source: Echelon

Process Control

Bellagio Hotel, Las Vegas NV

Water fountain showFountain and sprinkler systems controlsPump controlsValve controlsChoreographed lights and musicLeak detection

Source: Echelon

Structural Health Monitoring

Source: LANL

Disciplines used in ES design

ES design includes disciplines in CS & EE.Specific application domains

Signal processingSoftware engineering

implementing the SW componentsVLSI & computer aided design

implementing the custom and semi-custom HW Parallel/Distributed system design

Loosely/tightly coupled network of communicating CPUsHard & soft real-time systems

Source: RG UCSD

Modeling the system to be designed, and experimenting with algorithms involved;

Refining (or “partitioning”) the function to be implemented into smaller, interacting pieces;

HW-SW partitioning: Allocating elements in the refined model to either HW or SW running on custom hardware or a general microprocessor.

Schedulingthe times at which the functions are executed. This is important when several modules in the partition share a single hardware unit.

Mapping (Implementing)a functional description into software that runs on a processor or a collection of custom, semi-custom, or commodity HW.

Environ-ment

Processor Analog I/O

Memory

ASIC

DSP Code

Design Ingredients

Source: RG UCSD

Embedded system metricsSome metrics:

performance: MIPS, reads/sec etc.power: Wattscost: Dollars

Nonrecurring engineering cost, manufacturing costsize: bytes, # components, physical space occupiedFlexibility, Time-to-prototype, time-to-marketMaintainability, correctness, safety

MIPS, Watts and cost are relatedtechnology drivento get more MIPS for fewer Watts

look at the sources of power consumptionuse power management and voltage scaling

Source: MS HPL

Example: PDA design

Source: MS HPL

MIPS vs. Watts

Source: MS HPL

MIPS/W/$

Source: MS HPL

Bandwidth vs. Watt and $

This is why PDAs use SDRAM

Source: MS HPL

BW/W/$ with hard disk

Why IPOD used hard disk

Source: MS HPL

Standby power

Here is why cell phone battery lasts longest, PDA shorter and IPOD only a few hours

Source: MS HPL

Challenges of HW implementationLack of flexibility (changing standards).Masks for specialized HW are expensive

http://www.molecularimprints.com/Technology/tech_articles/MII_COO_NIST_2001.PDF9]

Trend towards implementation in Software

Cost of lithography tools

Importance of Embedded SW & Embedded Processors

“... the New York Times has estimated that the averageAmerican comes into contact with about 60 micro-processors every day....” [Camposano, 1996]

Latest top-level BMWs contain over 100 micro-processors[Personal communication]

Most of the functionality will be implemented in software

Source: Marwedel

Diverse SW DevelopmentHigh-volume, low-cost, low-complexity: portable CD player

8-bit microcontrollers with on-chip RAM, ROM, IOhand-coded assembly, single task, 1K-8K bytes of code

Medium-volume, moderate-cost, moderate-complexity: handheld remote terminal

16-bit or 32-bit microcontrollers with memory and peripheralsCustomizable SW developed as a mixture of C and assembly64 KB-1MB of code, more than one task

Low-volume, high-cost, high-complexity: air-traffic control systemSecurity and reliability are primary measures of qualitySignificant development and maintenance costsvery high performance

Very high performance: wireless modemHW enables design, SW must keep up with HW capabilitiesCustom ASIP processor, complex development environmentIntegration with hardware design tools is often desired

Co-simulation and co-synthesis tools

Efficient solution requires good understanding of both SW and HW

Source: RG UCSD

Software complexity

Rob van Ommering, COPA Tutorial, as cited by: Gerrit Müller: Opportunities and challenges in embedded systems, Eindhoven Embedded Systems Institute, 2004

Exponential increase in software complexityIn some areas code size is doubling every 9 months [ST Microelectronics, Medea Workshop, Fall 2003]

... > 70% of the development cost for complex systems such as automotive electronics and communication systems are due to software development[A. Sangiovanni-Vincentelli, 1999]

Source: Marwedel

More challenges for embedded SWDynamic environments

Capture the required behaviour!

Validate specifications

Efficient translation of specifications into implementations!

How can we check that we meet real-time constraints?

How do we validate embedded real-time software? (large volumes of data, testing may be safety-critical)

Source: Marwedel

What is HW/SW Codesign?Traditional Design

SW and HW partitioning is decided at an early stage, and designs proceed separately from then onward.

CAD today addresses synthesis problems at a purely hardware level:

efficient techniques for data-path and control synthesis down to silicon.

ECS use diverse (commodity) componentsuP, DSP cores, network and bus interfaces, etc.

CodesignA flexible design strategy, wherein the HW/SW designs proceed in parallel, with feedback and interaction occurring between the two as the design progresses. Final HW/SW partition/allocation is made after evaluating trade-offs and performance of options.Seek delayed (and even dynamic) partitioning capabilities.

Source: RG UCSD

Scope of Codesign

The specific issues that need to be addressed in codesign depend to some extent on

the scope of the application at hand, andthe richness of the system delivered

Dedicatedsystem

Digital Signal

Processors

General purpose

processors

SingleTask

GeneralTask Mix

CorrelatedTask Mix

System +Application SW +SW environment

SingleChip

System +Applications

AutomotiveControl

DFT

Source: RG UCSD

New Design ThemesLong-lived systems that can be untethered and unattended

Low-duty cycle operation with bounded latencyExploit redundancy and heterogeneous tiered systems

Leverage data processing inside the networkExploit computation near data to reduce communication

Self configuring systems that can be deployed ad hocMeasure and adapt to unpredictable environmentExploit spatial diversity and density of sensor/actuator nodes

Achieve desired global behavior with adaptive localized algorithms

Cannot afford to extract dynamic state information needed for centralized control

Next…

Specification and modeling of ESGoal:

overview of common models and languages used in ES designwhich models/languages/specification systems to use for which type of ES design

E.g. StateCharts, Esterel, Verilog, Petri Nets, UML, etc.