Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

What's An Embedded System?

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

2/6/2012

I HC QUC GIA TP.H CH MINH TRNG I HC BCH KHOA


KHOA IN-IN T
B MN K THUT IN T

Embedded System Design


Chapter 1: Embedded System Overview 1. 2. 3. 4. What is an embedded system? Embedded system features Embedded system design issues Embedded system design process

1. Whats an Embedded System?


Embedded systems =
information processing systems that interact with physical processes and are embedded into a larger product

Two types of computing


Desktop produced millions/year Embedded billions/year

Non-Embedded Systems
PCs, servers, and notebooks

The future of computing!


Automobiles, entertainment, communication, aviation, handheld devices, military, medical equipment
B mn K Thut in T - HBK
2

2/6/2012

1. What is an embedded system?


Embedded system is
any device that includes a programmable computer but is not itself a general-purpose computer - Wayne Wolf An embedded computer system includes a micro-computer with mechanical, chemical and electrical devices attached to it, programmed for a specific dedicated purpose, and packaged as a complete system Jonathan W. Valvano An embedded system is one that has computer-hardware with software embedded in it as one of its most important component - Raj Kamal

B mn K Thut in T - HBK

Embedded System Examples


The refrigerator
Maintain a moderately stable, low temperature within it. Sense its internal temperature and compare that with the temperature required. Lowers the temperature by switching on a compressor. The temperature measurement requires one or more sensors Controlling the compressor requires some form of electronic interface

B mn K Thut in T - HBK

2/6/2012

Embedded System Examples


A car door mechanism
Window stall sensor, door sensor Window motor, lock actuator Window control buttons

B mn K Thut in T - HBK

Embedded System Examples


The Derbot Vehicle
Two microswitch bump detectors an untrasound detector Two light sensors a servo actuator

Derbot is powered from six AA Alkaline cells

B mn K Thut in T - HBK

2/6/2012

Embedded System Examples


The Derbot Vehicle
operates as an embedded system reading in values from its diverse sensors and computing outputs to its actuators.

B mn K Thut in T - HBK

2. Embedded System Features


Clock Peripherals Embedded Processor Buttons Sensors A/D I/O RAM Actuators Display Power ROM Embedded software

Embedded processor is a heart of the embedded system:


micro-processor: 8086, ARM7, micro-controller: 8051, ARM Cortex-M, PIC16F, 68HC11,

B mn K Thut in T - HBK

2/6/2012

2. Embedded System Features


Memory
ROM: embedded program RAM: processing data

Embedded program
OS / non-OS supported realtime / non-realtime timer, interrupt, serial port

Clock:
crystal

Power:
+5V / +3.3V / +2.5V
B mn K Thut in T - HBK
9

2. Embedded System Features


Peripherals:
I/O port UART I2C ADC PWM

User interface:
Button / keypad / switch LCD / 7-segment LED / LED indicator

Sensors:
temperature, light, ultrasound, pressure,

Actuators:
motor, solenoid, relay,
B mn K Thut in T - HBK
10

2/6/2012

2. Embedded System Features


Common Characteristics: Single-functioned
Executes a single program, repeatedly

Tightly-constrained
Low cost, low power, small, fast, etc.

Reactive and real-time


Continually reacts to changes in the systems environment Must compute certain results in real-time without delay

B mn K Thut in T - HBK

11

An embedded system example


A digital camera
Digital camera chip CCD CCD preprocessor A2D lens JPEG codec Microcontroller Multiplier/Accum Pixel coprocessor D2A

DMA controller

Display ctrl

Memory controller

ISA bus interface

UART

LCD ctrl

Single-functioned -- always a digital camera Tightly-constrained -- Low cost, low power, small, fast Reactive and real-time -- only to a small extent
12

B mn K Thut in T - HBK

2/6/2012

2. Embedded System Features


Common Characteristics: Single-functioned
Executes a single program, repeatedly

Tightly-constrained
Low cost, low power, small, fast, etc.

Reactive and real-time


Continually reacts to changes in the systems environment Must compute certain results in real-time without delay

B mn K Thut in T - HBK

13

3. Embedded System Design Issues


1. Constraints
cost may matter more than speed long life cycle Reliability/safety Low-power

2. Functions
safety-critical applications damage to life, economy can result

3. Real-time systems
Not only right output but at the right time processing time is the most important one.
B mn K Thut in T - HBK
14

2/6/2012

3. Embedded System Design Issues


4. Concurrent systems
System and environment run concurrently multi-functional interface with other systems

5. Reactive systems
Once stated run forever Continuous interaction with their environment termination is a bad behavior

B mn K Thut in T - HBK

15

Embedded System Requirements


Basic requirements for an embedded system
Real-time/ reactive operation

Cost / resource

Small size/ low weight

Safe and reliable

Low power, cooling

B mn K Thut in T - HBK

16

2/6/2012

4. Embedded System Design Process


CAD tools

Requirement definition System specification System architecture development

Customers

System architects

SW development Application SW Compilers Operating

Interface design SW driver HW interface User interface

HW design HW architecture HW synthesis Physical design


HW designer Reused components
17

SW developer

Integration and test


B mn K Thut in T - HBK

4. Embedded System Design Process


Documents for System Specification 1. Product Specification 2. Engineering Specification 3. Hardware Specification 4. Software Specification 5. Test Specification
Describe how the product will be.

Describe what board, subsystem, and firmware will be used. Describe how the board will be implemented and how it works. Describe how the software will be implemented. Describe how the system will be tested.

B mn K Thut in T - HBK

18

2/6/2012

4. Embedded System Design Process


1. Product Specification:
What the system is to do What the user interface is What the real world I/O consists of What the external interface to other system is (if any) What are the constraints? (speed, stability, low power, cost ) Functions: control the heater and the fan of an oven I/O: temperature sensor, heater port, fan port User interface: LCD display, keypad External interface: UART
19

Example: Oven temperature control system

B mn K Thut in T - HBK

4. Embedded System Design Process


2. Engineering Specification:
What kind of hardware will be used What are the requirements for hardware and software

Example: Oven temperature control system


8051 microcontroller, LM35 sensor, LCD 16x2-B, ADC0809, RS232 IC Requirements
PID control algorithm real-time processing Display current temperature value able to set operating temperature value Transfer data to computer through UART
20

B mn K Thut in T - HBK

10

2/6/2012

4. Embedded System Design Process


3. Hardware Specification:
The requirements from engineering documents How the hardware implements the functionality The software interfaces to the hardware

Example: Oven temperature control system


PIC Microcontroller 12MHz, sensor LM35, LCD 16x2-B, Keypad 16, ADC0809, FET IRF260 for heater/fan control Microcontroller reads temperature value from LM35 through ADC, display this value to LCD, and then control heater and fan based on PID control algorithm

B mn K Thut in T - HBK

21

4. Embedded System Design Process


4. Software Specification:
The requirements from engineering specification Interface to other software How the software implements the requirements

Example: Oven temperature control system


design a function:
void LCD_display(String str) int PID_control(int temp, int data[])

B mn K Thut in T - HBK

22

11

2/6/2012

4. Embedded System Design Process


5. Test Specification:
The device, equipment, environment for testing Prototype Testing process

Example: Oven temperature control system


Voltage meter, temperature meter Prototype: bread board Testing process:
calibrate temperature sensor check LCD, keypad check output port (heater, fan) verify PID control algorithm
23

B mn K Thut in T - HBK

Three key embedded system technologies


Technology
A manner of accomplishing a task, especially using technical processes, methods, or knowledge

Three key technologies for embedded systems


Processor technology: general-purpose, application-specific, single-purpose IC technology: Full-custom, semi-custom, PLD Design technology: Compilation/synthesis, libraries/IP, test/verification

B mn K Thut in T - HBK

24

12

2/6/2012

4. Embedded System Design Process


Processor selection
number of IO pins required interface required memory requirements number of interrupts required real-time considerations development environment processing speed required

General-purpose processor

Application-specific processor

Single-purpose processor

B mn K Thut in T - HBK

25

Processor technology
Processor not equal to general-purpose processor
Controller Control logic and State register IR PC Datapath Register file General ALU Controller Control logic and State register IR PC Data memory Program memory Assembly code for: total = 0 for i =1 to General-purpose (software) B mn K Thut in T - HBK
26

Datapath Registers Custom ALU

Controller Control logic State register

Datapath index total +

Data memory

Data memory

Program memory Assembly code for: total = 0 for i =1 to Application-specific Single-purpose (hardware)

13

2/6/2012

IC technology
The manner in which a digital (gate-level) implementation is mapped onto an IC
IC: Integrated circuit, or chip IC technologies differ in their customization to a design ICs consist of numerous layers (perhaps 10 or more)
IC technologies differ with respect to who builds each layer and when

IC package

IC

gate oxide source channel drain Silicon substrate

B mn K Thut in T - HBK

27

4. Embedded System Design Process


Hardware / software partitioning
which functions should be performed in hardware, and which in software? the more functions in software, the lower will be the product cost

B mn K Thut in T - HBK

28

14

2/6/2012

Design challenge optimizing design metrics


Common metrics
1. Unit cost: the monetary cost of manufacturing each copy of the
system, excluding NRE cost

2. NRE cost (Non-Recurring Engineering cost): The one-time


monetary cost of designing the system

3. 4. 5. 6.

Size: the physical space required by the system Performance: the execution time or throughput of the system Power: the amount of power consumed by the system Flexibility: the ability to change the functionality of the system
without incurring heavy NRE cost

B mn K Thut in T - HBK

29

Design challenge optimizing design metrics


Common metrics (continued)
7. Time-to-prototype: the time needed to build a working version of
the system

8. Time-to-market: the time required to develop a system to the


point that it can be released and sold to customers

9. Maintainability: the ability to modify the system after its initial


release

10. Correctness: check the functionality throughout the process of


designing the system; insert test circuitry to check that manufacturing was correct

11. Safety: the probability that the system will not cause harm

B mn K Thut in T - HBK

30

15

2/6/2012

Time-to-market: a demanding design metric


Time required to develop a product to the point it can be sold to customers Market window
Period during which the product would have highest sales

Average time-to-market constraint is about 8 months Delays can be costly

Revenues ($)

Time (months)
B mn K Thut in T - HBK
31

Losses due to delayed market entry


Simplified revenue model
Product life = 2W, peak at W Time of market entry defines a triangle, representing market penetration Triangle area equals revenue

Loss
The difference between the on-time and delayed triangle areas
Peak revenue Revenues ($) Peak revenue from delayed entry Market fall Delayed

On-time Market rise

W Time

2W

On-time entry
B mn K Thut in T - HBK

Delayed entry

32

16

2/6/2012

Losses due to delayed market entry (cont.)


Area = 1/2 * base * height
On-time = 1/2 * 2W * W Delayed = 1/2 * (W-D+W)*(W-D)

Percentage revenue loss = (D(3W-D)/2W2)*100%


Peak revenue Revenues ($) Peak revenue from delayed entry Market fall Try some examples Lifetime 2W=52 wks, delay D=4 wks (4*(3*26 4)/2*26^2) = 22% Lifetime 2W=52 wks, delay D=10 wks (10*(3*26 10)/2*26^2) = 50% Delays are costly!

On-time Market rise Delayed D

W Time

2W

On-time entry

Delayed entry

B mn K Thut in T - HBK

33

NRE and unit cost metrics


Costs:
Unit cost: the monetary cost of manufacturing each copy of the system, excluding NRE cost NRE cost (Non-Recurring Engineering cost): The one-time monetary cost of designing the system total cost = NRE cost + unit cost * # of units per-product cost = total cost / # of units = (NRE cost / # of units) + unit cost

Example
NRE=$2000, unit=$100 For 10 units
total cost = $2000 + 10*$100 = $3000 per-product cost = $2000/10 + $100 = $300

Amortizing NRE cost over the units results in an additional $200 per unit
B mn K Thut in T - HBK
34

17

2/6/2012

NRE and unit cost metrics


Compare technologies by costs -- best depends on quantity
Technology A: NRE=$2,000, unit=$100 Technology B: NRE=$30,000, unit=$30 Technology C: NRE=$100,000, unit=$2
$200,000 $160,000 tota l c ost (x1000) $120,000 A B p er p rod uc t c ost C $200 $160 A B C

$120 $80

$80,000 $40,000 $0 0 800 1600 2400 Numb er of units (volume)

$40 $0 0 800 1600 2400 Numb er of units (volume)

But, must also consider time-to-market


B mn K Thut in T - HBK
35

The performance design metric


Widely-used measure of system, widely-abused
Clock frequency, instructions per second not good measures Digital camera example a user cares about how fast it processes images, not clock speed or instructions per second

Latency (response time)


Time between task start and end e.g., Cameras A and B process images in 0.25 seconds

Throughput
Tasks per second, e.g. Camera A processes 4 images per second Throughput can be more than latency seems to imply due to concurrency, e.g. Camera B may process 8 images per second (by capturing a new image while previous image is being stored).

Speedup of B over S = Bs performance / As performance


Throughput speedup = 8/4 = 2
36

B mn K Thut in T - HBK

18

2/6/2012

Design metric competition -- improving one may worsen others


Expertise with both software and hardware is needed to optimize design metrics
Not just a hardware or software expert, as is common A designer must be comfortable with various technologies in order to choose the best for a given application and constraints Power

Performance

Size

NRE cost

B mn K Thut in T - HBK

37

Summary
Embedded systems are everywhere Key challenge: optimization of design metrics
Design metrics compete with one another

A unified view of hardware and software is necessary to improve productivity Three key technologies
Processor: general-purpose, application-specific, single-purpose IC: Full-custom, semi-custom, PLD Design: Compilation/synthesis, libraries/IP, test/verification

B mn K Thut in T - HBK

38

19

2/6/2012

Class assignment
1. 2. 3. 4. 5. 6. 7. What is an embedded system? What are embedded system features? What are issues of embedded system design? What are five basic requirements of embedded system? What are common characteristics of an embedded system? What are optimizing design metrics? What is the most importance step of embedded system design process? 8. What are three key technologies for embedded systems?

B mn K Thut in T - HBK

39

Class assignment
8. Consider the following embedded systems: a pager, a computer printer, and an automobile cruise controller. Create a table with each example as a column, and each row one of the following design metrics: unit cost, performance, size, and power. For each table entry, explain whether the constraint on the design metric is very tight. Indicate in the performance entry whether the system is highly reactive or not. 9. List three pairs of design metrics that may compete, providing an intuitive explanation of the reason behind the competition. 10. The design of a particular disk drive has an NRE cost of $100,000 and a unit cost of $20. How much will we have to add to the cost of the product to cover our NRE cost, assuming we sell: (a) 100 units, and (b) 10,000 units. 11. (a) Create a general equation for product cost as a function of unit cost, NRE cost, and number of units, assuming we distribute NRE cost equally among units. (b) Create a graph with the x-axis the number of units and the y-axis the product cost, and then plot the product cost function for an NRE of $50,000 and a unit cost of $5.
B mn K Thut in T - HBK
40

20

2/6/2012

Class assignment
Design a embedded system for washing machine
No. 1 Specification Product specification Engineering specification Hardware specification Software specification Test specification Describe -Washing process: soak, wash, rinse, spin -Mode: manual, fuzzy -Constraints -Inputs: -Outputs: -Use interface: -Microcontroller: -Sensors: -Actuators: -Functions: -Control algorithm: -Platform: -Test process:
41

4 5

B mn K Thut in T - HBK

Class assignment
1. Consider the project car door mechanism Write system specification for this project

B mn K Thut in T - HBK

42

21

You might also like