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

Embedded System Hardware - TU Dortmund

  • Upload
    others

  • View
    33

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Embedded System Hardware - TU Dortmund

fakultät für informatikinformatik 12

technische universität dortmund

Embedded System Hardware

Peter MarwedelInformatik 12TU Dortmund

Germany

2011/03/09

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: Embedded System Hardware - TU Dortmund

- 2 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Motivation

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

• Real-time behavior

• Efficiency- Energy

- …

• Security

• Reliability

• …

Page 3: Embedded System Hardware - TU Dortmund

- 3 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Structure of this course

2:Specification

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 Design

Numbers denote sequence of chapters

Page 4: Embedded System Hardware - TU Dortmund

- 4 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Embedded System Hardware

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

� cyber-physical systems

Page 5: Embedded System Hardware - TU Dortmund

- 5 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Many examples of such loops

� Heating

� Lights

� Engine control

� Power supply

� …

� Robots

Heating: www.masonsplumbing.co.uk/images/heating.jpgRobot:: Courtesy and ©: H.Ulbrich, F. Pfeiffer, TU München

Page 6: Embedded System Hardware - TU Dortmund

- 6 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Sensors

Processing of physical data starts with capturing this data.Sensors can be designed for virtually every physical andchemical quantity

� including weight, velocity, acceleration, electrical current, voltage, temperatures etc.

� chemical compounds.Many physical effects used for constructing sensors.Examples:

� law of induction (generation of voltages in an electric field),

� light-electric effects.Huge amount of sensors designed in recent years.

Page 7: Embedded System Hardware - TU Dortmund

- 7 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Example: Acceleration Sensor

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

Page 8: Embedded System Hardware - TU Dortmund

- 8 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 9 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

CMOS image sensors

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

Page 10: Embedded System Hardware - TU Dortmund

- 10 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Comparison CCD/CMOS sensors

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

LargerLowPower consumption

StandardSpecialTechnology

Low cost devices, SLR cameras

Compact camerasApplications

Can be largeLimitedSize

RandomSerialAccess

Logic elements on chipNo, no logic on chipSmart sensors

VLSI technologyOpticsTechnology optimized for

CMOSCCDProperty

Page 11: Embedded System Hardware - TU Dortmund

- 11 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Example: Biometrical Sensors

e.g.: Fingerprint sensor

© P. Marwedel, 2010

Page 12: Embedded System Hardware - TU Dortmund

- 12 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Artificial eyes

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

Page 13: Embedded System Hardware - TU Dortmund

- 13 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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

Page 14: Embedded System Hardware - TU Dortmund

- 14 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Artificial eyes (3)

� Translation into sound;resolution claimed to be good[http://www.seeingwithsound.com/etumble.htm]

Movie

Page 15: Embedded System Hardware - TU Dortmund

- 15 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 16 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

fakultät für informatikinformatik 12

technische universität dortmund

Discretization

Peter MarwedelInformatik 12TU Dortmund

Germany

Gra

phic

s: ©

Ale

xand

ra N

olte

, Ges

ine

Mar

wed

el, 2

003

Page 18: Embedded System Hardware - TU Dortmund

- 18 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 19 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 20 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Do we loose information due to sampling?

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

� approximation of signals by sine waves.

Page 21: Embedded System Hardware - TU Dortmund

- 21 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 22 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 23 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 24 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 25 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Aliasing

Periods of 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: Embedded System Hardware - TU Dortmund

- 26 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 27 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 28 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 29 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 30 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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: Embedded System Hardware - TU Dortmund

- 31 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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 32: Embedded System Hardware - TU Dortmund

- 32 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Assuming 0 ≤≤≤≤ h(t) ≤≤≤≤ Vref

VrefVref /2“00““01““10“

“11“

Vref /4 3Vref /4

Encoding of voltage intervals

h(t)

Page 33: Embedded System Hardware - TU Dortmund

- 33 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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 beabsent

Page 34: Embedded System Hardware - TU Dortmund

- 34 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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 35: Embedded System Hardware - TU Dortmund

- 35 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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 36: Embedded System Hardware - TU Dortmund

- 36 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Successive approximation (2)

1100

1000

1010

1011

t

V

Vx

V-

h(t)

Page 37: Embedded System Hardware - TU Dortmund

- 37 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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 38: Embedded System Hardware - TU Dortmund

- 38 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Quantization Noise

h(t)

w(t)

w(t)-h(t)

Assuming “rounding“(truncating) towards 0

Page 39: Embedded System Hardware - TU Dortmund

- 39 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Quantization Noise

h(t)

w(t)

h(t)-w(t)

Assuming “rounding“(truncating) towards 0

Page 40: Embedded System Hardware - TU Dortmund

- 40 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Quantization noise for audio signal

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 effectivevoltage signal effective

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

Additional noise for non-ideal converters Source: [http://www.beis.de/Elektronik/ DeltaSigma/DeltaSigma.html]

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

MATLAB demo

Page 41: Embedded System Hardware - TU Dortmund

- 41 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

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 effectivevoltage 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

Page 42: Embedded System Hardware - TU Dortmund

- 42 -technische universitätdortmund

fakultät fürinformatik

p.marwedel, informatik 12, 2010

TU Dortmund

Summary

Hardware in a loop

� Sensors

� Discretization

• Definition of signals

• Sample-and-hold circuits- Aliasing (and how to avoid it)

- Nyquist criterion

• A/D-converters- Flash-based

- Successive approximation

- Quantization noise