embedded system design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf ·...

29
Embedded System Design Prof. Stephen A. Edwards [email protected] Spring 2009 Embedded System Design – p.

Upload: dinhbao

Post on 29-Aug-2019

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Embedded System Design

Prof. Stephen A. Edwards

[email protected]

Spring 2009

Embedded System Design – p. 1

Page 2: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Spot the Computer

Embedded System Design – p. 2

Page 3: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Ubiquitous Computers

iPhone Laser Keyboard Nikon D300 Video Watch

GPS Playstation 3 PC Keyboard SD Card

Embedded System Design – p. 3

Page 4: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Technical Challenges

Real-time Complexity

Concurrency Legacy LanguagesEmbedded System Design – p. 4

Page 5: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Software complexity growing

Size of Typical Embedded System

1985 13 kLOC

1989 21 kLOC ↓ 44 % per year

1998 1 MLOC

2000 2 MLOC

2008 16 MLOC ≈ Windows NT 4.0

2010 32 MLOC ≈ Windows 2000

Source: “ESP: A 10-Year Retrospective,” Embedded Systems Programming,

November 1998

Embedded System Design – p. 5

Page 6: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Digital Camera Block Diagram

Embedded System Design – p. 6

Page 7: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

The Design Challenge

Design optimal device that meets constraints on

Price Functionality

Performance Size

Power Time-to-market

Maintainability SafetyEmbedded System Design – p. 7

Page 8: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

The Time-to-Market Challenge

Time

Possib

leR

eve

nue

Market

Window

Typicaltime-to-marketconstraint:8 months

Embedded System Design – p. 8

Page 9: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Simplified Revenue Model

Time

Sales

W 2WD

Market ramp On-time curve

Delayed curve

Loss due to delay

Assuming a constant market ramp, on-time revenue is 12

bh = 12·2W ·W = W

2 and

delayed revenue is 12(2W −D)(W −D) so fractional revenue loss is

D(3W −D)

2W 2= O(D2)

Example: when W = 26 and D = 10, fraction lost is about 50%.

Embedded System Design – p. 9

Page 10: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

NRE

Nonrecurring engineering cost:The cost of producing the first one.

log Volume

log

Unit

Cost

NRE cost dominates

Production cost dominates

Low NRE, high production costs

High NRE, low production costs

Embedded System Design – p. 10

Page 11: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Embedded System Technologies

Integrated Circuits

Processing elements

Design tools

Embedded System Design – p. 11

Page 12: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

IC Technology

1947: First transistor (Shockley, Bell Labs)

1958: First integrated circuit (Kilby, TI)

1971: First microprocessor (4004: Intel)

Today: eight wire layers, 45 nm features

Embedded System Design – p. 12

Page 13: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Moore’s Law: Transistors per chip

201020001990198019701k

10k

100k

1M

10M

100M

1B

10B

≈1.5

×/year

b bb

b

b

b

b

bbbb b

bbb b

b

b

b

bb

bb

b

b

“The complexity for minimum component

costs has increased at a rate of roughly

a factor of two per year. Certainly over

the short term this rate can be expected

to continue, if not to increase.”

— Gordon Moore, 1965

Source: Intel/Wikipedia

Embedded System Design – p. 13

Page 14: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

$1000 buys you this many CPS

1900 1920 1940 1960 1980 2000

10−4

10−2

1

102

104

106

108

bb

b b

bbb

b

bb

bb b

bb

b

b

b

bb

bb

b

bb

b

bb

b

b

bb

bb

b

b

b

b

b

bb b b

bb

b

bb

Electromechanical Relay Tube Transistor Integrated Circuit

Source: Ray Kurzweil, The Age of Spiritual MachinesEmbedded System Design – p. 14

Page 15: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

1918 Sears Roebuck Catalog

About $100 in today’s dollars.From Donald Norman, The Invisible Computer, 1998.

Embedded System Design – p. 15

Page 16: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Spectrum of IC choices

Full Custom

ASIC

Gate Array

FPGA

PLD

GP Processor

SP Processor

MultifunctionFixed-function

You choosepolygons (Intel)

circuit (Sony)

wires

logic network

logic function

program (e.g., Pentium)

program (e.g., DSP)

settings (e.g., Ethernet)

part number (e.g., 74LS00)

Flexibility

Embedded System Design – p. 16

Page 17: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Hardware and Software

HardwareParallelSynchronousLogic GatesWire-based

communicationFixed topologyLow powerMore detailedHigh NREFaster

SoftwareSequentialAsynchronousStored programsMemory-based

communicationHighly programmableHigh powerLess detailedNo NRESlower

Embedded System Design – p. 17

Page 18: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Design Tools

Hardware

Logic Synthesis

Place-and-route

DRC/ERC/LVS

Simulators

Software

Compilers

Assemblers

Linkers

Debuggers

Embedded System Design – p. 18

Page 19: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Cost of Designs is Rising

1981: 100 designer-months for leading-edge chip10k transistors, 100 transistors/month

2002: 30 000 designer-months150M transistors, 5000 transistors/month

Design cost increased from $1M to $300M

1980 1985 1990 1995 2000 2005 2010

Transistors per chip

Transistors/designer-month

100

10k

1M

100M

10G

Embedded System Design – p. 19

Page 20: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Your Nemesis: The Altera DE2

Embedded System Design – p. 20

Page 21: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

DE2 Peripherals

Embedded System Design – p. 21

Page 22: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Class Structure

Three Introductory Labs: 1.5 weeks each

1. Access, modify, and display memory inVHDL

2. An Ethernet chat client (software only)

3. Either

(a) an FM audio synthesizer; or

(b) a video bouncing ball.

The project: Design-your-own

Embedded System Design – p. 22

Page 23: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Custom Project Ideas

Broadly: C + VHDL + peripheral(s)

Video game (e.g., Pac-Man)

Video effects processor

Digital picture frame

Serial terminal

Serial port monitor

Very fancy digital clock (w/ video)

Embedded System Design – p. 23

Page 24: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

More Ideas

Digital tone control

Digital sound effects processor

Real-time audio spectrum analyzer

Speech synthesizer

Internet radio

Embedded System Design – p. 24

Page 25: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Projects from 2004

MIDI synthesizer

Line-following robot with video vision

SAE student vehicle telemetry system

Stereo video vision system

Pac-man-like video game

Internet video camera

Embedded System Design – p. 25

Page 26: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Projects from 2005

Scrabble Timer

Scorched Earth Video Game

SAE Auto Shifter

Internet Radio Broadcaster

3D Maze Game

Voice-over-IP Telephone

JPEG decoder

Sokoban video game

Rally-X video game

Embedded System Design – p. 26

Page 27: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Projects from 2006

Video-guided Lego Robot

360◦ camera de-warper

Videogame with accelerated line-drawing

Voice recorder

Internet radio

JPEG decoder

Voice over IP tranceiver

Embedded System Design – p. 27

Page 28: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Projects from 2007

Pac-Edwards (Don’t ask!)

Button Hero (videogame)

Digital Picture Frame: SD card with JPEG to VGA

Networked game of Clue

Conway’s Game of Life (60 gps!)

Embedded System Design – p. 28

Page 29: Embedded System Design - cs.columbia.edusedwards/classes/2009/4840/embedded-systems.pdf · Ubiquitous Computers iPhone Laser Keyboard Nikon D300 Video Watch GPS Playstation 3 PC Keyboard

Projects from 2008

Real-time ray tracer

Video-camera-controlled pool game

Real-time video decryption

WiiMote-controlled maze game

Embedded System Design – p. 29