Design Codesign of Embedded Systems Embedded Computing Maziar

  • Slides: 46
Download presentation
Design & Co-design of Embedded Systems Embedded Computing Maziar Goudarzi 2005 Design & Co-design

Design & Co-design of Embedded Systems Embedded Computing Maziar Goudarzi 2005 Design & Co-design of Embedded Systems

Today Program Introduction to Embedded Systems – What are embedded systems? – Challenges in

Today Program Introduction to Embedded Systems – What are embedded systems? – Challenges in embedded computing system design. – Design methodology. Copyright Note: Main idea from Prof. Wolf’s overheads for his book: “Computers as Components”, MKP 2001. Plus some modifications and additions. 2005 Design & Co-design of Embedded Systems 2

Introduction z. What are embedded systems? z. Challenges in embedded computing system design. z.

Introduction z. What are embedded systems? z. Challenges in embedded computing system design. z. Design methodologies. © 2000 Morgan Kaufman Overheads for Computers as Components 3

Definition z. Definition: Embedded System y. Includes a programmable computer y. But, is not

Definition z. Definition: Embedded System y. Includes a programmable computer y. But, is not a general-purpose computer CPU output analog input analog Logic embedded computer © 2000 Morgan Kaufman mem Overheads for Computers as Components 4

Embedded Systems z. Advantages y. Optimizations according to application characteristics ydon’t need all the

Embedded Systems z. Advantages y. Optimizations according to application characteristics ydon’t need all the general-purpose bells and whistles © 2000 Morgan Kaufman Overheads for Computers as Components 5

Examples Embedded System © 2000 Morgan Kaufman Overheads for Computers as Components 6

Examples Embedded System © 2000 Morgan Kaufman Overheads for Computers as Components 6

Early history z. Late 1940’s: MIT Whirlwind computer was designed for real-time operations. y.

Early history z. Late 1940’s: MIT Whirlwind computer was designed for real-time operations. y. Originally designed to control an aircraft simulator. z. First microprocessor was Intel 4004 in early 1970’s. z. HP-35 calculator used several chips to implement a microprocessor in 1972. © 2000 Morgan Kaufman Overheads for Computers as Components 7

Early history, cont’d. z. Usage in automobiles ECU y. Starting in 1970’s. y. Control

Early history, cont’d. z. Usage in automobiles ECU y. Starting in 1970’s. y. Control fuel/air mixture, engine timing, etc. y. Multiple modes of operation: warm-up, cruise, hill climbing, etc. y. Provides lower emissions, better fuel efficiency. y. Native example: Cadillac Iran! © 2000 Morgan Kaufman Overheads for Computers as Components 8

Microprocessor varieties z. Microcontroller: includes I/O devices, onboard memory. z. Digital signal processor (DSP):

Microprocessor varieties z. Microcontroller: includes I/O devices, onboard memory. z. Digital signal processor (DSP): microprocessor optimized for digital signal processing. z. Typical embedded word sizes: 8 -bit, 16 bit, 32 -bit. © 2000 Morgan Kaufman Overheads for Computers as Components 9

Application examples z. Simple control: front panel of microwave oven, etc. z. Canon EOS

Application examples z. Simple control: front panel of microwave oven, etc. z. Canon EOS 3 has three microprocessors. y 32 -bit RISC CPU runs autofocus and eye control systems. z. Analog TV: channel selection, etc. z. Digital TV: programmable CPUs + hardwired logic. © 2000 Morgan Kaufman Overheads for Computers as Components 10

Automotive embedded systems z Today’s high-end automobile may have 100 microprocessors: y 4 -bit

Automotive embedded systems z Today’s high-end automobile may have 100 microprocessors: y 4 -bit u. Controller checks seat belt; yu. Controllers run dashboard devices; y 16/32 -bit u. P controls engine. z Native examples y. Samand LX y. Peugeot Persia ELX y. Xantia, . . . © 2000 Morgan Kaufman Overheads for Computers as Components 11

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

BMW 850 i brake and stability control system z. Anti-lock brake system (ABS): y pumps brakes to reduce skidding. z. Automatic stability control (ASC+T): y controls engine to improve stability. z. ABS and ASC+T communicate. y. ABS was introduced first---needed to interface to existing ABS module. © 2000 Morgan Kaufman Overheads for Computers as Components 12

BMW 850 i, cont’d. sensor brake ABS © 2000 Morgan Kaufman hydraulic pump brake

BMW 850 i, cont’d. sensor brake ABS © 2000 Morgan Kaufman hydraulic pump brake sensor Overheads for Computers as Components 13

Characteristics of embedded systems z. Sophisticated functionality. z. Real-time operation. z. Low manufacturing cost.

Characteristics of embedded systems z. Sophisticated functionality. z. Real-time operation. z. Low manufacturing cost. z. Low power. z. Designed to tight deadlines by small teams. © 2000 Morgan Kaufman Overheads for Computers as Components 14

Functional complexity z Sophisticated functionality. Often: yhave to run sophisticated or multiple algorithms. x.

Functional complexity z Sophisticated functionality. Often: yhave to run sophisticated or multiple algorithms. x. Cell phone, laser printer. yprovide sophisticated user interfaces. z RT operation y. Must finish operations by deadlines. x. Hard RT: missing deadline causes failure. x. Soft RT: missing deadline results in degraded performance. y. Many systems are multi-rate: must handle operations at widely varying rates. © 2000 Morgan Kaufman Overheads for Computers as Components 15

Non-functional requirements z. Many embedded systems are mass-market items that must have low manufacturing

Non-functional requirements z. Many embedded systems are mass-market items that must have low manufacturing costs. y. Limited memory, microprocessor power, etc. z. Power consumption is critical in batterypowered devices. y. Excessive power consumption increases system cost even in wall-powered devices. © 2000 Morgan Kaufman Overheads for Computers as Components 16

Design teams z. Often designed by a small team of designers. z. Often must

Design teams z. Often designed by a small team of designers. z. Often must meet tight deadlines. y 6 month market window is common. y. Can’t miss back-to-school window for calculator. © 2000 Morgan Kaufman Overheads for Computers as Components 17

Why use microprocessors? z. Alternatives: yfield-programmable gate arrays (FPGAs), custom logic, etc. z. Microprocessors

Why use microprocessors? z. Alternatives: yfield-programmable gate arrays (FPGAs), custom logic, etc. z. Microprocessors are often very efficient: can use same logic to perform many different functions. z. Microprocessors simplify the design of families of products. © 2000 Morgan Kaufman Overheads for Computers as Components 18

The performance paradox z. Microprocessors use much more logic to implement a function than

The performance paradox z. Microprocessors use much more logic to implement a function than does custom logic. z. But microprocessors are often at least as fast: yheavily pipelined; ylarge design teams; yaggressive VLSI technology. © 2000 Morgan Kaufman Overheads for Computers as Components 19

Power z. Custom logic is a clear winner for low power devices. z. Modern

Power z. Custom logic is a clear winner for low power devices. z. Modern microprocessors offer features to help control power consumption. z. Software design techniques can help reduce power consumption. y. Transmeta’s Crusoe™ Processor (one of the optional reading-assignments) © 2000 Morgan Kaufman Overheads for Computers as Components 20

Embedded Computing Challenges in Embedded System Design 2005 Design & Co-design of Embedded Systems

Embedded Computing Challenges in Embedded System Design 2005 Design & Co-design of Embedded Systems 21

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

Challenges in embedded system design z. How much hardware do we need? y. How big is the CPU? Memory? z. How do we meet our deadlines? y. Faster hardware or cleverer software? z. How do we minimize power? y. Turn off unnecessary logic? Reduce memory accesses? © 2000 Morgan Kaufman Overheads for Computers as Components 22

Challenges, etc. z. Does it really work? y. Is the specification correct? y. Does

Challenges, etc. z. Does it really work? y. Is the specification correct? y. Does the implementation meet the spec? y. How do we test for real-time characteristics? y. How do we test on real data? z. How do we work on the system? y. Observability, controllability? y. What is our development platform? © 2000 Morgan Kaufman Overheads for Computers as Components 23

Embedded Computing Design Methodology 2005 Design & Co-design of Embedded Systems 24

Embedded Computing Design Methodology 2005 Design & Co-design of Embedded Systems 24

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

Design methodologies z. A procedure for designing a system. z. Understanding your methodology helps you ensure you didn’t skip anything. z. Compilers, software engineering tools, computer-aided design (CAD) tools, etc. , can be used to: yhelp automate methodology steps; ykeep track of the methodology itself. © 2000 Morgan Kaufman Overheads for Computers as Components 25

Design goals z. Functionality and user interface. z. Performance. y. Overall speed, deadlines. z.

Design goals z. Functionality and user interface. z. Performance. y. Overall speed, deadlines. z. Manufacturing cost. z. Power consumption. z. Other requirements (physical size, etc. ) © 2000 Morgan Kaufman Overheads for Computers as Components 26

Levels of abstraction requirements specification architecture component design system integration © 2000 Morgan Kaufman

Levels of abstraction requirements specification architecture component design system integration © 2000 Morgan Kaufman Overheads for Computers as Components 27

Top-down vs. bottom-up z. Top-down design: ystart from most abstract description; ywork to most

Top-down vs. bottom-up z. Top-down design: ystart from most abstract description; ywork to most detailed. z. Bottom-up design: ywork from small components to big system. z. Real design uses both techniques. © 2000 Morgan Kaufman Overheads for Computers as Components 28

Stepwise refinement z. At each level of abstraction, we must: yanalyze the design to

Stepwise refinement z. At each level of abstraction, we must: yanalyze the design to determine characteristics of the current state of the design; yrefine the design to add detail. © 2000 Morgan Kaufman Overheads for Computers as Components 29

Requirements z. Plain language description of what the user wants and expects to get.

Requirements z. Plain language description of what the user wants and expects to get. z. May be developed in several ways: ytalking directly to customers; ytalking to marketing representatives; yproviding prototypes to users for comment. © 2000 Morgan Kaufman Overheads for Computers as Components 30

Functional vs. nonfunctional requirements z. Functional requirements: youtput as a function of input. z.

Functional vs. nonfunctional requirements z. Functional requirements: youtput as a function of input. z. Non-functional requirements: ytime required to compute output; ysize, weight, etc. ; ypower consumption; yreliability; yetc. © 2000 Morgan Kaufman Overheads for Computers as Components 31

Our requirements form © 2000 Morgan Kaufman Overheads for Computers as Components 32

Our requirements form © 2000 Morgan Kaufman Overheads for Computers as Components 32

Example: GPS moving map requirements z. Moving map obtains position from GPS, paints map

Example: GPS moving map requirements z. Moving map obtains position from GPS, paints map from local database. Scotch Road I-78 lat: 40 13 lon: 32 19 © 2000 Morgan Kaufman Overheads for Computers as Components 33

GPS moving map needs z. Functionality: For automotive use. Show major roads and landmarks.

GPS moving map needs z. Functionality: For automotive use. Show major roads and landmarks. z. User interface: At least 400 x 600 pixel screen. Three buttons max. Pop-up menu. z. Performance: Map should scroll smoothly. No more than 1 sec power-up. Lock onto GPS within 15 seconds. z. Cost: $500 street price = approx. $100 © 2000 Morgan Overheads for Computers as cost of goods sold. Kaufman Components 34

GPS moving map needs, cont’d. z. Physical size/weight: Should fit in dashboard. z. Power

GPS moving map needs, cont’d. z. Physical size/weight: Should fit in dashboard. z. Power consumption: Current draw comparable to CD player (OR: Should run for 8 hours on four AA batteries). © 2000 Morgan Kaufman Overheads for Computers as Components 35

GPS moving map requirements form © 2000 Morgan Kaufman Overheads for Computers as Components

GPS moving map requirements form © 2000 Morgan Kaufman Overheads for Computers as Components 36

Specification z. A more precise description of the system: yshould not imply a particular

Specification z. A more precise description of the system: yshould not imply a particular architecture; yprovides input to the architecture design process. z. May include functional and non-functional elements. z. May be executable or may be in mathematical form for proofs. © 2000 Morgan Kaufman Overheads for Computers as Components 37

GPS specification z. Should include: y. What is received from GPS; ymap data; yuser

GPS specification z. Should include: y. What is received from GPS; ymap data; yuser interface; yoperations required to satisfy user requests; ybackground operations needed to keep the system running. © 2000 Morgan Kaufman Overheads for Computers as Components 38

Architecture design z. What major components go satisfying the specification? z. Hardware components: y.

Architecture design z. What major components go satisfying the specification? z. Hardware components: y. CPUs, peripherals, etc. z. Software components: ymajor programs and their operations. z. Must take into account functional and non -functional specifications. © 2000 Morgan Kaufman Overheads for Computers as Components 39

GPS moving map block diagram GPS receiver search engine database © 2000 Morgan Kaufman

GPS moving map block diagram GPS receiver search engine database © 2000 Morgan Kaufman renderer display user interface Overheads for Computers as Components 40

GPS moving map hardware architecture display frame buffer CPU GPS receiver memory © 2000

GPS moving map hardware architecture display frame buffer CPU GPS receiver memory © 2000 Morgan Kaufman panel I/O Overheads for Computers as Components 41

GPS moving map software architecture position © 2000 Morgan Kaufman database search renderer user

GPS moving map software architecture position © 2000 Morgan Kaufman database search renderer user interface timer Overheads for Computers as Components pixels 42

Designing hardware and software components z. Must spend time architecting the system before you

Designing hardware and software components z. Must spend time architecting the system before you start coding. z. Architecture components y. Some are ready-made, y. Some can be modified from existing designs y. Others must be designed from scratch. © 2000 Morgan Kaufman Overheads for Computers as Components 43

System integration z. Put together the components. y. Many bugs appear only at this

System integration z. Put together the components. y. Many bugs appear only at this stage. z. Have a plan for integrating components to uncover bugs quickly, test as much functionality as early as possible. © 2000 Morgan Kaufman Overheads for Computers as Components 44

What we learned today z. Embedded computers are all around us. y. Many systems

What we learned today z. Embedded computers are all around us. y. Many systems have complex embedded hardware and software. z. Embedded systems pose many design challenges: design time, deadlines, power, etc. z. Design methodologies help us manage the design process. © 2000 Morgan Kaufman Overheads for Computers as Components 45

Other Notes Course web-page is now established http: //ce. sharif. edu/courses/84 -85/1/ce 226/index. php

Other Notes Course web-page is now established http: //ce. sharif. edu/courses/84 -85/1/ce 226/index. php 2005 Design & Co-design of Embedded Systems 46