Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware...

43
technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19 Graphics: © Alexandra Nolte, Gesine Marwedel, 2003 These slides use Microsoft clip arts. Microsoft copyright restrictions apply.

Transcript of Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware...

Page 1: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

technische universität dortmund

fakultät für informatikinformatik 12

Embedded System Hardware

Peter MarwedelInformatik 12TU Dortmund

Germany

2011/11/19

Gra

phic

s: ©

Ale

xand

ra N

olte

, Ges

ine

Mar

wed

el, 2

003

These slides use Microsoft clip arts. Microsoft copyright restrictions apply.

Page 2: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 2 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Motivation

The need to consider both hardware andsoftware is one of the characteristics of embedded/cyber-physical systems. Reasons:

• Real-time behavior

• Efficiency

- Energy

- …

• Security

• Reliability

• …

Page 3: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 3 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Structure of this course

2: Specification & Modeling

3: ES-hardware

4: System software (RTOS, middleware, …)

8: Test *

5: Evaluation & Validation (energy, cost, performance, …)

7: Optimization

6: Application mapping

App

licat

ion

Kno

wle

dge Design

repository

Generic loop: tool chains differ in the number and type of iterationsNumbers denote sequence of chapters

* Could be integrated into loop; not included in the current course

Design

Page 4: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 4 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Embedded System Hardware

Embedded system hardware is frequently used in a loop (“hardware in a loop“):

cyber-physical systems

Page 5: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 5 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Many examples of such loops

Heating

Lights

Engine control

Power supply

Robots

© P. Marwedel, 2011

Page 6: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 6 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Sensors

Processing of physical data starts with capturingthis data. Sensors can be designed for virtually every physical and chemical quantity, including

weight, velocity, acceleration, electrical current,voltage, temperatures, and

chemical compounds.

Many physical effects used for constructing sensors.

Examples:

law of induction (generat. of voltages in an electric field),

light-electric effects.

Huge amount of sensors designed in recent years.

Page 7: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 7 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Example: Acceleration Sensor

Courtesy & ©: S. Bütgenbach, TU Braunschweig

Page 8: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 8 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Charge-coupled devices (CCD) image sensors

Based on charge transfer to next pixel cellBased on charge transfer to next pixel cell

Corresponding to “bucket brigade device” (German: “Eimerkettenschaltung”)

Page 9: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 9 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

CMOS image sensors

Based on standard production process for CMOS chips, allows integration with other components.

Page 10: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 10 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Comparison CCD/CMOS sensors

See also B. Diericks: CMOS image sensor concepts. Photonics West 2000 Short course (Web)

Property CCD CMOS

Technology optimized for

Optics VLSI technology

Technology Special Standard

Smart sensors No, no logic on chip Logic elements on chip

Access Serial Random

Size Limited Can be large

Power consumption Low Larger

Applications Compact cameras Low cost devices, SLR cameras

Page 11: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 11 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Example: Biometrical Sensors

e.g.: Fingerprint sensor

© P. Marwedel, 2010

Page 12: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 12 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Artificial eyes

© Dobelle Institute(was at www.dobelle.com)

Page 13: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 13 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Artificial eyes (2)

He looks hale, hearty, and healthy — except for the wires. …. From a distance the wires look like long ponytails.

© Dobelle Institute

Show movie from www.dobelle.com (e.g. blind person driving a car)

Page 14: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 14 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Artificial eyes (3)

Translation into sound[http://www.seeingwithsound.com/etumble.htm]

Movie

Page 15: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 15 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Other sensors

Rain sensors for wiper control(“Sensors multiply like rabbits“ [ITT automotive])

Pressure sensors

Proximity sensors

Engine control sensors

Hall effect sensors

Page 16: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 16 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Signals

Sensors generate signals

Definition: a signal s is a mapping

from the time domain DT to a value domain DV :

s : DT DV

DT : continuous or discrete time domain

DV : continuous or discrete value domain.

Page 17: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

technische universität dortmund

fakultät für informatikinformatik 12

Discretization

Peter MarwedelInformatik 12TU Dortmund

Germany

Page 18: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 18 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Discretization of time

Digital computers require discrete sequences of physical values

s : DT DV

Discrete time domain

Sample-and-hold circuits

Page 19: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 19 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Sample-and-hold circuits

h(t) is a sequence of values or a mapping ℤ ℝ

Clocked transistor + capacitor;

Capacitor stores sequence values

e(t) is a mapping ℝ ℝ

Page 20: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 20 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Do we lose information due to sampling?

Would we be able to reconstruct input signals from the sampled signals?

approximation of signals by sine waves.

Page 21: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 21 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Approximation of a square wave (1)

k

K

kK p

t

kte

2sin

4)('

,..5,3,1

K=1

K=3

Target: square wavewith period p1=4

with k: pk= p1/k: periods of contributions to e’

Page 22: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 22 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Approximation of a square wave (2)

K=7

K=5

k

t

kte

K

kK /4

2sin

4)('

,..5,3,1

Page 23: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 23 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Approximation of a square wave (3)

K=11

K=9

K=11

Applet at © http://www.jhu.edu/~signals/fourier2/index.html

k

t

kte

K

kK /4

2sin

4)('

,..5,3,1

Page 24: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 24 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Linear transformations

Let e1(t) and e2(t) be signals

Definition: A transformation Tr of signals is linear iff

)()()( 2121 eTreTreeTr

In the following, we will consider linear transformations.

We consider sums of sine waves instead of the original signals.

Page 25: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 25 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Aliasing

Periods of p=8,4,1Indistinguishable if sampled at integer times, ps=1

1

2sin5.0

4

2sin5.0

8

2sin)(4

tttte

4

2sin5.0

8

2sin)(3

ttte

Matlab demo

Page 26: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 26 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Aliasing (2)

Reconstruction impossible, if not sampling frequently enough

How frequently do we have to sample?

Nyquist criterion (sampling theory):

Aliasing can be avoided if we restrict the frequencies of the incoming signal to less than half of the sampling rate.

ps < ½ pN where pN is the period of the “fastest” sine wave

or fs > 2 fN where fN is the frequency of the “fastest” sine wave

fN is called the Nyquist frequency, fs is the sampling rate.

See e.g. [Oppenheim/Schafer, 2009]

Page 27: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 27 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Anti-aliasing filter

A filter is needed to remove high frequencies

fs

)(

)(

te

tg Ideal filter

fs /2

e4(t) changed into e3(t)

Realizablefilter

Page 28: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 28 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Examples of Aliasing in computer graphics

Original

http://en.wikipedia.org/wiki/Image:Moire_pattern_of_bricks_small.jpg

Sub-sampled,no filtering

Page 29: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 29 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Examples of Aliasing in computer graphics (2)

Original (pdf screen copy)

http://www.niirs10.com/Resources/Reference Documents/Accuracy in Digital Image Processing.pdf

Sub-sampled, no filtering

Filtered & sub-sampled

Impact of rasterization

Page 30: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 30 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Discretization of values: A/D-converters

Digital computers require digital form of physical values

s: DT DV

Discrete value domain

A/D-conversion; many methods with different speeds.

Page 31: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 31 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

No decoding of h(t) > Vref

VrefVref /2“00“

“01“

“10“

“11“

Vref /4 3Vref /4

Encoding of voltage intervals

h(t)

Page 32: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 32 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Resolution

Resolution (in bits): number of bits produced

Resolution Q (in volts): difference between two input voltages causing the output to be incremented by 1

n

VQ FSR with

Q: resolution in volts per stepVFSR: difference between largest

and smallest voltagen: number of voltage intervals

Example:Q = Vref /4 for the previous slide, assuming * to be absent

Page 33: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 33 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Resolution and speed of Flash A/D-converter

Parallel comparison with reference voltage

Speed: O(1)

Hardware complexity: O(n)

Applications: e.g. in video processing

Page 34: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 34 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Higher resolution:Successive approximation

Key idea: binary search:Set MSB='1'if too large: reset MSBSet MSB-1='1'if too large: reset MSB-1

Speed: O(log2(n))Hardware complexity: O(log2(n))with n= # of distinguishedvoltage levels;slow, but high precision possible.

h(t)

w(t)V-

Page 35: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 35 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Successive approximation (2)

1100

1000

1010

1011

t

V

Vx

V-

h(t)

Page 36: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 36 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Application areas for flash and successive approximation converters

[Gielen et al., DAC 2003]

Effective number of bits at bandwidth

(using single bit D/A-converters;common for high quality audio equipments)[http://www.beis.de/Elektronik/DeltaSigma/DeltaSigma.html]

(Pipelined flash converters)

(used in multimeters)

Movie IEEE tv

Page 37: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 37 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Quantization Noise

h(t)

w(t)

w(t)-h(t)

Assuming “rounding“ (truncating) towards 0

Page 38: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 38 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Quantization Noise

h(t)

w(t)

h(t)-w(t)

Assuming “rounding“ (truncating) towards 0

MATLAB demo

Page 39: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 39 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Signal to noise ratio

Signal to noise for ideal n-bit converter : n * 6.02 + 1.76 [dB]e.g. 98.1 db for 16-bit converter, ~ 160 db for 24-bit converter

voltage noise effective

voltage signal effective log 20 [db] (SNR) ratio noise to signal 10

Additional noise for non-ideal converters

e.g.: 20 log10(2)=6.02 decibels

MATLAB demo

Page 40: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 40 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Summary

Hardware in a loop

Sensors

Discretization

• Sample-and-hold circuits

- Aliasing (and how to avoid it)

- Nyquist criterion

• A/D-converters

- Quantization noise

Page 41: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 41 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

SPARE SLIDES

Page 42: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 42 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Flash A/D converter

Encodes input number of most significant ‘1’ as an unsigned number, e.g.“1111” -> “100”,“0111” -> “011”,“0011” -> “010”,“0001” -> “001”,“0000” -> “000”(Priority encoder).

* Frequently, the case h(t) > Vref would not be decoded

*

Page 43: Technische universität dortmund fakultät für informatik informatik 12 Embedded System Hardware Peter Marwedel Informatik 12 TU Dortmund Germany 2011/11/19.

- 43 -technische universitätdortmund

fakultät für informatik

P.Marwedel, Informatik 12, 2011

TU Dortmund

Quantization noise for audio signal

Source: [http://www.beis.de/Elektronik/DeltaSigma/DeltaSigma.html]