<<

technische universität fakultät für informatik informatik 12

Embedded System Hardware

Peter Marwedel Informatik 12 TU Dortmund TU Dortmund Structure of this course

New 3: Embedded clustering e g System HW d e l w 5: Scheduling, o n HW/SW-Partitioning,

K 8: Testing 2: Specifications

n Applications to MP- o i t Mapping a c i l

p 4: Standard p

A Software, Real- 7: Optimization of 6: Evaluation Time Operating Embedded Systems Systems

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 2 - TU Dortmund Embedded System Hardware

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

actuators

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 3 - TU Dortmund Many examples of such loops

. Heating . Lights . Engine control . Power supply . … . Robots

Heating: www.masonsplumbing.co.uk/images/heating.jpg Robot:: Courtesy and ©: H.Ulbrich, F. Pfeiffer, TU München technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 4 - TU Dortmund Sensors

Processing of physical data starts with capturing this data. Sensors can be designed for virtually every physical and chemical 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.

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 5 - TU Dortmund Example: Acceleration Sensor

Courtesy & ©: S. Bütgenbach, TU

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 6 - TU Dortmund Charge-coupled devices (CCD) image sensors

Based on charge transfer to next pixel cell

Corresponding to “bucket brigade device” (German: http://www.schulen.regensburg. de/hhgs/klassen/2001a/feuerwehr/k “Eimerkettenschaltung”) ette2.jpg

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 7 - TU Dortmund CMOS image sensors

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

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 8 - TU Dortmund Comparison CCD/CMOS sensors

CMOS: low cost devices + digital SLR cameras (due to large size, …)

CCD: medium to high end non-SLR cameras

Source: B. Diericks: CMOS image sensor concepts. Photonics West 2000 Short course (Web) technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 9 - TU Dortmund Example: Biometrical Sensors

Example: Fingerprint sensor (© Siemens, VDE):

Matrix of 256 x 256 elem. Voltage ~ distance. Resistance also computed. No fooling by photos and wax copies. Carbon dust?

Integrated into ID mouse. technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 10 - TU Dortmund Artificial eyes

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

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 11 - TU Dortmund Artificial eyes (2)

He looks hale, hearty, and healthy — except for the wires. They run from the laptops into the signal processors, then out again and across the table and up into the air, flanking his face like curtains before disappearing into holes drilled through his skull. Since his hair is dark and the wires are black, it's hard to see © Dobelle Institute the actual points of entry. From a distance the wires look like long ponytails.

 technische universität fakultät für p.marwedel, Show movie from www.dobelle.com dortmund informatik informatik 12, 2008 (e.g. blind person driving a car) - 12 - 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

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 13 - technische universität fakultät für informatik dortmund informatik 12

Discretization TU Dortmund Discretization of time

→ Ve is a mapping ℝ ℝ

In this course: restriction to digital information processing; Known digital computers can only process discrete time series.  Discrete time; sample and hold-devices. Ideally: width of clock pulse -> 0 → Vx is a sequence of values or a mapping ℤ ℝ

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 15 - TU Dortmund Aliasing

Impossible to reconstruct fast signals after slow sampling: multiple fast signals share same sampled sequence; Example: Signal: 5.6 Hz; Sampling: 9 Hz

1.5

1

0.5

0

-0.5

-1 ~1 s -1.5

[http://www.cise.ufl.edu/~prabhat/Teaching/cis6930-f04/comp1.ppt] More info at end of chapter. technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 16 - TU Dortmund Discretization of values: A/D-converters 1. Flash A/D converter (1) Digital computers require digital form of physical values A/D-conversion; many methods with different speeds. Example: 1. 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).

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 17 - TU Dortmund Discretization of values: A/D-converters 1. Flash A/D converter (2)

Parallel comparison with reference voltage Speed: O(1) Hardware complexity: O(n) with n= # of distinguished voltage levels Applications: e.g. in video processing

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 18 - TU Dortmund Discretization of values 2. Successive approximation

Key idea: binary search: Speed: O(ld(n)) Set MSB='1' Hardware complexity: O(ld(n)) if too large: reset MSB with n= # of distinguished Set MSB-1='1' voltage levels; if too large: reset MSB-1 slow, but high precision possible.

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 19 - TU Dortmund Successive approximation (2)

V

1100 1011 Vx 1010 1000

V-

t

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 20 - TU Dortmund Application areas for flash and successive approximation converters Effective number of bits at bandwidth

(used in multimeters)

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

(Pipelined flash converters)

[Gielen et al., DAC 2003] technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 21 - TU Dortmund Quantization Noise

N = (approximated - real signal) called quantization noise. Example: quantization noise for sine wave

* [http://www.beis.de/Elektronik/DeltaSigma/DeltaSigma.html] technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 22 - TU Dortmund Quantization noise for audio signal

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

 effective signal voltage  signal to noise ratio (SNR) [db] = 20 log    effective noise voltage  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

Additional noise for non-ideal converters Source: [http://www.beis.de/Elektronik/ DeltaSigma/DeltaSigma.html] technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 23 - technische universität fakultät für informatik dortmund informatik 12

Information Processing

Peter Marwedel Informatik 12 TU Dortmund Germany TU Dortmund Embedded System Hardware

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

actuators

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 25 - TU Dortmund Processing units

Need for efficiency (power + energy):

Why worry about energy and power?

„Power is considered as the most important constraint in embedded systems“ [in: L. Eggermont (ed): Embedded Systems Roadmap 2002, STW]

Energy consumption by IT is the key concern of green computing initiatives (embedded computing leading the way)

http://www.esa.int/images/earth,4.jpg

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 26 - TU Dortmund Importance of Energy Efficiency 7 0 0 2

, C E M I

, s n p i a l i h M

P e

: D y

s o e g t r u u H o C ©

poor design techniques IPE=Inherent power efficiency AmI=Ambient Intelligence

technische universität fakultät für  p.marwedel, Efficient sdoorfttmwuandre design needed, oitnhfoerrmwaitiske, the pricinefo rfmoar tisk o1f2t,w 2a0r0e8 flexibility cannot be paid. - 27 - TU Dortmund Application Specific Circuits (ASICS) or Full Custom Circuits

Custom-designed circuits necessary .if ultimate speed or .energy efficiency is the goal and .large numbers can be sold. Approach suffers from .long design times, .lack of flexibility (changing standards) and .high costs (e.g. Mill. $ mask costs).

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 28 - TU Dortmund Mask cost for specialized HW becomes very expensive

Trend towards implementation in Software

HW synthesis not covered in this course.

[http://www.molecularimprints.com/Technology/ tech_articles/MII_COO_NIST_2001.PDF9]

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 29 - TU Dortmund Microcontrollers - MHS 80C51 as an example - F e a

. t 8-bit CPU optimised for control applications u r

. Extensive Boolean processing capabilities e s

. 64 k Program Memory address space f o

. 64 k Data Memory address space r

. 4 k bytes of on chip Program Memory E m

. 128 bytes of on chip data RAM b e

. 32 bi-directional and individually addressable I/O lines d d

. Two 16-bit timers/counters e d

. Full duplex UART S

. 6 sources/5-vector interrupt structure with 2 priority levels y s t

. On chip clock oscillators e m

. Very popular CPU with many different variations s

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 Moved from 3.4.3.4 - 30 - TU Dortmund Key requirements for processors

1. Energy/power-efficiency

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 31 - TU Dortmund Power and energy are related to each other

E = P dt P ∫

EE'

t In many cases, faster execution also means less energy, but the opposite may be true if power has to be increased to allow faster execution.

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 32 - TU Dortmund Low Power vs. Low Energy Consumption

. Minimizing the power consumption is important for • the design of the power supply • the design of voltage regulators • the dimensioning of interconnect • short term cooling . Minimizing the energy consumption is important due to • restricted availability of energy (mobile systems) • limited battery capacities (only slowly improving) • very high costs of energy (solar panels, in space) • cooling • high costs • limited space • dependability • long lifetimes, low temperatures

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 33 - TU Dortmund Power density continues to get worse

Nuclear reactor Prescott: 90 W/cm², 90 nm [c‘t 4/2004]

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 34 - TU Dortmund Surpassed hot (kitchen) plate …? Why not use it? l m t h . g g e _ y r f / r o m u h / u s t h ~ / w t . u d e . u k c n . s y h p . w w w / / : p t t h

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 35 - TU Dortmund

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 36 - TU Dortmund Need to consider CPU & System Power

Mobile PC (notebook) Mobile PC (notebook) Thermal Design (TDP) System Power Average System Power

Other Other 600/500 MHz uP 13% 600/500 MHz uP 37% 13% 13% Power Supply Power Supply 10% 10%

Memory+Graphics LCD 10" 12% Memory+Graphics 30% 15% HDD LCD 10" 9% HDD 19% 19%

Note: Based on Actual Measurements Multiple Platform CPU Dominates Thermal Components Comprise Design Power Average Power [Courtesy: N. Dutt; Source: V. Tiwari] technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 37 - TU Dortmund Energy consumption in mobile devices

[O. Vargas (Infineon Technologies): Minimum power consumption in mobile-phone memory subsystems; Pennwell Portable Design - September 2005;] Thanks to Thorsten Koch (Nokia/ Univ. Dortmund) for providing this source.

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 38 - TU Dortmund Dynamic power management (DPM)

Example: STRONGARM SA1100

RUN: operational 400mW IDLE: a sw routine may RUN s stop the CPU when not in µ 0 r 9 e w use, while monitoring 10µs o P lt l u a fa n interrupts 160ms ig SLEEP: Shutdown of on- 10µs s chip activity 90µs IDLE Power fault SLEEP signal 50mW 160µW

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 39 - TU Dortmund Fundamentals of dynamic voltage scaling (DVS)

Power consumption of CMOS Delay for CMOS circuits: circuits (ignoring leakage): P = α C V 2 f with V L dd τ = k C dd with α L ( − ) 2 : switching activity Vdd Vt C : load capacitance L Vt :threshhold voltage V : supply voltage < dd (Vt than Vdd ) f : clock frequency

Decreasing Vdd reduces P quadratically, while the run-time of algorithms is only linearly increased E=P x t decreases linearly

(ignoring the effects of the memory system and Vt) technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 40 - TU Dortmund Voltage scaling: Example

[Courtesy, Yasuura, 2000] Vdd

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 41 - TU Dortmund Variable-voltage/frequency example: INTEL Xscale

OS should schedule distribution of the energy budget. e t i S

b e W

s ’ l e t n I

m o r F

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 42 - TU Dortmund Summary

Hardware in a loop . Sensors . Discretization • Sample-and-hold circuits • A/D-converters . Information processing • Importance of energy efficiency • Special purpose HW very expensive • Energy efficiency of processors • .. . D/A converters . Actuators

technische universität fakultät für  p.marwedel, dortmund informatik informatik 12, 2008 - 43 -