Sie sind auf Seite 1von 78

Embedded Systems

Lecturer: Dr. Phạm Ngọc Nam


© DHBK 2008

About your lecturer


• Bộ môn kỹ thuật điện tử tin học, ĐHBK Hà nội
 Office: C9-401
 Email: pnnam-fet@mail.hut.edu.vn

• Research:
 FPGA, PSoC, embedded systems
 Trí tuệ nhân tạo
• Education:
 K37 điện tử-ĐHBK Hà nội (1997)
 Master về trí tuệ nhân tạo 1999, Đại học K.U. Leuven,
vương quốc Bỉ
 Đề tài: Nhận dạng chữ viết tay
 Tiến sỹ kỹ thuật chuyên ngành điện tử-tin học, 9/ 2004, Đại
học K.U. Leuven, Vương Quốc Bỉ
 Đề tài: quản lý chất lượng dịch vụ trong các ứng dụng đa
phương tiện tiên tiến

2
© DHBK 2008

Outline

1. Embedded system introduction


2. Design with FPGA
3. VHDL

3
© DHBK 2008

1. Embedded system introduction

• Introduction
 Definition
 Categories of embedded systems
 Characteristics of embedded systems
 Constraints of embedded systems
 Trends
• Embedded hardware
• Embedded software

4
© DHBK 2008

Definition

5
© DHBK 2008

Definition

• BMW > 100 processors


• Trung bình 1 công dân Mỹ ~ 75 processors

*Intelligent Transportation *Cabin Air


System (ITS)
Quality
*Lighting
*Safety Systems

*Engine
Performance and
Emission Control
(Traction Control)

*Suspension *Digital Car


*Steering Controls*Entertainment
and
Braking Control
*Gear Box Radio

6
© DHBK 2008

Definition

Type Giá (USD) Example application


Disposable system 1 Greeting cards
Embedded system 10 Watches, cars,
appliances
Game computer 100 Home video games
Personal computer 1K Desktop computer
Server 10K Network server
Collection of 100K Departmental
workstations supercomputer
Mainframe 1M Batch processing in
bank
Supercomputer 10M Weather forecasting

98% processors are used in embedded systems


2% are used in PC

7
© DHBK 2008

Definition

• So what is an embedded system?


 Anything that uses a microprocessor but isn't a general-
purpose computer

The first Embedded System: Apollo Guidance Computer

8
© DHBK 2008

Categories of Embedded systems


• Signal processing systems
 Real-time video, set-top boxes, DVD players, medical
equipment, residential gateways
• Distributed control
 Network routers, switches, firewalls, mass transit
systems, elevators
• “Small” systems
 Mobile phones, pagers, home appliances, toys,
smartcards, MP3 players, PDAs, digital cameras, sensors,
smart badges

9
© DHBK 2008
Characteristics of Embedded
systems
• Part of a larger system
 Limited peripherals
• Application-specific
 Both hardware and software is tailored to applications,
which are well defined
 However, re-programmability is a requirement
• Interaction with the physical world

10
© DHBK 2008

Constraints of Embedded systems


• Hardware
 CPU, Memory
 Power consumption
 Limited peripherals and slower buses
 Size, weight, environmental reliability
• Software
 Latency
 ‘Hard’ or ‘Soft’ Real-time requirements
 Limited HW resources
 Reliability
 Not very easy to debug
 Device heterogeneity
 Interoperability becomes an issue!

11
© DHBK 2008

Constraints of Embedded systems


• Small Size, Low Weight
– Handheld electronics
– Transportation applications weight costs money
• Low Power
– Battery power for 8+ hours (laptops often last only 2 hours)
– Limited cooling may limit power even if AC power available
• Harsh environment
– Heat, vibration, shock
– Power fluctuations, RF interference, lightning
– Water, corrosion, physical abuse
• Safety critical operation
– Must function correctly
– Must not function incorrectly
• Extreme cost sensitivity
– $.05 adds up over 1,000,000 units
12
© DHBK 2008

Trends
Number of transistors
1M

100K

10K
55%/year
1K
100

10

1 Time
1980 1985 1990 1995 2000 2005

Exponential growth for 3 decades!


This is called ‘Moore’s law’: number of transistors
doubles every 18 months
(Gordon Moore, founder Intel Corp.)
13
© DHBK 2008

Trends: Post-PC era

1000 10 1

Mainframe PC Smart Things


0.01 1 >100 # / human
Compute + DSP
Power

+ Communications

+ Ambient
Intelligence

1960 1970 1980 1990 2000 2010

14
© DHBK 2008

Trends: smart things

Cochlear actuator(Cochlear Edegem) NeuroSensor (KNS) Bloodgas sensor (IMEC)

15
© DHBK 2008

Trends: ambient intelligence

Now + 5 Years

16
© DHBK 2008

Trends: ambient intelligence

17 © Emile Aarts, HomeLab, Philips


© DHBK 2008

1. Embedded system introduction

• Introduction
• Embedded hardware
 Overview
 Microcontroller
 DSP
 PSoC
 RSoC
• Embedded software

18
© DHBK 2008

1. Embedded system introduction

• Introduction
• Embedded hardware
 Overview
 Microcontroller
 DSP
 PSoC
 RSoC
• Embedded software

19
© DHBK 2008

Overview of embedded hardware


• Commercial off-the-shelf components (COTS)
 e.g. wireless radios, sensors, I/O devices
 Cheap
• Application-Specific ICs (ASICs)
 ICs tailored to meet application needs
 Good performance for their intended tasks
 Original Es were ASICs only
• Domain-specific processors
 DSPs
 Microcontrollers
 Microprocessors

20
© DHBK 2008

Overview of embedded hardware

21
© DHBK 2008

Overview of embedded hardware

• New trend:
System-On-Chip (SOC)
 Usual (or desired) specs:
 32-bit RISC CPU
 Built-in interfaces to RAM and ROM
 Built-in DMA, interrupt and timing controllers
 Built-in interfaces to disk or flash memory
 Built-in Ethernet/802.11 interfaces
 Built-in LCD/CRT interfaces
 New SOCs appearing almost every week!
 Examples
 Intel StrongARM SA-1110
 Motorola PowerPC MPC823e
 NEC VR4181
 Many, many more

22
© DHBK 2008

Overview of embedded hardware

• New trend:
Reconfigurable System-On-Chip (RSOC)
 Processor core + (re)Programable logic
 E.g. FPGAs
 Changing the system behavior at the hardware level

23
© DHBK 2008

Overview of embedded hardware

0.1µm , 200M+ Transistors, 1M$ mask set


www
RF / Analog
gps 20 Mbyte Embedded
200
32 Bit Cores Distributed Software
Memory
Voice
Pen
200MHz
Vision
Bio Reconfigurable interconnect Display
Motion < Watt Sound
Security 1 M gate 1 M gate Data
. <1 Volt reconfigurable hardwired
Sensors Bio
computing logic Actuators

50 GIPS-500GOPS

24
© DHBK 2008

Overview of embedded hardware


• Mainly digital www
0.1µm , 200M+ Transistors, 1M$ mask set

gps RF / Analog

• Lots of memory 200


32 Bit Cores
20 Mbyte
Distributed
Memory
Embedded
Software

• Flexibility Voice
Pen
Vision
Bio
200MHz

< Watt
Reconfigurable interconnect Display
Motion Sound

 Programmable multi-processor network Security


.
Sensors
1 M gate
<1 Volt reconfigurable
computing
1 M gate
hardwired
logic
Data
Bio
Actuato
rs

 Re-configurable hardware 50 GIPS-500GOPS

 Small part of hardwired dedicated functionality


• Relatively low clock speed (200 MHz)
 Compare to Pentium IV clock speeds of 3 GHz
• Energy efficiency (1 Watt)
 Compare to Pentium IV 50 Watt

25
© DHBK 2008

1. Embedded system introduction

• Introduction
• Embedded hardware
 Overview
 Microcontroller
 DSP
 PSoC
 RSoC
• Embedded software

26
© DHBK 2008

Microcontrollers
• Vi điều khiển = CPU + Bộ nhớ + các khối ghép nối ngoại vi +
các khối chức năng
 EEPROM
 RAM
 ADC/DAC
 Timer
 Bộ tạo xung nhịp
 PWM
 UART
 USB
 ...
• Word length
 4 bit: 2%
 8 bit: 36%
 16 bit: 25%
 32 bit: 34%
 64 bit: 3%
• Not pushing the limits of performance for cost reasons
27
© DHBK 2008

Microcontroller facts
• Shipments- > 8 Billion in 2000, 8 bit > 1/2 market
• Major Players: Microchip 16Fxx, Intel 8051, Motorola
MC68HC05, National COP800, SGS/Thomson ST62, Zilog
Z86Cxx

28
© DHBK 2008

PIC16C5x

29
© DHBK 2008

PIC16C5x
• High-Performance RISC CPU:
 Only 33 single word instructions to learn
 All instructions are single cycle (200 ns) except for
program branches which are two-cycle
 Operating speed: DC - 20 MHz clock input
 DC - 200 ns instruction cycle
 12-bit wide instructions
 8-bit wide data path
 Seven or eight special function hardware registers
 Two-level deep hardware stack
 Direct, indirect and relative addressing modes for
data and instructions

30
© DHBK 2008

PIC16C5x
• Peripheral Features:
 8-bit real time clock/counter (TMR0) with 8-bit
programmable prescaler
 Power-On Reset (POR)
 Device Reset Timer (DRT)
 Watchdog Timer (WDT) with its own on-chip
 RC oscillator for reliable operation
 Programmable code-protection
 Power saving SLEEP mode
• Applications:
 high-speed automotive and appliance motor control
 low-power remote ransmitters/receivers
 pointing devices and telecom processors.

31
© DHBK 2008

Motorola MC68331

32 bit 16
2 Timers
integer CPU data
1 Serial asynch. FT unit: watchdog 24
Buffered I/O clock&bus monitor address
12
Programmable
chip selects
7
Interrupt logic

• Clock frequency: > 16 MHz


• MC683xx: modular microcontroller unit: MC68000 core plus
customized peripherals

32
© DHBK 2008

Motorola MC68332

32 bit 16
Timer PU
integer CPU data
1 Serial asynch. FT unit: watchdog 24
Buffered I/O clock&bus monitor address
12
Programmable
2 Kbyte RAM
chip selects
7
Interrupt logic

≤ 48
Parallel I/O

• Clock frequency: > 16 MHz


• MC683xx: modular microcontroller unit: MC68000 core plus
customized peripherals

33
© DHBK 2008

Motorola MC68340

32 bit 16
2 Timers
integer CPU data
2 Serial asynch. FT unit: watchdog 32
I/O clock&bus monitor address
4
Programmable 2 channel
chip selects DMA controller
7
Interrupt logic

≤ 16
Parallel I/O

• Clock frequency: > 16 MHz


• MC683xx: modular microcontroller unit: MC68000 core plus
customized peripherals

34
© DHBK 2008
Motorola MC68HC05

35
© DHBK 2008
Motorola MC68HC05

Hardware features
• Fully static design featuring the industry standard M68HC05
family CPU core
• On chip crystal oscillator with divide by 2 or a software
selectable divide by 32 option (SLOW
mode)
• 2.1 MHz internal operating frequency at 5V; 1.0 MHz at 3V
• High speed version available
• 176 bytes of RAM
• 5936 bytes of user ROM plus 14 bytes of user vectors
• 256 bytes of byte erasable EEPROM with internal charge pump
and security bit
• Write/erase protect bit for 224 of the 256 bytes EEPROM
• Self test/bootstrap mode
• Power saving STOP, WAIT and SLOW modes

36
© DHBK 2008
Motorola MC68HC05

• Three 8-bit parallel I/O ports and one 8-bit input-only port
• Software option available to output the internal E-clock to port pin
PC2
• 16-bit timer with 2 input captures and 2 output compares
• Computer operating properly (COP) watchdog timer
• Serial communications interface system (SCI) with independent
transmitter/receiver baud rate
selection; receiver wake-up function for use in multi-receiver systems
• 8 channel A/D converter
• 2 pulse length modulation systems which can be used as D/A
converters
• One interrupt request input plus 4 on-board hardware interrupt
sources
• Available in 52-pin plastic leaded chip carrier (PLCC), 64-pin quad flat
pack (QFP) and 56-pin
shrink dual in line (SDIP) packages
• Complete development system support available using the MMDS05
development station with
the M68HC05B32EM emulation module
•37 Extended operating temperature range of -40 to +125 °C
© DHBK 2008

Họ vi điều khiển 8051

• Hiện nay có hơn 40 công ty sản xuất các loại vi


điều khiển khác nhau của họ 8051.
• Một số công ty có trên 40 version 8051.
• Các CORE 8051 có thể được tổ hợp trong các
FPGA hay ASIC.
• Trên 100 triệu vi điều khiển 8051 được bán ra mỗi
năm.
• Họ 8051 gặt hái được rất nhiều thành công và nó
cũng trực tiếp ảnh hưởng đến cấu trúc của các họ
vi điều khiển hiện nay.

38
© DHBK 2008

MCS-51
• 8051 thuộc họ vi điều khiển MCS-51.
• MCS-51 được phát triển bởi Intel và các nhà sản
xuất khác (như Siemens, Philips) là các nhà cung
cấp đứng thứ hai của họ này.
• Tóm tắt một số đặc điểm chính của họ 8051:
 4K bytes ROM trong
 128 bytes RAM trong
 4 cổng I/O 8-bit
 2 bộ định thời 16 bit
 Giao diện nối tiếp
 Quản lý được 64K bộ nhớ code bên ngoài
 Quản lý được 64K bộ nhớ dữ liệu bên ngoài

39
© DHBK 2008

Họ vi điều khiển 8051

C¸c ng¾t ngoµi C¸c sù kiÖn cÇn ®Õm

Ram trong
Thanh ghi 128 byte FF
chøc n¨ng ram
®Æc biÖt
80
§iÒu khiÓn Nguån
128 byte 7F
Ng¾t
ng¾t
Trong RAM
00

CPU

Bé Qu¶n Port Port Port Port Cæng


dao ®éng lý Bus 0 1 2 3 nèi
tiÕp

XTAL 1,2 PSEN ALE §Þa chØ §Þa Më réng


thÊp/d÷ liÖu chØ cao trong 8032
40
© DHBK 2008

Họ vi điều khiển AVR


Bus d÷ liÖu 8 bÝt
Bé nhí flash Bé ®Õm Tr¹ng th¸i vµ Thanh ghi
1k x 16 cho ch−¬ng tr×nh kiÓm tra ®iÒu khiÓn
ch−¬ng tr×nh
Thanh ghi
§¬n vÞ ng¾t
Thanh ghi ®a n¨ng
lÖnh 32 x 8 §¬n vÞ SPI

UART nèi tiÕp


Bé gi¶i
m· lÖnh ALU
Timer/Counter
8 bÝt
C¸c ®−êng ®iÒu Timer/Counter
khiÓn 128 x 8
Data 16 bit víi
SRAM Bé PWM
®Þnh thêi
watchdog

128x8 Bé so s¸nh
EEPROM analog
15 ®−êng dÉn
vµo/ra
41
© DHBK 2008

1. Embedded system introduction

• Introduction
• Embedded hardware
 Overview
 Microcontroller
 DSP
 PSoC
 RSoC
• Embedded software

42
© DHBK 2008
Texas Instruments TMS320C20x
Low end consumer Fixed Point
Dual access fixed MAC 16
data RAM 16x16+32->32 data

PROM Selection of 18
peripherals: address
serial comm.,
Loop controller timers,...
I/O
16
data

16
address

• Series continued; typical app.: Digital camera, feature-phones, disk


drives, Point-of-Sales Terminal
• 40 MHz, 3.3-5V, 3LM
• Available as core

43
© DHBK 2008
Texas Instruments TMS320C24x
Low end consumer Fixed Point
Dual access fixed MAC 16
data RAM 16x16+32->32 data

PROM 8 output PWM 16


address

Loop controller 8 channel A/D

Selection of CAN bus


peripherals: controller
serial comm.,
timers,... watchdog

• Series continued; typical app.: electrical motor control


• 50 MHz, 5V

44
© DHBK 2008
Texas Instruments TMS320C3x
Floating Point
32 bit 32
XRAM
floating add data
32 bit 24
YRAM
floating multiply address

PRAM ACU
I/O
32
Loop controller ACU data

Selection of 24
peripherals: address
serial comm.,
timers, DMA, ...

• Series discontinued; typical app.: speech, audio


• 60 MHz, 3.3-5V, 144 pin
• Super scalar

45
© DHBK 2008
Texas Instruments TMS320C4x
Floating Point Message Passing
20 MB/s
32 bit 32
4KByte XRAM
floating add data
32 bit 32
4KByte YRAM
floating multiply address
8 PRAM ACU

32
Loop controller ACU data

12 channel 32
DMA controller Serial link, address
timers

• Series discontinued; typical app.: prototyping, radar


• 60 MHz, 5V, 325 pin
• Super scalar; message passing multiprocessor

46
© DHBK 2008
Texas Instruments TMS320C54xx
High end consumer Fixed Point
Dual access Fixed ALU 32
XRAM 32+32->40 data
Fixed Add 17
YRAM
32+32->40 address
Fixed multiply
PROM
17x17->34 I/O
16
Loop controller Viterbi data

6 channel 16
ACU
DMA controller address
Buffered serial
ACU
links, timers, ...

• Series continued; typical app.: GSM, set-top box, audio


• 1.8-5V, max. 160 MHz, 144 pin, .15µm (1999), 0.32mW/MIPS for the
core
• Specialized on-chip unit: will occur more often in future
• e.g. C5420: dual core + 2x100 MW on-chip SRAM
47 e.g. C5402: 5$ for 100 MIPS
© DHBK 2008
Texas Instruments TMS320C5510
High end consumer Fixed Point
Dual access Fixed ALU
XRAM (256 Kbyte) 32+32->40
YRAM Fixed Add 32
(64 Kbyte) 32+32->40 data
PROM Fixed multiply 24
32 KByte 17x17->34 address
P-cache Fixed multiply
24 KByte 17x17->34 I/O
16
Power Mgment Viterbi data

6 channel 16
ACU
DMA controller address
Buffered serial
ACU
links, timers, ...

• Series continued; typical app.: UMTS handheld


• 1.6V, 200 MHz, .15µm (2000), 400 MIPS,0.05mW/MIPS (core), power
management per unit and per cycle

48 Specialized on-chip unit: will occur more often in future
© DHBK 2008
Texas Instruments TMS320C8x
Fixed Point Video
2 Kbyte RAM1 DSP processor 1
32
DSP processor 2 address
2 Kbyte RAM16
X- data
DSP processor 3
bar 64
2 Kbyte I-cache1
DSP processor 4

2 Kbyte I-cache4

General purpose
4 Kbyte D-cache
RISC processor

4 KByte I-cache Video controller

Transfer
2 KByte RAM
controller
• Series discontinued; typical app.: video phone, video conferencing,
multimedia workstations
• Introduced: 1995, 50 MHz, 305 pin
• Multiprocessor-on-a-chip; sub-word SIMD for each DSP
49
© DHBK 2008
Texas Instruments TMS320C6201
High end Fixed Point
fixed MUL
16KByte D-SRAM External memory
16x16->32
fixed MUL 23
16KByte D-SRAM address
16x16->32
fixed ALU data
16KByte D-SRAM
32+32->40 32
fixed ALU
16KByte D-SRAM
32+32->40
64KByte fixed ALU/branch
P-SRAM/cache 32+32->40
JTAG / clock pump fixed ALU/branch
Host interface
4 channel DMA 32+32->40
Ext. memory integer ACU 17
address
interface 32+32
2 Serial ports integer ACU data
2 Timers 32+32 16
• Series continued; typical app.: modems, multimedia
• 1997, 0.25 µm, 5ML, 352 pin, 200 MHz, 2.5V, 1.9W, $85
• Super scalar (8 Instr./cycle), 1600 MIPS

50
VLIW: 256 bit instruction word
© DHBK 2008
Texas Instruments TMS320C6202
High end Fixed Point
2x16KByte D-RAM fixed MUL
(Shadow load) 16x16->32 External memory
2x16KByte D-RAM fixed MUL 23?
(Shadow load) 16x16->32 address
2x16KByte D-RAM fixed ALU data
(Shadow load) 32+32->40 32
2x16KByte D-RAM fixed ALU
(Shadow load) 32+32->40
2x128KB P-RAM fixed ALU/branch
(Shadow load) 32+32->40
JTAG / clock pump fixed ALU/branch
Expansion bus
4 channel DMA 32+32->40
Ext. memory integer ACU 17?
address
interface 32+32
2 Serial ports integer ACU data
2 Timers 32+32 32
• Series continued; typical app.: modems, multimedia
• 1999, 0.18 µm, 5ML, 352 pin, 250 MHz, 1.8V, 1.9W, $130
• Super scalar (8 Instr./cycle), 2000 MIPS, scales well till 700 MHz
(6000 MIPS)

51 Optimum choice when all data fits in on-chip memory
© DHBK 2008
Texas Instruments TMS320C6203
High end Fixed Point
2x64KByte D-RAM fixed MUL
(Shadow load) 16x16->32 External memory
2x64KByte D-RAM fixed MUL 23?
(Shadow load) 16x16->32 address
2x64KByte D-RAM fixed ALU data
(Shadow load) 32+32->40 32
2x64KByte D-RAM fixed ALU
(Shadow load) 32+32->40
256KByte P-RAM fixed ALU/branch
128KB P-cache/RAM 32+32->40
JTAG / clock pump fixed ALU/branch
Expansion bus
4 channel DMA 32+32->40
Ext. memory integer ACU 17?
address
interface 32+32
2 Serial ports integer ACU data
2 Timers 32+32 32
• Series continued; typical app.: base stations
• 2000, 0.15 µm, 5ML, 18 mm2 package size, 300 MHz, 1.5V, 1.5W
• Super scalar (8 Instr./cycle), 2400 MIPS
• Optimum choice when all data fits in on-chip memory
52
© DHBK 2008
Texas Instruments TMS320C6211
High end Fixed Point
4KByte L1 Dcache fixed MUL
(2 way set assoc.) 16x16->32 External memory
4KByte L1 Pcache fixed MUL 30
(2 way set assoc.) 16x16->32 address
4x16KByte L2 fixed ALU data
cache (direct map) 32+32->40 32
fixed ALU
32+32->40
fixed ALU/branch
32+32->40
JTAG / clock pump fixed ALU/branch
Host port
16 channel DMA 32+32->40
Ext. memory integer ACU 17
address
interface 32+32
2 Serial ports integer ACU data
2 Timers 32+32 16
• Series continued; typical app.: modems, multimedia
• 1999, 0.18 µm, 5ML, 256 pin, 150 MHz, 1.8V, 1.5W, $25
• VLIW, 1.2 GIPS; cheap (25$ in ‘99, 5$ in ‘01)
• Optimum for random access to large memory space

53 80% of performance of C6x with infinite on-chip memory
© DHBK 2008
Texas Instruments TMS320C6416
High end Fixed Point
16 Kbyte L1P fixed MUL
direct mapped 16x16->32 External memory
16 Kbyte L1D fixed MUL 30
2way dual access 16x16->32 address
1 Mbyte RAM/L2 fixed ALU data
4way 32+32->40 64
Dual EMIF & HPI & fixed ALU
PCI & Utopia 32+32->40 30
address
JTAG / clock pump fixed ALU/branch
64 channel DMA 32+32->40 data
3 Serial ports fixed ALU/branch 16
3 Timers 32+32->40 HPI
Viterbi decoder integer ACU ?
accelerator 32+32 address
Turbo decoder integer ACU
data
accelerator 32+32
32
• Samples June 2001, 0.12 µm, 6 LM, 532 pin, 400 MHz-600 MHz, 1.2V,
starts at 95$ in volume
• Super scalar (8 Instr./cycle), 3200-4800 MIPS
• Sub-word (8bit or 16bit) parallelism

54 Specialized instr.: Galois Field Mult, bit manipulation
© DHBK 2008
Texas Instruments TMS320C6701
High end Floating Point
Fixed/Float MUL
16KByte D-SRAM External memory
32x32/64x64
Fixed/Float MUL 23
16KByte D-SRAM address
32x32/64x64
Fixed/Float ALU data
16KByte D-SRAM
32+32/64+64 32
Fixed/Float ALU
16KByte D-SRAM
32+32/64+64
64KByte Fixed ALU/Branch
P-SRAM/cache Float 1/x & √x
JTAG / clock pump Fixed ALU/Branch
Host interface
4 channel DMA Float 1/x & √x
Ext. memory integer ACU 17
address
interface 32+32
Serial interface integer ACU data
2 Timers 32+32 16
• Series continued; typical app.: video compression
• Introduced: 1998, 0.18 µm, 5ML, 352 pin, 167 MHz, 1.8V
• Super scalar (8 Instr./cycle); VLIW; 1 GFLOP
•55 Foreseen for ‘00: 50$ (cf. C6211) & 3 GFLOP (cf. C6202)
© DHBK 2008
Texas Instruments TMS320C6711
High end Floating Point
4KByte L1 Dcache Fixed/Float MUL
(2 way set assoc.) 32x32/64x64 External memory
4KByte L1 Pcache Fixed/Float MUL 23
(2 way set assoc.) 32x32/64x64 address
4x16KByte L2 Fixed/Float ALU data
cache (direct map) 32+32/64+64 32
Fixed/Float ALU
32+32/64+64
Fixed ALU/Branch
Float 1/x & √x
JTAG / clock pump Fixed ALU/Branch
Host interface
4 channel DMA Float 1/x & √x
Ext. memory integer ACU 17
address
interface 32+32
Serial interface integer ACU data
2 Timers 32+32 16
• Series continued; typical app.: video compression
• 2000, 0.18 µm, 5ML, 256 pin, 100 MHz, 1.8V, 2W, $20
• VLIW, 600 MFlops
• Optimum for random access to large memory space

56 80% of performance of C6x with infinite on-chip memory
© DHBK 2008
Motorola MC56xxx
Audio Fixed Point
16 or 24 bit 24
XRAM
integer CPU data

YRAM ACU 18
address

PRAM ACU

Loop controller Selection of


peripherals:
ADC, DAC, comm.,
timers, PIO, ...

• 24 bit for audio: 16 bit data + overflow

57
© DHBK 2008
Philips VSP-1
Fixed Point Video
12
512x12 bit 12 bit
Memory element integer ALU
512x12 bit 12 bit
Memory element integer ALU
12 bit
10x18 cross-bar
integer ALU 12
10

• 12 bit for video: 8 bit data + overflow


• Clock Frequency: 27 MHz
• 1 instruction per sample period for HDTV,
2 instructions per sample period for TV

58
© DHBK 2008
Philips VSP-2
Fixed Point Video
12
512x12 bit 12 bit
Memory element1 integer ALU1
512x12 bit 12 bit
Memory element2 integer ALU2

12
512x12 bit 12 bit
Memory element4 integer ALU12

22x50 cross-bar
22

• 12 bit for video: 8 bit data + overflow


• Clock Frequency: 54 MHz
• 2 instructions per sample period for HDTV,
4 instructions per sample period for TV

59
© DHBK 2008

1. Embedded system introduction

• Introduction
• Embedded hardware
 Overview
 Microcontroller
 DSP
 PSoC
 RSoC
• Embedded software

60
© DHBK 2008

Giới thiệu chung về PSoC

• PSoC là gì?
 Do hãng Cypress sản xuất
 Một loại công nghệ IC mới phát triển trong vài năm gần đây.
 Khả năng tích hợp động các loại linh kiện số và tương tự để
tạo ra các khối số hoặc tương tự với chức năng tuỳ thuộc
người dùng.
 Kết hợp với một vi điều khiển trung tâm.

61
© DHBK 2008

Cấu trúc PSoC


• Lõi PSoC
 Vi xử lý 8bit, 24MHz, 4MIPS
 Flash ROM (từ 16K)
 RAM (128b-2kb)
 Bộ điều khiển ngắt
 Bus
• Các khốI số
 Flip-Flop, cổng logic
• Các khốI tương tự
 Các bộ khuếch đạI thuật toán
 Điện trở
 Tụ điện điều khiển đóng ngắt
• Tài nguyên hệ thống
• Đặc biệt: Debugger core

62
© DHBK 2008

Ứng dụng

Xử lý tín hiệu Giao tiếp với cảm biến


• Phát hiện sóng Sin • Điện trở nhiệt
• Đo điện áp • Cặp nhiệt
• Đo tần số • Đo tín hiệu hồng ngoạI thụ động
• Điền chế/giảI điều chế • Thu siêu âm
• Lọc • Đo áp suất
• Nhân tương tự
• FSK

63
© DHBK 2008

Thiết kế hệ thống sử dụng PSoC


• Chuẩn bị
 IC
 Chương trình thiết kế: PSoC Designer
 Chương trình nạp và mạch nạp
• Các bước thiết kế PSoC sử dụng PSoC designer
 Thiết kế “cứng”
 Lựa chọn “linh kiện” để đưa vào các khốI số, tương tự
 Đưa các linh kiện vào các khốI và kết nốI
 Thiết lập các thông số
 Lập trình
 Kích hoạt các linh kiện: Component_Start()
 Viết các thuật toán sử dụng linh kiện
 Vòng lặp vô tận

64
© DHBK 2008

Một số linh kiện


• ADC (6-14 bit)
• DAC (6-9 bit)
• Khuếch đạI
• DTMF
• Bộ lọc (thông thấp, thông dảI)
• Bộ đếm, bộ định thờI (8-24 bit)
• Dồn kênh: số+tương tự
• Các linh kiện số: I2C, UART, giao tiếp LCD, mã CRC,
mã giả ngẫu nhiên, giao tiếp chuẩn thu /phát hồng
ngoại

65
© DHBK 2008

Chọn linh kiện

Linh kiện trong hệ thống

Tài
nguyên
hệ
thống

Chọn Hướng
linh dẫn sử
kiện dụng
linh
kiện

66
© DHBK 2008

Thiết kế

Thông
số
chung

n IC
S
BU
Thông

Châ
số linh

Số
kiện

Tương tự
67
© DHBK 2008

Lập trình

Quản lý
theo dự
án

68
© DHBK 2008

1. Embedded system introduction

• Introduction
• Embedded hardware
 Overview
 Microcontroller
 DSP
 PSoC
 RSoC
• Embedded software

69
© DHBK 2008

RSoC
• Reconfigurable System-on-Chip
 Processor core + (re)Programable logic
 E.g. FPGAs
 Changing the system behavior at the hardware level

70
© DHBK 2008

1. Embedded system introduction

• Introduction
• Embedded hardware
• Embedded software

71
© DHBK 2008

Basic Concepts

Main Features

 Timeliness
 Concurrency
Embedded Software  Liveness
User Input Output
 Heterogeneity
 Reactivity
 Robustness
 Low power
 Scaleable
Interaction with the physical world

72
© DHBK 2008

Basic Concepts

 Embedded Software is not software for small computers

 It executes on machines that are not computers (cars, airplanes,


telephones, audio equipment, robots, security systems…)

 Its principal role is not the transformation of data but rather the interaction
with the physical world

 Since it interacts with the physical world must acquire some properties of
the physical world. It takes time. It consumes power. It does not terminate
until it fails

73
© DHBK 2008
Basic Concepts–More Challenges

 The engineers that write embedded software are rarely computer scientists

 The designer of the embedded software should be the person who best
understands the physical world of the application

 Therefore, better abstractions are required for the domain expert in order to
do her job

 On the other hand, applications become more and more dynamic and their
complexity is growing rapidly

74
© DHBK 2008

Embedded Software Properties

•Written in high level programming languages:


• Typically in C but increasingly in Java or C++.

•Very stringent dependability requirements:


• human safety, consumer expectations, liability and government
regulation
•BMW recalled 15,000 7-series sedans in 2002 at an estimated
cost of $50 million.

•Very difficult to debug because of:


• concurrency, interrupts, exceptions, process scheduling and
hardware-in-the-loop.
75
© DHBK 2008

Embedded Operating Systems


• Office-style OSes
 PalmOS
 WindowsCE
• RTOSes
 VxWorks
 QNX
• Linux
 Linux is already ubiquitous
Hundreds of different devices are using it
 Several variations-from ‘soft real time’ to ‘hard real time’
 Numerous commercial + open source products
• Others
 TinyOS

76
© DHBK 2008

Embedded Operating Systems

The Embedded OS Market 2002

77
© DHBK 2008

Embedded Operating Systems

Growth of Embedded Linux

78

Das könnte Ihnen auch gefallen