codesign of embedded systems1 introduction to embedded systems part of hw/sw codesign of embedded...

45
Codesign of Embedded System s 1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Upload: dustin-powell

Post on 26-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Codesign of Embedded Systems

1

Introduction to Embedded Systems

Part ofHW/SW Codesign of

Embedded Systems Course (CE 40-226)

Page 2: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms2

Today programme Introduction to Embedded Systems

What are embedded systems? Challenges in embedded computing

system design. Design methodologies.

Copyright Note:

Main idea from Prof. Wolf’s overheads for his book:

“Computers as Components”, MKP 2000.

Plus some modifications and additions.

Copyright Note:

Main idea from Prof. Wolf’s overheads for his book:

“Computers as Components”, MKP 2000.

Plus some modifications and additions.

Page 3: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms3

What are embedded Systems Definition: Embedded System

Includes a programmable computer But, is not a general-purpose

computer

CPU

mem

input

output analog

analog

embeddedcomputer

Logic

Page 4: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms4

Embedded Systems Advantages

Optimizations according to application characteristics

don’t need all the general-purpose bells and whistles

Page 5: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms5

Embedded System: Examples

Embedded System

Page 6: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms6

uP early history Late 1940’s: MIT Whirlwind computer

Designed for RT operations. Originally designed to control an aircraft

simulator. uP history

First uP: Intel 4004, early 1970’s. HP-35 calculator: comprising several

chips, 1972.

Page 7: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms7

uP early history (cont.) Usage in automobiles ECU

Starting in 1970’s. Control fuel/air mixture, engine timing,

etc. Multiple modes of operation: warm-up,

cruise, hill climbing, etc. Provides lower emissions, better fuel

efficiency. Native example: Cadillac Iran!

Page 8: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms8

uP varieties uController: includes

I/O devices On-board memory.

Digital signal processor (DSP): Optimized for digital signal

processing. Typical embedded word sizes: 8-

bit, 16-bit, 32-bit.

Page 9: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms9

Application examples Simple control: front panel of

microwave oven, etc Canon EOS 3 has three

microprocessors. 32-bit RISC CPU runs autofocus and eye

control systems Analog TV: channel selection, etc. Digital TV: programmable CPUs +

hardwired logic

Page 10: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms10

Automotive embedded systems Today’s high-end automobile may

have 100 microprocessors: 4-bit uController checks seat belt; uControllers run dashboard devices; 16/32-bit uP controls engine.

Native examples Peugeot Persia Xantia

Page 11: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms11

BMW 850i brake and stability control system Anti-lock brake system (ABS):

pumps brakes to reduce skidding. Automatic stability control

(ASC+T): controls engine to improve stability.

ABS and ASC+T communicate. ABS was introduced first---needed to

interface to existing ABS module.

Page 12: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms12

BMW 850i (cont.)

brake brake

brake brake

sensor sensor

sensor sensor

ABShydraulic

pump

Page 13: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms13

Characteristics of embedded systems Functional requirements

Sophisticated functionality. RT operation.

Non-functional requirements Low manufacturing cost. Low power.

Designed to tight deadlines by small teams.

Page 14: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms14

Functional Requirements Sophisticated functionality. Often:

have to run sophisticated or multiple algorithms. Cell phone, laser printer.

provide sophisticated user interfaces. RT operation

Must finish operations by deadlines. Hard RT: missing deadline causes failure. Soft RT: missing deadline results in degraded

performance. Many systems are multi-rate: must handle

operations at widely varying rates.

Page 15: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms15

Non-functional requirements Many embedded systems are mass-

market items that must have low manufacturing costs. Limited memory, microprocessor power,

etc. Power consumption is critical in battery-

powered devices. Excessive power consumption increases

system cost even in wall-powered devices.

Page 16: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms16

Design teams Often designed by a small team of

designers. Often must meet tight deadlines.

6 month market window is common. Can’t miss back-to-school window for

calculator.

Page 17: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms17

Why use uP? Alternatives:

field-programmable gate arrays (FPGAs), custom logic, etc.

uPs are often very efficient: can use same logic to perform many different functions.

uPs simplify the design of families of products.

Page 18: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms18

The performance paradox uP uses much more logic to

implement a function than does custom logic.

But uP is often at least as fast: heavily pipelined; large design teams; aggressive VLSI technology.

Page 19: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms19

Power Custom logic is a clear winner for

low power devices. Modern uP offer features to help

control power consumption. Software design techniques can

help reduce power consumption. Transmeta’s Crusoe™ Processor

Page 20: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Codesign of Embedded Systems

20

Introduction to Embedded Systems

Challenges in Embedded System Design

Page 21: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms21

Challenges in embedded system design How much hardware do we need?

How big is the CPU? Memory? How do we meet our performance

deadlines? Faster hardware or cleverer software?

How do we minimize power? Turn off unnecessary logic? Reduce memory

accesses?

Page 22: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms22

Challenges, etc. (cont.) Does it really work?

Is the specification correct? Does the implementation meet the spec? How do we test for real-time characteristics? How do we test on real data?

How do we work on the system? Observability, controllability? What is our development platform?

Page 23: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Codesign of Embedded Systems

23

Introduction to Embedded Systems

Design Methodology

Page 24: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms24

Design methodologies A procedure for designing a system. Understanding your methodology helps

you ensure you didn’t skip anything. Compilers, software engineering tools,

computer-aided design (CAD) tools, etc., can be used to: help automate methodology steps; keep track of the methodology itself.

Page 25: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms25

Design goals Functional requirements

Performance. Overall speed, deadlines.

Functionality and user interface. Non-functional requirements

Manufacturing cost. Power consumption. Other requirements (physical size, etc.)

Page 26: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms26

Levels of abstractionrequirements

specification

architecture

componentdesign

systemintegration

Page 27: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms27

Top-down vs. bottom-up Top-down design:

start from most abstract description; work to most detailed.

Bottom-up design: work from small components to big

system. Real design uses both techniques.

Page 28: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms28

Stepwise refinement At each level of abstraction, we

must: analyze the design to determine

characteristics of the current state of the design;

refine the design to add detail.

Page 29: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms29

Requirements Plain language description of what

the user wants and expects to get. May be developed in several ways:

talking directly to customers; talking to marketing representatives; providing prototypes to users for

comment.

Page 30: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms30

Functional vs. non-functional requirements Functional requirements:

output as a function of input. Non-functional requirements:

time required to compute output; size, weight, etc.; power consumption; reliability; etc.

Page 31: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms31

Our requirements formnamepurposeinputsoutputsfunctionsperformancemanufacturing costpowerphysical size/weight

Page 32: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms32

Example: GPS moving map requirements Moving map

obtains position from GPS, paints map from local database.

lat: 40 13 lon: 32 19

I-78

Sco

tch

Roa

d

Page 33: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms33

GPS moving map needs Functionality: For automotive use. Show

major roads and landmarks. User interface: At least 400 x 600 pixel

screen. Three buttons max. Pop-up menu. Performance: Map should scroll smoothly.

No more than 1 sec power-up. Lock onto GPS within 15 seconds.

Cost: $500 street price = approx. $100 cost of goods sold.

Page 34: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms34

GPS moving map needs, (cont.) Physical size/weight: Should fit in hand. Power consumption: Should run for 8

hours on four AA batteries.

Page 35: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms35

GPS moving map requirements form

name GPS moving mappurpose consumer-grade

moving map for drivinginputs power button, two

control buttonsoutputs back-lit LCD 400 X 600functions 5-receiver GPS; three

resolutions; displayscurrent lat/lon

performance updates screen within0.25 sec of movement

manufacturing cost $100 cost-of-goods-sold

power 100 mWphysical size/weight no more than 2: X 6:,

12 oz.

Page 36: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms36

Specification A more precise description of the

system: should not imply a particular architecture; provides input to the architecture design

process. May include functional and non-

functional elements. May be executable or may be in

mathematical form for proofs.

Page 37: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms37

GPS specification Should include:

What is received from GPS; map data; user interface; operations required to satisfy user

requests; background operations needed to

keep the system running.

Page 38: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms38

Architecture design What major components go

satisfying the specification? Hardware components:

CPUs, peripherals, etc. Software components:

major programs and their operations. Must take into account functional

and non-functional specifications.

Page 39: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms39

GPS moving map block diagram

userinterfacedatabase

GPSreceiver

searchengine

renderer display

Page 40: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms40

GPS moving map hardware architecture

GPSreceiver

CPU

panel I/O

display framebuffer

memory

Page 41: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms41

GPS moving map software architecture

position databasesearch

rendererpixels

timeruser

interface

Page 42: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms42

Designing hardware and software components Must spend time architecting the

system before you start coding. Architecture components

Some are ready-made, Some can be modified from existing

designs Others must be designed from

scratch.

Page 43: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms43

System integration Put together the components.

Many bugs appear only at this stage. Have a plan for integrating

components to uncover bugs quickly, test as much functionality as early as possible.

Page 44: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms44

What we learned today Embedded computers are all around

us. Many systems have complex embedded

hardware and software. Embedded systems pose many design

challenges: design time, deadlines, power, etc.

Design methodologies help us manage the design process.

Page 45: Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Winter-Spring 2001 Codesign of Embedded Syste

ms45

Homework A simplified ISDN transceiver

part 1: un-encoded transmitter refer to the homework definition page

Due date: Esfand 6th