01-Gioi Thieu He Thong Nhung-2011

8
19-Feb-11 1 1 Ging viên: Lê Chí Thông Son slides: H Trung M Gii thiu   thng nng Ging viên Lê Chí Thông B môn Đin t; Khoa Đin-Đin t Đi hc Bác h Khoa TP.HCM ĐT: 0902-445-012 Email: [email protected] [email protected] Website: sites.google.com/site/thongchile tinyurl.com/thongchile 3 Ni dung Đnh ngh  ĩ a v h thng nhúng • Nhng đc tính chung c a các h thng nhúng Các l ãn h vc ng dng ca h thng nhúng Thit k h thng nhúng 4 Đ nh ngh ĩ a v  h  th ng nhúng 5 Đ nh ngh ĩ a v  h  th ng nhúng (embedded system) Mt s đnh ngh  ĩ a v h thng nhúng: H thng nhúng là h thng x lý thông tin đưc nhúng vào trong mt sn phm ln hơn và bình thưng ngưi dùng không thy nó mt cách trc tip [1]. H thng tính toán nhúng (embedded computing system) là h thng tính toán đưc nhúng trong thit b đin t (hu như là các h thng tính toán khác máy tính) [2]. Thông t hưng các h thng nhúng là nhng ng dng đơn chc năng [3]. H thng nhúng là h thng mà chc năng chính ca nó không ch tính toán mà đưc điu khin bi máy tính đưc nhúng trong nó [4]. . . . Trong các đnh ngh  ĩ a trên, chúng ta thy đnh ngh  ĩ a th nht có th t tng quát v h thng nhúng. Ngày nay các h thng nhúng khp nơi, chúng xut hin trong nhà, văn phòng, nhà máy, xe hơi, bnh vin,… 6 Embedded systems overview Embed ded compu ting sys tems  Computing systems embedded within electronic devices  Hard to define. Nearly any computing system other than a desktop computer  Billi ons of units produc ed yearl y, versus millions of desktop units  Perhaps 50 per househol d and per automobile Computers are in here... and here... and even here... Lots more of these, though they cost a lot less each.

Transcript of 01-Gioi Thieu He Thong Nhung-2011

Page 1: 01-Gioi Thieu He Thong Nhung-2011

8/4/2019 01-Gioi Thieu He Thong Nhung-2011

http://slidepdf.com/reader/full/01-gioi-thieu-he-thong-nhung-2011 1/7

19-Feb-11

1

1

Ging viên: Lê Chí Thông

Son slides: H Trung M

Gii thiu hê   thng nhúng

Ging viên

Lê Chí Thông

B môn Đin t; Khoa Đin-Đin tĐi hc Bách Khoa TP.HCM

ĐT: 0902-445-012

Email: [email protected]

[email protected]

Website: sites.google.com/site/thongchile

tinyurl.com/thongchile

3

Ni dung

• Đnh ngh ĩ a v h thng nhúng

• Nhng đc tính chung ca các h thng nhúng

• Các lãnh vc ng dng ca h thng nhúng

• Thit k h thng nhúng

4

Đ nh ngh ĩ a v  h  th ng nhúng 

5

Đ nh ngh ĩ a v  h  th ng nhúng 

(embedded system) Mt s đnh ngh ĩ a v h thng nhúng:

• H thng nhúng là h thng x lý thông tin đưc nhúng vào trongmt sn phm ln hơn và bình thưng ngưi dùng không thy nó mtcách trc tip [1].

• H thng tính toán nhúng (embedded computing system) là h thngtính toán đưc nhúng trong thit b đin t (hu như là các h thng tínhtoán khác máy tính) [2].

• Thông thưng các h thng nhúng là nhng ng dng đơn chc năng[3].

• H thng nhúng là h thng mà chc năng chính ca nó không ch cótính toán mà đưc điu khin bi máy tính đưc nhúng trong nó [4].

• . . .

Trong các đnh ngh ĩ a trên, chúng ta thy đnh ngh ĩ a th nht có th mô

t tng quát v h thng nhúng. Ngày nay các h thng nhúng khp

nơi, chúng xut hin trong nhà, văn phòng, nhà máy, xe hơi, bnh vin,…6

Embedded systems overview• Embedded computing systems

 – Computing systems embedded

within electronic devices

 – Hard to define. Nearly any

computing system other than a

desktop computer

 – Billions of units produced yearly,versus millions of desktop units

 – Perhaps 50 per household and perautomobile

Computers are in here...

and here...

and even here...

Lots more of these,

though they cost a lot

less each.

Page 2: 01-Gioi Thieu He Thong Nhung-2011

8/4/2019 01-Gioi Thieu He Thong Nhung-2011

http://slidepdf.com/reader/full/01-gioi-thieu-he-thong-nhung-2011 2/7

19-Feb-11

2

7

A “short list” of embedded systems

And the list goes on and on

Anti-lock brakesAuto-focus cameras

Automatic teller machines

Automatic toll systemsAutomatic transmission

Avionic systems

Battery chargers

Camcorders

Cell phones

Cell-phone base stations

Cordless phones

Cruise control

Curbside check-in systemsDigital cameras

Disk drives

Electronic card readers

Electronic instruments

Electronic toys/games

Factory controlFax machines

Fingerprint identifiers

Home security systems

Life-support systems

Medical testing systems

Modems

MPEG decoders

Network cards

Network switches/routers

On-board navigation

Pagers

PhotocopiersPoint-of-sale systems

Portable video games

Printers

Satellite phones

Scanners

Smart ovens/dishwashersSpeech recognizers

Stereo systems

Teleconferencing systems

Televisions

Temperature controllers

Theft tracking systemsTV set-top boxes

VCR’s, DVD players

Video game consoles

Video phones

Washers and dryers

8

Examples of Embedded Systems

• Engine Control• Medical Implants

• Avionics

• Sensor Networks

• Electronic Equipment

9

Examples of Non-Embedded Computing

• General use PC

 – Presentations, word processing, etc.

• Mainframe-based accounting

• Generic databases

• Scientific computing• Data mining

10

Differences Between General PurposeComputer Systems and Embedded Systems

• PC’s can be reprogrammed very quickly/easily

• PC’s are more robust

• PC’s have several inputs/outputs which allowusers to interface easily with the device

• PC’s are not designed to be application specific

• PC’s make up less than 1% of themicroprocessor industry

11

Why This Field is Important• Embedded computers are cheap, reliable,

and efficient

• Embedded computing is growing muchfaster than desktop computing

 – 1 billion 8051 CPUs/year

 – 500 million cell phones/year and growing

12

Nh  ng đc tính chung 

c a các h  th ng nhúng 

Page 3: 01-Gioi Thieu He Thong Nhung-2011

8/4/2019 01-Gioi Thieu He Thong Nhung-2011

http://slidepdf.com/reader/full/01-gioi-thieu-he-thong-nhung-2011 3/7

19-Feb-11

3

13

Nh  ng đc tính chung c a các h  th ng nhúng 

Các hê   thng nhúng có các đc tính chung sau: [1]

• Thưng thi   các hê   thng nhúng đưc ni vi môi t rưng

vt ly  qua các c m bi  n đê   thu thp thông tin tư môi trưngđo  va   qua các bô   đ i u khi n  /tác đng đê   điu khin môi

trưng.

• Các hê   thng nhúng phi tin c y đư c . “Tin cy đưc” bao

gm đô   tin cy, tính bo trì, tính kha   dng, an toàn va   bomt.

• Các hê   thng nhúng phi có hi u su  t cao . Đê   đánh gia  hiu sut, ngưi t a da vào các tiêu chí sau: năng lưng,

kích thưc mã chương trình/tài nguyên sư dng, hiu sutlúc chy tht (run-time efficiency), khi lưng va   gia .

• Dành riêng cho  ng d ng c  thê  . Thí d bô   xư ly  chychương trình điu khin trong xe hơi s luôn luôn chy

chương trình mà không chuyn sang chương trình khác.14

Nhng đc tính chung ca các h thng nhúng (2)

• Hu ht các h thng nhúng không dùng bàn phím, chut hay

màn mình đ giao tip vi ngưi dùng. Thay vào đó, chúng có

các giao tip dành riêng cho ngưi dùng như các nút nhn, bàn

đp,…

• Nhiu h thng nhúng phi tha các ràng buc thi gian thc.

• Nhiu h thng nhúng là nhng h thng hn hp (hybrid systems ) theo ngh ĩ a gm c hai phn analog và s.

• Các h thng nhúng là nhng h thng có phn ng li (reactive systems ). Chúng có th đưc đnh ngh ĩ a như sau: h thng có

phn ng li là h thng mà có tương tác liên tc vi môi trưngca nó và thc thi vi tc đ đưc xác đnh bi môi trưng đó

[Bergé et al., 1995].

Tht ra không phi mi h thng nhúng s có tt c các đc tính trên.

Chúng ta cũng có th đnh ngh ĩ a thut ng “h thng nhúng” theo cách sau:

Nh  ng h  th ng x  lý thông tin th a ph n l  n các đc tính trên đư c 

g i là nh  ng h  th ng nhúng .

15

Some common characteristics

of embedded systems• 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 system’senvironment

 – Must compute certain results in real-time

without delay16

An embedded system example -

- a digital camera

Microcontroller

CCD p re pr oc es sor P ix el c op ro ce ssorA2D

D2A

JPEG codec

DMA controller

Memory controller ISA bus interface UART LCD ctrl

Display ctrl

Multiplier/Accum

Digital camera chip

lens

CCD

• Single-functioned -- always a digital camera

• Tightly-constrained -- Low cost, low power, small, fast

• Reactive and real-time -- only to a small extent

17

Các lãnh v  c  ng d ng 

c a h  th ng nhúng 

18

Các lãnh v  c  ng d ng c a h  th ng nhúng 

Chúng ta có th thy các h thng nhúng trong nhiu lãnh vc:

• Đin t gia dng: máy git, t lnh, máy chp hình s,…

• Đin t ô-tô: h điu khin đng cơ, h điu khin thng, h GPS,…

• Đin t trong máy bay: h thông tin cho phi công, h chng vachm,…

• Đin t y sinh: đo nhit đ, ECG, chn đoán t xa,…

• Xe la: h t lái, h thng,…

• Vin thông: đin thoi di đng, h thng tng đài, điu khin ăng-ten, thit b GPS,…

• Các ngôi nhà thông minh: tit kim năng lưng, điu khin nhit

đ, chiu sáng,…

• . . .

Các h thng nhúng to cơ s cho k nguyên hu PC (post-PC era),

các h thng x lý thông tin chuyn dn t PC sang h thng nhúng

cho các ng dng c th.

Page 4: 01-Gioi Thieu He Thong Nhung-2011

8/4/2019 01-Gioi Thieu He Thong Nhung-2011

http://slidepdf.com/reader/full/01-gioi-thieu-he-thong-nhung-2011 4/7

19-Feb-11

4

19

Where Embedded Systems are Used..?

20

Thi  t k  h  th ng nhúng 

21

Thi  t k  h  th ng nhúng [3] 

• Các h thng nhúng thưng là các ng dng đon chc

năng. Nhiu ràng buc chc năng khác nhau cho h 

thng nhúng là giá thành thp, mt đn mt ít thànhphn/linh kin, công sut thp, có đáp ng thi gian

tht, và h tr đng tn ti phn cng và phn mm.

• Phương pháp tng quát đ thit k h thng nhúng

đưc cho trong bng 1.

22

B ng 1. Lung thit k h thng nhúng [5]

23

Vic quyt đnh công ngh nn cho thit k s  phn kin trúcph thuc vào mt s ràng buc sau:

• Tc đ cp nht thi gian tht

• Công sut

• Giá

• Gii pháp đơn chip

• D lp trình

• Tính kh chuyn ca mã (Portability of code)

• Các thư vin mã có th tái s dng

• Các công c lp trình

Bng 2 cho thy các đc tính ca các công ngh nn cho thit

k s, mà t đó chúng ta có th chn la đ s dng trong các

thit k ca mình.24

B ng 2 . Các công ngh nn dùng cho thit k s

Vi các thit k h thng nhúng da trên vi điu khin thì ngưi tathưng gi phn mm ca chúng là firmware. Chúng ta có th vit

firmware bng hp ng hoc bng ngôn ng lp trình cao hơn như C/C++ hoc C nhúng (như SystemC,..)....

• Đc thêm Các công ngh h thng nhúng

Page 5: 01-Gioi Thieu He Thong Nhung-2011

8/4/2019 01-Gioi Thieu He Thong Nhung-2011

http://slidepdf.com/reader/full/01-gioi-thieu-he-thong-nhung-2011 5/7

19-Feb-11

5

25

Technology Employed inEmbedded Systems

• Processors

 – Microprocessors – Micro-controllers

 – Digital signal processors (DSP)

 – Programmable logic controllers (PLC)

 – Softprocessors (FPGA)

• Memory

 – PROM

 – EPROM

 – FLASH

 – RAM

• DRAM

• SRAM

• PLD: SPLD, CPLD, and FPGA (SoPC, Softprocessors)26

Technology Employed - Continued

• Operating Systems

 – Embedded LINUX

 – NT- EMBEDDED (Microsoft’s Embedded OS)

 – WINDOWS CE (Consumer Electronics)

 – Palm OS

 – p-SOS (plug-in Silicon Operating System)

 – RTOS created in 1982 for Motorola chips

 – Others

• Development Tools

 – Assembly

 – VHDL, VERILOG - Hardware Description Languages

 – C/C++

 – JAVA

 – UML 2000.(New Language for RTS)[6]

 – Others

27

Design challenge – optimizing

design metrics• Obvious design goal:

 – Construct an implementation with desiredfunctionality

• Key design challenge:

 – Simultaneously optimize numerous design

metrics• Design metric

 – A measurable feature of a system’simplementation

 – Optimizing design metrics is a key challenge 28

Design challenge – optimizing

design metrics• Common metrics

 – 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

 – 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

29

Design challenge – optimizing

design metrics• Common metrics (continued)

 – Time-to-prototype: the time needed to build a working

version of the system

 – Time-to-market: the time required to develop a system to

the point that it can be released and sold to customers

 – Maintainability: the ability to modify the system after its

initial release

 – Correctness, safety, many more

30

Design metric competition -- improving

one may worsen others• Expertise with both

software and hardwareis needed to optimizedesign metrics

 – Not just a hardware orsoftware expert, as iscommon

 – A designer must becomfortable with varioustechnologies in order tochoose the best for a givenapplication and constraints

SizePerformance

Power

NRE cost

Microcontroller

CCD p rep ro cessor Pix el cop ro cessorA2D

D2A

JPEG codec

DMA controller

M em or y c on tr ol le r I SA b us i nt er fa ce U AR T L CD c tr l

Display ctrl

Multiplier/Accum

Digital camera chip

lens

CCD

 Hardware

Software

Page 6: 01-Gioi Thieu He Thong Nhung-2011

8/4/2019 01-Gioi Thieu He Thong Nhung-2011

http://slidepdf.com/reader/full/01-gioi-thieu-he-thong-nhung-2011 6/7

19-Feb-11

6

31

Current Accomplishments

• Current products

 – Automotive control• Improved fuel efficiency

 – Avionics

• Navigation, collision avoidance

 – Medical monitoring systems

 – Smart homes

• W ashing machines, clocks, etc.

• Future uses

 – Intelligent highways

 – Chemical and biological sensors

 – Etc.32

Research Challenges

• Designing configurable processors

• Developing new design tools and methodologies

• Efficient software synthesis and re-use

• Physics of miniaturization

• MEMS (Micro-Electro-Mechanical Systems)

 – integration of mechanical elements, sensors,actuators, and electronics on a common siliconsubstrate through microfabrication technology

33

Processor Bit Size in NewEmbedded Designs

Data was derived from EETimes and Embedded Systems Design Magazine 2006 Embedded Market Survey

34

32-64 bit Annual Processor Sales

35

Processors Used in New Embedded Designs

Data was derived from EETimes and Embedded Systems Design Magazine 2006 Embedded Market Survey

36

Use of Real-Time OS Kernels

in New Embedded Designs

Data was derived from EETimes and Embedded Systems Design Magazine 2006 Embedded Market Survey

Page 7: 01-Gioi Thieu He Thong Nhung-2011

8/4/2019 01-Gioi Thieu He Thong Nhung-2011

http://slidepdf.com/reader/full/01-gioi-thieu-he-thong-nhung-2011 7/7

19-Feb-11

7

37

Commercial Operating SystemsUsed in New Embedded Designs

Data was derived from EETimes and Embedded Systems Design Magazine 2006 Embedded Market Survey

38

Programming Languages Used in NewEmbedded Designs

Data was derived from EETimes and Embedded Systems Design Magazine 2006 Embedded Market Survey

39

Các môn hc cn cho h thng nhúng

1. Thit k h thng nhúng vi MPU

2. Thit k h thng nhúng vi MCU

3. Thit k h thng nhúng vi FPGA/CPLD

4. Thit k h thng nhúng vi DSP

5. Thit k SoC/SoPC

6. H điu hành thi gian thc (RTOS)

7. Lp trình C cho h thng nhúng

8. Lp trình h thng (vit các device driver)9. Thit k h thng nhúng vi PC công nhip

10. Giao tip phn cng

11. Cm bin

40

Lp hc nhanh h thng nhúng

• Phn cng: Kit VXL/VĐK phát trin có sn

• Phn mm: Vit ng dng bng C/C++

• Khi đó ni dung hc ch cn các phn sau:1. Tìm hiu VXL/VĐK

2. Lp trình C cho kit

3. Tìm hiu giao tip kit vi các ngoi vi (TD:LCD, bàn phím,...)

4. Tìm hiu thêm lp trình hp ng nu cn vitmã chy nhanh và ít tn b nh hơn!

41

K  t lu n Vi các ng dng phong phú và các yêucu đa dng ca ngưi dùng, các h thng nhúng đã, đang và s gii quytđưc các vn đ đó. Ngưi ta d đoánrng trong tương lai h thng nhúng s xut hin trong hu ht các lãnh vc!

42

Tài li u tham kh o 

1. Peter Merwedel, Embedded System Design, SpringerVerlag, 2006.

2. Frank Vahid and Tony Givargis, Embedded SystemDesign: A Unified Hardware/Software Introduction, John

Wiley & Sons, 2002.

3. Rahul Dubey, Introduction to Embedded System Design

Using Field Programmable Gate Arrays, Springer-Verlag, 2009.

4. Wilmshurst, T. , An Introduction to the Design of Small-Scale Embedded Systems, Palgrave, 2001.

5. Wolf W., Computers as Components: Principles ofEmbedded Computer Systems Design, Morgan

Kaufmann, 2005.