- 1 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design...

39
- 1 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems

Transcript of - 1 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design...

Page 1: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 1 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Simplified design flowfor embedded systems

Page 2: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 2 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Embedded System Hardware

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

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

actuators

Page 3: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 3 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Many examples of such loops

Heating Lights Engine control Power supply … Robots

Heating Lights Engine control Power supply … Robots

Show robot movie

Page 4: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 4 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität 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.

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.

Page 5: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 5 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Example: Acceleration Sensor

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

Page 6: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 6 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Charge-coupled devices (CCD) image sensors

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

Page 7: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 7 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

CMOS image sensors

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

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

Page 8: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 8 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Comparison CCD/CMOS sensors

Sou

rce:

B. D

ieric

ks: C

MO

S im

age

sens

or c

once

pts.

P

hoto

nics

Wes

t 200

0 S

hort

cou

rse

(Web

)

Page 9: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 9 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Example: Biometrical Sensors

Example: Fingerprint sensor (© Siemens, VDE):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.

Page 10: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 10 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Artificial eyes

© Dobelle Institute(www.dobelle.com)

Page 11: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 11 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität 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 the actual points of entry. From a distance the wires look like long ponytails.

© Dobelle Institute(www.dobelle.com)

Page 12: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 12 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Other sensors

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

Pressure sensors Proximity sensors Engine control sensors Hall effect sensors

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

Pressure sensors Proximity sensors Engine control sensors Hall effect sensors

Page 13: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 13 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Discretization of time

Vx is a sequence of values or a mapping ℤ ℝ Vx is a sequence of values or 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

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

Ve is a mapping ℝ ℝVe is a mapping ℝ ℝ

Page 14: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 14 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität 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.5

More info at end of chapter.[http://www.cise.ufl.edu/~prabhat/Teaching/cis6930-f04/comp1.ppt]

Page 15: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 15 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Discretization of values: A/D-converters1. Flash A/D converter

Parallel comparison with reference voltage

Speed: O(1)

Hardware complexity: O(n)

with n= # of distin-guished voltage levels

Parallel comparison with reference voltage

Speed: O(1)

Hardware complexity: O(n)

with n= # of distin-guished voltage levels

Digital computers require digital form of physical valuesA/D-conversion; many methods with different speeds.Example: 1. Flash A/D converter:

Digital computers require digital form of physical valuesA/D-conversion; many methods with different speeds.Example: 1. Flash A/D converter:

Page 16: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 16 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Discretization of values2. Successive approximation

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

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

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

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

Page 17: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 17 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Successive approximation (2)

1100

1000

1010

1011

t

V

Vx

V-

Page 18: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 18 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität 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)

Page 19: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 19 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Quantization Noise

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

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

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

Page 20: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 20 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität 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 effective

voltage 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

Page 21: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 21 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Communication

Page 22: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 22 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Communication:Hierarchy

Inverse relation between volume and urgency quite common: Inverse relation between volume and urgency quite common:

Sensor/actuator busses

Page 23: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 23 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Communication- Requirements -

Real-time behavior

Efficient, economical(e.g. centralized power supply)

Appropriate bandwidth and communication delay

Robustness

Fault tolerance

Maintainability

Diagnosability

Security

Safety

Real-time behavior

Efficient, economical(e.g. centralized power supply)

Appropriate bandwidth and communication delay

Robustness

Fault tolerance

Maintainability

Diagnosability

Security

Safety

Page 24: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 24 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Basic techniques:Electrical robustness

Single-ended vs. differential signalsSingle-ended vs. differential signals

Voltage at input of Op-Amp positive '1'; otherwise '0'

Combined with twisted pairs; Most noise added to both wires.

ground

Local groundLocal ground

Page 25: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 25 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Evaluation

Advantages: Subtraction removes most of the noise Changes of voltage levels have no effect Reduced importance of ground wiring Higher speed

Disadvantages: Requires negative voltages Increased number of wires and connectors

Applications: USB, FireWire, ISDN Ethernet (STP/UTP CAT 5 cables) differential SCSI High-quality analog audio signals

Advantages: Subtraction removes most of the noise Changes of voltage levels have no effect Reduced importance of ground wiring Higher speed

Disadvantages: Requires negative voltages Increased number of wires and connectors

Applications: USB, FireWire, ISDN Ethernet (STP/UTP CAT 5 cables) differential SCSI High-quality analog audio signals

Page 26: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 26 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Real-time behavior

Carrier-sense multiple-access/collision-detection (CSMA/CD, Standard Ethernet) no guaranteed response time.

Alternatives: token rings, token bussesCarrier-sense multiple-access/collision-avoidance

(CSMA/CA)• WLAN techniques with request preceding transmission• Each partner gets an ID (priority). After each bus transfer,

all partners try setting their ID on the bus; partners detecting higher ID disconnect themselves from the bus. Highest priority partner gets guaranteed response time; others only if they are given a chance.

Carrier-sense multiple-access/collision-detection (CSMA/CD, Standard Ethernet) no guaranteed response time.

Alternatives: token rings, token bussesCarrier-sense multiple-access/collision-avoidance

(CSMA/CA)• WLAN techniques with request preceding transmission• Each partner gets an ID (priority). After each bus transfer,

all partners try setting their ID on the bus; partners detecting higher ID disconnect themselves from the bus. Highest priority partner gets guaranteed response time; others only if they are given a chance.

Page 27: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 27 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Other basic techniques

Fault tolerance:error detecting and error correcting bus protocols

Privacy:encryption, virtually private networks

Fault tolerance:error detecting and error correcting bus protocols

Privacy:encryption, virtually private networks

Page 28: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 28 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Sensor/actuator busses

1. Sensor/actuator busses: Real-time behavior very important; different techniques:

1. Sensor/actuator busses: Real-time behavior very important; different techniques:

Many wires less wires expensive & flexible

Page 29: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 29 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Field busses: Profibus

More powerful/expensive than sensor interfaces; mostly serial. Emphasis on transmission of small number of bytes.

Examples:

1.Process Field Bus (Profibus) Designed for factory and process automation.Focus on safety; comprehensive protocol mechanisms.Claiming 20% market share for field busses.Token passing.≦93.75 kbit/s (1200 m);1500 kbits/s (200m);12 Mbit/s (100m)Integration with Ethernet via Profinet.

More powerful/expensive than sensor interfaces; mostly serial. Emphasis on transmission of small number of bytes.

Examples:

1.Process Field Bus (Profibus) Designed for factory and process automation.Focus on safety; comprehensive protocol mechanisms.Claiming 20% market share for field busses.Token passing.≦93.75 kbit/s (1200 m);1500 kbits/s (200m);12 Mbit/s (100m)Integration with Ethernet via Profinet.

[http://www.profibus.com/]

Page 30: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 30 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Controller area network (CAN)

2. Controller area network (CAN) Designed by Bosch and Intel in 1981; used in cars and other equipment; differential signaling with twisted pairs, arbitration using CSMA/CA, throughput between 10kbit/s and 1 Mbit/s, low and high-priority signals, maximum latency of 134 µs for high priority signals, coding of signals similar to that of serial (RS-232) lines of

PCs, with modifications for differential signaling. See //www.can.bosch.com

2. Controller area network (CAN) Designed by Bosch and Intel in 1981; used in cars and other equipment; differential signaling with twisted pairs, arbitration using CSMA/CA, throughput between 10kbit/s and 1 Mbit/s, low and high-priority signals, maximum latency of 134 µs for high priority signals, coding of signals similar to that of serial (RS-232) lines of

PCs, with modifications for differential signaling. See //www.can.bosch.com

Page 31: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 31 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Time-Triggered-Protocol (TTP)

3. The Time-Triggered-Protocol (TTP) [Kopetz et al.]for fault-tolerant safety systems like airbags in cars.

3. The Time-Triggered-Protocol (TTP) [Kopetz et al.]for fault-tolerant safety systems like airbags in cars.

Page 32: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 32 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

FlexRay

4. FlexRay: developed by the FlexRay consortium(BMW, Ford, Bosch, DaimlerChrysler, General Motors, Motorola, Philips).Combination of a variant of the TTP and the Byteflight [Byteflight Consortium, 2003] protocol.Specified in SDL.

• Improved error tolerance and time-determinism• Meets requirements with transfer rates >> CAN std.

High data rate can be achieved:– initially targeted for ~ 10Mbit/sec;– design allows much higher data rates

• TDMA (Time Division Multiple Access) protocol:Fixed time slot with exclusive access to the bus

4. FlexRay: developed by the FlexRay consortium(BMW, Ford, Bosch, DaimlerChrysler, General Motors, Motorola, Philips).Combination of a variant of the TTP and the Byteflight [Byteflight Consortium, 2003] protocol.Specified in SDL.

• Improved error tolerance and time-determinism• Meets requirements with transfer rates >> CAN std.

High data rate can be achieved:– initially targeted for ~ 10Mbit/sec;– design allows much higher data rates

• TDMA (Time Division Multiple Access) protocol:Fixed time slot with exclusive access to the bus

Page 33: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 33 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

TDMA in FlexRay

Cycle subdivide into a static and a dynamic segment.Exclusive bus access enabled for short time in each case.Dynamic segment for transmission of variable length information.Bandwidth used when it is actually needed.

Cycle subdivide into a static and a dynamic segment.Exclusive bus access enabled for short time in each case.Dynamic segment for transmission of variable length information.Bandwidth used when it is actually needed.

[htt

p:/

/ww

w.ix

xat.

de

/en

glis

h/p

rod

ukt

e/f

lexr

ay/

flexr

ay_

intr

od

uct

ion

.sh

tml]

Static segment

Channel 1

Channel 2

Channel 1

Channel 2

Communication cycle

Dynamic segment

Page 34: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 34 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Structure of Flexray networks

Bus guardian protects the system against failing processors, e.g. so-called “babbling idiots”

Bus guardian protects the system against failing processors, e.g. so-called “babbling idiots”

[htt

p:/

/ww

w.ix

xat.

de

/en

glis

h/p

rod

ukt

e/f

lexr

ay/

flexr

ay_

intr

od

uct

ion

.sh

tml]

Page 35: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 35 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Other field busses

• MAP:MAP is a bus designed for car factories.• EIB:The European Installation Bus (EIB) is a bus designed

for smart homes. European Installation Bus (EIB)Designed for smart buildings; CSMA/CA; low data rate.

• IEEE 488: Designed for laboratory equipment.• Attempts to use standard Ethernet.

However, timing predictability remains a serious issue.

• MAP:MAP is a bus designed for car factories.• EIB:The European Installation Bus (EIB) is a bus designed

for smart homes. European Installation Bus (EIB)Designed for smart buildings; CSMA/CA; low data rate.

• IEEE 488: Designed for laboratory equipment.• Attempts to use standard Ethernet.

However, timing predictability remains a serious issue.

Page 36: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 36 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Wireless communication

Page 37: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 37 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Wireless communication: Examples

IEEE 802.11 a/b/g UMTS DECT Bluetooth

IEEE 802.11 a/b/g UMTS DECT Bluetooth

Page 38: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 38 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Wireless communication: Example HomeRF

© //www.palowireless.com

Focus on integrating phone connections.

Incorporates DECT.

Competes with different extensions to IEEE 802.11

Page 39: - 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 04/05 Universität Dortmund Simplified design flow for embedded systems.

- 39 - P. Marwedel, Univ. Dortmund, Informatik 12, 04/05

Universität Dortmund

Summary

Hardware-in-the loop Sensors (robots) Discretization

• Sample-and-hold (S/H) circuit• A/D-converters

– Flash converter– Successive approximation– Other converters– Discretization noise

Communication• Requirements• Sensor/actor-busses• Field busses

Hardware-in-the loop Sensors (robots) Discretization

• Sample-and-hold (S/H) circuit• A/D-converters

– Flash converter– Successive approximation– Other converters– Discretization noise

Communication• Requirements• Sensor/actor-busses• Field busses