Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic...

13
Design of Embedded Systems An Introduction http://www.cs.lth.se/EDAN15 Krzysztof Kuchcinski [email protected] Department of Computer Science Lund Institute of Technology Sweden March 10, 2014 Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 1 / 37 Outline 1 Introduction 2 Course Organization 3 General introduction, definition of the field 4 Embedded Systems Examples 5 Embedded Systems Design Methodologies Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 2 / 37 Examples of Embedded Systems Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 3 / 37

Transcript of Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic...

Page 1: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Design of Embedded SystemsAn Introduction

http://www.cs.lth.se/EDAN15

Krzysztof [email protected]

Department of Computer ScienceLund Institute of Technology

Sweden

March 10, 2014

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 1 / 37

Outline

1 Introduction

2 Course Organization

3 General introduction, definition of the field

4 Embedded Systems Examples

5 Embedded Systems Design Methodologies

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 2 / 37

Examples of Embedded Systems

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 3 / 37

Page 2: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Examples of Embedded Systems (cont’d)

Anti-lock brakesAuto-focus camerasAutomatic teller machinesAutomatic toll systemsAutomatic transmissionAvionic systemsBattery chargersCamcordersCell phonesCell-phone base stationsCordless phonesCruise controlCurbside check-in systemsDigital camerasDisk drivesElectronic card readersElectronic instrumentsElectronic toys/gamesFactory controlFax machinesFingerprint identifiersHome security systemsLife-support systemsMedical testing systems

ModemsMPEG decodersNetwork cardsNetwork switches/routersOn-board navigationPagersPhotocopiersPoint-of-sale systemsPortable video gamesPrintersSatellite phonesScannersSmart ovens/dishwashersSpeech recognizersStereo systemsTeleconferencing systemsTelevisionsTemperature controllersTheft tracking systemsTV set-top boxesVCR’s, DVD playersVideo game consolesVideo phonesWashers and dryers

Source: Embedded Systems Design: A UnifiedHardware/Software Introduction, (c) 2000 Vahid/Givargis

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 4 / 37

Course Organization

Twelve lectures.Four lab assignments plus an introductory lab.

carried out in groups of two studentsuse special software and hardware (lab Neptunus)require preparationdeadline for lab reports (last lab assignment) May 31.

Group day time room1 Wed 8-10 Neptunus2 Wed 13-15 Neptunus3 Wed 15-17 Neptunus

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 5 / 37

Course Organization (cont’d)

Seminars15/05, 15:15 (E:2116) and 16/05, 8:15 (E:2116)22/05, 15:15 (E:2116) and 23/05, 8:15 (E:2116)

Obligatory examinations2 June 2014 at 8-13, Sparat:A-B27 August 2014 at 8-13, MA08-AJanuary 2015 ...

Books:Peter Marwedel, Embedded System Design, 2nd Edition, Springer,2011 (ISBN: 978-94-007-0256-1).

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 6 / 37

Page 3: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

LecturesPreliminary Schedule

Date Content14-03-17 Introduction, motivation, etc.14-03-21 Design methodology (HW/SW co-design, etc)14-03-24 Specification and programming of14-03-28 Embedded Systems14-01-31 Computational models14-04-04 Design representations14-04-07 System partitioning14-04-11 Allocation, assignment14-05-05 and scheduling14-04-09 Communication synthesis14-05-12 Testability14-05-16 Low-power design

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 7 / 37

Embedded Systems

“A device that includes a programmable computer but is notitself a general-purpose computer”

Execution deadlines,Power consumption constraints,:

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 8 / 37

Embedded Systems (cont’d)

Computing systems embedded within electronic devicesHard to define. Nearly any computing system other than adesktop computerBillions of units produced yearly, versus millions of desktop unitsPerhaps 50 per household and per automobile

Source: Embedded Systems Design: A UnifiedHardware/Software Introduction, (c) 2000 Vahid/Givargis

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 9 / 37

Page 4: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Embedded Systems (cont’d)

Non User-Programmable.Based on programmable components (e.g., Micro-controllers,DSP’s...) but often contain application specific hardware (IC’s,ASIC’s).Reactive Real-Time Systems:

React to external environment,Maintain permanent interaction,Ideally never terminate,Are subject to external timing constraints (real-time).

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 10 / 37

Characteristics Embedded Systems

Sophisticated functionality.Real-time operation.Low manufacturing cost.Low power.Designed to tight deadlines by small teams."Resource conscious" vs. "Unlimited resources" programming

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 11 / 37

A Single Processor Embedded System

Source: W. Wolf, Computers as Components:Principles of Embedded Computing Systems Design

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 12 / 37

Page 5: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

SoC Embedded System

Assembly of "prefabricatedcomponent" often purchasedfrom external vendors ("IP")

"black box" hierarchyDesign & Verification at theSystem level

rather than the logic levelInterface andcommunication

Great Importance of Software

Source: Alberto Sangiovanni-Vincentelli, 35th DAC

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 13 / 37

A Digital Camera Example

Source: F. Vahid and T. Givargis, Embedded System Design: A Unified Hardware Software Approach

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 14 / 37

Real-time gas turbine testing system

MI-2 helicopter engine "Minicomputer" 8kB RAMcassette tape

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 15 / 37

Page 6: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

TELEX-I and TELEX-II systems

PDP-11 PDP-11

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 16 / 37

WITAS project

Autonomous system.Real-time system.Image processing.Mission planning.Incorporation of GISsystems.Interface with groundoperator....

http://www.ida.liu.se/ext/witas

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 17 / 37

Typical Hardware Components of DSP System

Component class Implements Compiler SpecificationDSP processor Low data-rate DSP (Retargetable) Assembly

Slow control loops code generator CAppl. Spec. alg. High level synth.

Microcontroller User interface C compiler CSlow control loops

Hardware accelerator High data-rate DSP High level synth. C, VHDLRT level synth. Verilog

Communication Internal & external Memory mgmt. Data-sheetsblocks and communication (A)synchronousmemory Storage & buffering interface synth.Others Usually FSMD’s RT level synth. VHDL

- clock generators Asynchronous- DMA blocks synth.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 18 / 37

Page 7: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Importance of Embedded System DesignMethodologies

Hardware complexity.Heterogeneous systems containing hardware (both digital andanalog) and software.Heterogeneous components (CPU’s, DSP’s, ASIC’s, buses,point-to-point links, etc.).Heterogeneous requirements - performance, cost, powerconsumption, etc.System-on-chip.Shorter design cycles required by time-to-market constraints....

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 19 / 37

Design Complexity and Designer Productivity Gap

xxx

xxx

x

21%/Yr. Productivity growth

rate

x

58%/Yr. Complexity growth rate

1

10

100

1,000

10,000

100,000

1,000,000

10,000,000

1998

10

100

1,000

10,000

100,000

1,000,000

10,000,000

100,000,000

Log

ic T

ransis

tors

/Ch

ip (

K)

Tra

nsis

tor/

Sta

ff-M

on

th

2003

Source: Bryan Preas, Xerox PARC, 35th DAC

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 20 / 37

Flexibility and Energy Efficiency

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 21 / 37

Page 8: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Flexibility and Energy Efficiency

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 21 / 37

Flexibility and Energy Efficiency

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 21 / 37

Design Domains and Abstraction Levels

Behavioural

Domain

Structural

Domain

Physical

Domain

Transistor layout

Standard cell/subcell

Macrocell, chip

Board

Transistor

Gate, flip-flop

ALU, reg., MUX

CPU, memory, busAlgorithm

RT specification

Boolean eq.

Transistor function

System level

RTL

Logic level

Circuit level

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 22 / 37

Page 9: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Design Domains

behavioral representations - describe only circuit’s function, forexample

if clock=high then counter:= counter+1

structural representations - describe the components and theirinterconnections, for example

NAND

NAND

NAND

My

Cell

ab

c

d

e

Out

physical representations - it can describe either a geometricallayout or a topological constraint.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 23 / 37

Software vs. Hardware Designshort summary

Softwareflexibility,reconfigurability, easy update, etc.,complex functionality,cost,...

Hardwarespeed,power consumption,cost in large volumes,...

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 24 / 37

Design of Embedded Systems

Need to be done using high-level specification, programming andhardware description languages - not assembly languages andgate/transistor level design.Requires efficient design space exploration andsynthesis/compilation tools.Different design requirements has to be taken into account, e.g.,cost, performance, testability, quality of service, powerconsumption.Multi-language design framework.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 25 / 37

Page 10: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Importance of High-Level Design Methods

System Verification Processing Speeds

System implementation Processing time (s/frame)Behavioral model 1 200 (20 min/frame)RTL model 144 000 (1.6 days/frame)Gate model 228 000 (2.6 days/frame)Gate model on hardware accelerator 1 200Rapid prototype 0.5Target hardware 0.05

Source: Paul Clemente, Ron Crevier, Peter Runstadler "RTL andBehavioral Synthesis, A Case Study", VHDL Times, vol. 5, no. 1.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 26 / 37

General Design Flow

Specify-Explore-Refine

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 27 / 37

Specification and Programming

Specification languages, such as UML, SDL.Programming languages, such as C, C++, Java, Esterel, assemblylanguages.Hardware description languages, such as VHDL, Verilog,SystemC.

Example: combining SystemC and C++ gives a unified simulationenvironment for hardware and software.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 28 / 37

Page 11: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Hardware Description Languages

Cover several levels of design abstraction as well as behavioraland structural description domain.Contain typical features of programming languages, such as datatypes and program statements.Special features:

time concept,structure description,parallelism.

VHDL (IEEE standard), Verilog, SystemC.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 29 / 37

Design Representations(Computational Model)

Used to represent/model digital systems under design.Generated by a compiler from system specification or codeddirectly in the model.Represent the semantics, structure and timing of the system.Usually based on some kind of annotated graph representation.Used internally by design automation systems or by themodeler/designer.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 30 / 37

Design – Synthesis

Software is translated into target code for a processor.Real-time operating system might be used.Hardware synthesis – translation of a behavioral representation ofa design into a structural one.Communication synthesis – generates hardware and softwarewhich interconnects system components.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 31 / 37

Page 12: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Hardware Synthesis Levels

System level – accepts as an input specification in a form ofcommunicating concurrent processes. The synthesis task is togenerate the general system structure defined by processors,ASIC’s, buses, etc.High level – the input specification is given as a behavioral leveldescription of an algorithm describing the functionality of a designand generates implementation at RT-level. Basic synthesis stepsare scheduling, allocation and binding.Logic level – it can be divided into combinational and sequentiallogic synthesis.Physical design – it accepts a gate-level netlist and produces finalimplementation of the design in a given technology.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 32 / 37

Hardware/Software Co-design enablingtechnologies

Software

Microprocessor + code

Hardware

VLSI, ASIC, PLD,...

Assembler, linkers(1950�s, 1960�s)

Machine instructions

Compilers(1960�s, 1970�s)

Assembly instructions

Logic synthesis(1970�s, 1980�s)

Logic gates

RT synthesis(1980�s, 1990�s)

Logic equations/FSM�s

Behavioral synthesis(1990�s)

Register transfer

Sequential program code (e.g., C, VHDL)

Source: F. Vahid and T. Givargis, Embedded System Design: A Unified Hardware Software Approach

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 33 / 37

Discrete Cosine TransformPartial Design Space

0

1 0

2 0

3 0

4 0

Cloc k

st e ps

M ul

1

M ul

2

M ul

3

M ul

4

Add 4

Add 2

Add 4

Add 3

Add 2

Add 1

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 34 / 37

Page 13: Design of Embedded Systems (1… · Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders ... 14-03-21 Design methodology

Design Space Exploration

0

1 0

2 0

3 0

4 0

Sp

ee

d

Po

we

r

Co

st

De

sig

n t

ime

CPU

CPU

DSP

ASIC

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 35 / 37

Time-to-market constraint

Market window

Profit need time for newproduct development,the biggest profit is inthe market window time,missing the marketwindow can be costly

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 36 / 37

Summary

Embedded systems are important class of electronic systemswhich can be found everywhere,Combine hardware and software solutions,Cover several engineering and research areas:

microelectronics,real-time systems,software development,etc.

Need careful design which optimizes different design parameters.

Kris Kuchcinski (LTH) Design of Embedded Systems March 10, 2014 37 / 37