Top Banner
Embedded Systems Embedded Systems Lecturer: Dr. Phm Ngc Nam
78

Embedded Systems P1

Nov 15, 2014

Download

Documents

hieutele

The lecture of digital designs. It focuses on the fundamental of digital designs, FPGA design, VHDL...
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Embedded Systems P1

Embedded SystemsEmbedded Systems

Lecturer: Dr. Phạm Ngọc Nam

Page 2: Embedded Systems P1

2

© DHBK 2008

About your lecturerAbout your lecturer

• Bộ môn kỹ thuật điện tử tin học, ĐHBK Hà nội� Office: C9-401

� Email: [email protected]

• 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, Đạihọ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

Page 3: Embedded Systems P1

3

© DHBK 2008

OutlineOutline

1. Embedded system introduction

2. Design with FPGA

3. VHDL

Page 4: Embedded Systems P1

4

© DHBK 2008

1. Embedded system introduction1. Embedded system introduction

• Introduction

� Definition

� Categories of embedded systems

� Characteristics of embedded systems

� Constraints of embedded systems

� Trends

• Embedded hardware

• Embedded software

Page 5: Embedded Systems P1

5

© DHBK 2008

DefinitionDefinition

Page 6: Embedded Systems P1

6

© DHBK 2008

DefinitionDefinition

**Engine Engine Performance and Performance and Emission ControlEmission Control

(Traction Control)(Traction Control)

**Safety SystemsSafety Systems

**Cabin Air Cabin Air QualityQuality

**Suspension Suspension and and

Braking ControlBraking Control

**Steering ControlsSteering Controls**EntertainmentEntertainment

**Intelligent Transportation Intelligent Transportation System (ITS)System (ITS)

**Digital Car Digital Car RadioRadio

**LightingLighting

**Gear BoxGear Box

• BMW > 100 processors

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

Page 7: Embedded Systems P1

7

© DHBK 2008

DefinitionDefinition

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

workstations

100K Departmental

supercomputer

Mainframe 1M Batch processing in

bank

Supercomputer 10M Weather forecasting

98% processors are used in embedded systems2% are used in PC

Page 8: Embedded Systems P1

8

© DHBK 2008

DefinitionDefinition

• 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

Page 9: Embedded Systems P1

9

© DHBK 2008

Categories of Embedded systemsCategories 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

Page 10: Embedded Systems P1

10

© DHBK 2008

Characteristics of Embedded Characteristics of Embedded

systemssystems

• 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

Page 11: Embedded Systems P1

11

© DHBK 2008

Constraints of Embedded systemsConstraints 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!

Page 12: Embedded Systems P1

12

© DHBK 2008

Constraints of Embedded systemsConstraints 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

Page 13: Embedded Systems P1

13

© DHBK 2008

TrendsTrends

1980 1985 1990 1995 2000 2005

Time

Number of transistors

1

10

100

1K

10K

100K

1M

55%/year

Exponential growth for 3 decades!

This is called ‘Moore’s law’: number of transistorsdoubles every 18 months(Gordon Moore, founder Intel Corp.)

Page 14: Embedded Systems P1

14

© DHBK 2008

Trends: PostTrends: Post--PC eraPC era

1960 1970 1980 1990 2000 2010

+ Communications

+ DSP

Mainframe

0.01ComputePower

1000

PC

1

10

Smart Things>100 #

+ AmbientIntelligence

1

/ human

Page 15: Embedded Systems P1

15

© DHBK 2008

Trends: smart thingsTrends: smart things

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

Page 16: Embedded Systems P1

16

© DHBK 2008

Trends: ambient intelligenceTrends: ambient intelligence

Now + 5 Years

Page 17: Embedded Systems P1

17

© DHBK 2008

© Emile Aarts, HomeLab, Philips

Trends: ambient intelligenceTrends: ambient intelligence

Page 18: Embedded Systems P1

18

© DHBK 2008

1. Embedded system introduction1. Embedded system introduction

• Introduction

• Embedded hardware

� Overview

� Microcontroller

� DSP

� PSoC

� RSoC

• Embedded software

Page 19: Embedded Systems P1

19

© DHBK 2008

1. Embedded system introduction1. Embedded system introduction

• Introduction

• Embedded hardware

� Overview

� Microcontroller

� DSP

� PSoC

� RSoC

• Embedded software

Page 20: Embedded Systems P1

20

© DHBK 2008

Overview of embedded hardwareOverview 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

Page 21: Embedded Systems P1

21

© DHBK 2008

Overview of embedded hardwareOverview of embedded hardware

Page 22: Embedded Systems P1

22

© DHBK 2008

Overview of embedded hardwareOverview 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

Page 23: Embedded Systems P1

23

© DHBK 2008

Overview of embedded hardwareOverview 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

Page 24: Embedded Systems P1

24

© DHBK 2008

RF / Analog

20032 Bit Cores

DisplaySoundDataBio

Actuators

50 GIPS-500GOPS

wwwgps

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

20 MbyteDistributed

Memory

200MHz

Reconfigurable interconnect

EmbeddedSoftware

1 M gatereconfigurable

computing

1 M gatehardwired

logic<1 Volt

< Watt

VoicePenVisionBioMotionSecurity.Sensors

Overview of embedded hardwareOverview of embedded hardware

Page 25: Embedded Systems P1

25

© DHBK 2008

RF / Analog

20032 Bit Cores

DisplaySoundDataBio

Actuators

50 GIPS-500GOPS

wwwgps

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

20 MbyteDistributed

Memory

200MHz

Reconfigurable interconnect

EmbeddedSoftware

1 M gatereconfigurable

computing

1 M gatehardwired

logic<1 Volt

< Watt

VoicePenVisionBioMotionSecurity.Sensors

• Mainly digital

• Lots of memory

• Flexibility� Programmable multi-processor network

�Re-configurable hardware

� 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

Overview of embedded hardwareOverview of embedded hardware

Page 26: Embedded Systems P1

26

© DHBK 2008

1. Embedded system introduction1. Embedded system introduction

• Introduction

• Embedded hardware

� Overview

� Microcontroller

� DSP

� PSoC

� RSoC

• Embedded software

Page 27: Embedded Systems P1

27

© DHBK 2008

MicrocontrollersMicrocontrollers

• 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

Page 28: Embedded Systems P1

28

© DHBK 2008

Microcontroller factsMicrocontroller facts

• Shipments- > 8 Billion in 2000, 8 bit > 1/2 market

• Major Players: Microchip 16Fxx, Intel 8051, Motorola MC68HC05, National COP800, SGS/Thomson ST62, ZilogZ86Cxx

Page 29: Embedded Systems P1

29

© DHBK 2008

PIC16C5xPIC16C5x

Page 30: Embedded Systems P1

30

© DHBK 2008

PIC16C5xPIC16C5x

• 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

Page 31: Embedded Systems P1

31

© DHBK 2008

PIC16C5xPIC16C5x

• 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.

Page 32: Embedded Systems P1

32

© DHBK 2008

Programmablechip selects

Interrupt logic

2 Timers

Serial asynch.Buffered I/O

1

12

7

Motorola MC68331Motorola MC68331

• Clock frequency: > 16 MHz

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

FT unit: watchdogclock&bus monitor

32 bitinteger CPU

address

data16

24

Page 33: Embedded Systems P1

33

© DHBK 2008

Motorola MC68332Motorola MC68332

• Clock frequency: > 16 MHz

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

FT unit: watchdogclock&bus monitor

32 bitinteger CPU

Programmablechip selects

Interrupt logic

Timer PU

Serial asynch.Buffered I/O

1

12

7

Parallel I/O≤≤≤≤ 48

address

data16

24

2 Kbyte RAM

Page 34: Embedded Systems P1

34

© DHBK 2008

Motorola MC68340Motorola MC68340

• Clock frequency: > 16 MHz

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

FT unit: watchdogclock&bus monitor

32 bitinteger CPU

Programmablechip selects

Interrupt logic

2 Timers

Serial asynch.I/O

2

4

7

Parallel I/O≤≤≤≤ 16

address

data16

32

2 channelDMA controller

Page 35: Embedded Systems P1

35

© DHBK 2008Motorola MC68HC05Motorola MC68HC05

Page 36: Embedded Systems P1

36

© DHBK 2008Motorola MC68HC05Motorola 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

Page 37: Embedded Systems P1

37

© DHBK 2008Motorola MC68HC05Motorola 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

• Extended operating temperature range of -40 to +125 °C

Page 38: Embedded Systems P1

38

© DHBK 2008

HHọọ vi vi điđiềềuu khikhiểểnn 80518051

• 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ácFPGA hay ASIC.

• Trên 100 triệu vi điều khiển 8051 được bán ra mỗină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.

Page 39: Embedded Systems P1

39

© DHBK 2008

MCSMCS--5151

• 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ảnxuất khác (như Siemens, Philips) là các nhà cungcấ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

Page 40: Embedded Systems P1

40

© DHBK 2008

HHọọ vi vi điđiềềuu khikhiểểnn 80518051

§iÒu khiÓnng¾t

CPU

Bédao ®éng

NguånNg¾tTrong

Ram trongThanh ghichøc n¨ng®Æc biÖt

128 byte RAM

Qu¶nlý Bus

Port 0

Port 1

Port 2

Port 3

CængnèitiÕp

XTAL 1,2 PSEN ALE §Þa chØthÊp/d÷ liÖu

§ÞachØ cao

007FFF80

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

128 byte

ram

Më réngtrong 8032

Page 41: Embedded Systems P1

41

© DHBK 2008

HHọọ vi vi điđiềềuu khikhiểểnn AVRAVR

Thanh ghi®iÒu khiÓn

§¬n vÞ ng¾t

§¬n vÞ SPI

UART nèi tiÕp

Timer/Counter 8 bÝt

Timer/Counter16 bit víiPWMBé ®Þnh thêi

watchdog

Bé so s¸nhanalog

15 ®−êng dÉnvµo/ra

Bé nhí flash1k x 16 choch−¬ng tr×nh

Bé ®Õmch−¬ng tr×nh

Tr¹ng th¸i vµkiÓm tra

Bus d÷ liÖu 8 bÝt

Thanh ghilÖnh

Bé gi¶im· lÖnh

Thanh ghi®a n¨ng32 x 8

ALU

128 x 8Data SRAM

128x8EEPROM

C¸c ®−êng ®iÒukhiÓn

Page 42: Embedded Systems P1

42

© DHBK 2008

1. Embedded system introduction1. Embedded system introduction

• Introduction

• Embedded hardware

� Overview

� Microcontroller

� DSP

� PSoC

� RSoC

• Embedded software

Page 43: Embedded Systems P1

43

© DHBK 2008

Texas Instruments TMS320C20xTexas Instruments TMS320C20x

Low end consumer Fixed PointLow end consumer Fixed Point

• Series continued; typical app.: Digital camera, feature-phones, disk drives, Point-of-Sales Terminal

• 40 MHz, 3.3-5V, 3LM

• Available as core

Selection ofperipherals:

serial comm.,timers,...

fixed MAC16x16+32->32

PROM

Dual accessdata RAM

address

data16

18

address

data16

16

I/OLoop controller

Page 44: Embedded Systems P1

44

© DHBK 2008

Texas Instruments TMS320C24xTexas Instruments TMS320C24x

Low end consumer Fixed PointLow end consumer Fixed Point

• Series continued; typical app.: electrical motor control

• 50 MHz, 5V

Selection ofperipherals:

serial comm.,timers,...

fixed MAC16x16+32->32

PROM

Dual accessdata RAM

address

data16

16

Loop controller

8 output PWM

8 channel A/D

CAN buscontroller

watchdog

Page 45: Embedded Systems P1

45

© DHBK 2008Texas Instruments TMS320C3xTexas Instruments TMS320C3x

Floating PointFloating Point

• Series discontinued; typical app.: speech, audio

• 60 MHz, 3.3-5V, 144 pin

• Super scalar

Loop controller

Selection ofperipherals:

serial comm.,timers, DMA, ...

32 bitfloating add

32 bitfloating multiply

PRAM

XRAM

YRAMaddress

data32

24

address

data32

24

I/O

ACU

ACU

Page 46: Embedded Systems P1

46

© DHBK 2008Texas Instruments TMS320C4xTexas Instruments TMS320C4x

Floating Point Message PassingFloating Point Message Passing

• Series discontinued; typical app.: prototyping, radar

• 60 MHz, 5V, 325 pin

• Super scalar; message passing multiprocessor

Loop controller

Serial link,timers

32 bitfloating add

32 bitfloating multiply

PRAM

4KByte XRAM

4KByte YRAM

20 MB/s

8

12 channelDMA controller

address

data32

32

address

data32

32

ACU

ACU

Page 47: Embedded Systems P1

47

© DHBK 2008

Texas Instruments TMS320C54xxTexas Instruments TMS320C54xx

High end consumer Fixed PointHigh end consumer Fixed Point

• 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 SRAMe.g. C5402: 5$ for 100 MIPS

Loop controller

Buffered seriallinks, timers, ...

6 channelDMA controller

Fixed ALU32+32->40

Fixed Add32+32->40

Fixed multiply17x17->34

Viterbi

PROM

Dual accessXRAM

YRAMaddress

data32

17

address

data16

16ACU

ACU

I/O

Page 48: Embedded Systems P1

48

© DHBK 2008

Texas Instruments TMS320C5510Texas Instruments TMS320C5510

High end consumer Fixed PointHigh end consumer Fixed Point

• 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

• Specialized on-chip unit: will occur more often in future

Power Mgment

Buffered seriallinks, timers, ...

6 channelDMA controller

Fixed ALU32+32->40

Fixed Add32+32->40

Fixed multiply17x17->34

Viterbi

PROM32 KByte

Dual accessXRAM (256 Kbyte)

YRAM(64 Kbyte)

address

data32

24

address

data16

16ACU

ACU

I/OFixed multiply

17x17->34P-cache24 KByte

Page 49: Embedded Systems P1

49

© DHBK 2008

Texas Instruments TMS320C8xTexas Instruments TMS320C8x

Fixed Point VideoFixed Point Video

• 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

DSP processor 1

DSP processor 2

DSP processor 3

DSP processor 4

General purposeRISC processor

Transfercontroller

data

address32

64

Video controller

2 Kbyte RAM 1

2 Kbyte RAM 16

2 Kbyte I-cache 1

2 Kbyte I-cache 4

4 Kbyte D-cache

2 KByte RAM

4 KByte I-cache

X-bar

Page 50: Embedded Systems P1

50

© DHBK 2008

Texas Instruments TMS320C6201Texas Instruments TMS320C6201

High end Fixed PointHigh end Fixed Point

• 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

• VLIW: 256 bit instruction word

fixed MUL16x16->32fixed MUL16x16->32fixed ALU32+32->40fixed ALU32+32->40

fixed ALU/branch32+32->40

fixed ALU/branch32+32->40

integer ACU32+32

integer ACU32+32

16KByte D-SRAM

16KByte D-SRAM

16KByte D-SRAM

16KByte D-SRAM

64KByteP-SRAM/cache

JTAG / clock pump4 channel DMA

2 Serial ports2 Timers

Ext. memoryinterface

data

address17

16

Host interface

data

address23

32

External memory

Page 51: Embedded Systems P1

51

© DHBK 2008

Texas Instruments TMS320C6202Texas Instruments TMS320C6202

High end Fixed PointHigh end Fixed Point

• 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)• Optimum choice when all data fits in on-chip memory

fixed MUL16x16->32fixed MUL16x16->32fixed ALU32+32->40fixed ALU32+32->40

fixed ALU/branch32+32->40

fixed ALU/branch32+32->40

integer ACU32+32

integer ACU32+32

2x16KByte D-RAM(Shadow load)

2x16KByte D-RAM(Shadow load)

2x16KByte D-RAM(Shadow load)

2x16KByte D-RAM(Shadow load)

2x128KB P-RAM(Shadow load)

JTAG / clock pump4 channel DMA

2 Serial ports2 Timers

Ext. memoryinterface

data

address17?

32

Expansion bus

data

address23?

32

External memory

Page 52: Embedded Systems P1

52

© DHBK 2008

Texas Instruments TMS320C6203Texas Instruments TMS320C6203

High end Fixed PointHigh end Fixed Point

• 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

fixed MUL16x16->32fixed MUL16x16->32fixed ALU32+32->40fixed ALU32+32->40

fixed ALU/branch32+32->40

fixed ALU/branch32+32->40

integer ACU32+32

integer ACU32+32

2x64KByte D-RAM(Shadow load)

2x64KByte D-RAM(Shadow load)

2x64KByte D-RAM(Shadow load)

2x64KByte D-RAM(Shadow load)

256KByte P-RAM128KB P-cache/RAMJTAG / clock pump

4 channel DMA

2 Serial ports2 Timers

Ext. memoryinterface

data

address17?

32

Expansion bus

data

address23?

32

External memory

Page 53: Embedded Systems P1

53

© DHBK 2008

Texas Instruments TMS320C6211Texas Instruments TMS320C6211

High end Fixed PointHigh end Fixed Point

• 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• 80% of performance of C6x with infinite on-chip memory

fixed MUL16x16->32fixed MUL16x16->32fixed ALU32+32->40fixed ALU32+32->40

fixed ALU/branch32+32->40

fixed ALU/branch32+32->40

integer ACU32+32

integer ACU32+32

4KByte L1 Dcache(2 way set assoc.)4KByte L1 Pcache(2 way set assoc.)

4x16KByte L2cache (direct map)

JTAG / clock pump16 channel DMA

2 Serial ports2 Timers

Ext. memoryinterface

data

address17

16

Host port

data

address30

32

External memory

Page 54: Embedded Systems P1

54

© DHBK 2008

Texas Instruments TMS320C6416 Texas Instruments TMS320C6416

High end Fixed PointHigh end Fixed Point

• 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• Specialized instr.: Galois Field Mult, bit manipulation

fixed MUL16x16->32fixed MUL16x16->32fixed ALU32+32->40fixed ALU32+32->40

fixed ALU/branch32+32->40

fixed ALU/branch32+32->40

integer ACU32+32

integer ACU32+32

JTAG / clock pump64 channel DMA

3 Serial ports3 Timers

16 Kbyte L1Pdirect mapped16 Kbyte L1D

2way dual access1 Mbyte RAM/L2

4wayDual EMIF & HPI &

PCI & Utopia

data

address?

32

HPI

data

address30

64

External memory

data

address30

16

Viterbi decoderaccelerator

Turbo decoderaccelerator

Page 55: Embedded Systems P1

55

© DHBK 2008

Texas Instruments TMS320C6701Texas Instruments TMS320C6701

High end Floating PointHigh end Floating Point

• 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

• Foreseen for ‘00: 50$ (cf. C6211) & 3 GFLOP (cf. C6202)

Fixed/Float MUL32x32/64x64

Fixed/Float MUL32x32/64x64

Fixed/Float ALU32+32/64+64

Fixed/Float ALU32+32/64+64

Fixed ALU/BranchFloat 1/x & √√√√x

Fixed ALU/BranchFloat 1/x & √√√√xinteger ACU

32+32integer ACU

32+32

16KByte D-SRAM

16KByte D-SRAM

16KByte D-SRAM

16KByte D-SRAM

64KByteP-SRAM/cache

JTAG / clock pump4 channel DMA

Serial interface2 Timers

Ext. memoryinterface

data

address17

16

Host interface

data

address23

32

External memory

Page 56: Embedded Systems P1

56

© DHBK 2008

Texas Instruments TMS320C6711Texas Instruments TMS320C6711

High end Floating PointHigh end Floating Point

• 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• 80% of performance of C6x with infinite on-chip memory

Fixed/Float MUL32x32/64x64

Fixed/Float MUL32x32/64x64

Fixed/Float ALU32+32/64+64

Fixed/Float ALU32+32/64+64

Fixed ALU/BranchFloat 1/x & √√√√x

Fixed ALU/BranchFloat 1/x & √√√√xinteger ACU

32+32integer ACU

32+32

JTAG / clock pump4 channel DMA

Serial interface2 Timers

Ext. memoryinterface

data

address17

16

Host interface

data

address23

32

External memory4KByte L1 Dcache(2 way set assoc.)4KByte L1 Pcache(2 way set assoc.)

4x16KByte L2cache (direct map)

Page 57: Embedded Systems P1

57

© DHBK 2008Motorola MC56xxxMotorola MC56xxx

Audio Fixed PointAudio Fixed Point

• 24 bit for audio: 16 bit data + overflow

16 or 24 bitinteger CPU

Loop controller Selection ofperipherals:

ADC, DAC, comm.,timers, PIO, ...

ACU

PRAM

XRAM

YRAMaddress

data24

18

ACU

Page 58: Embedded Systems P1

58

© DHBK 2008Philips VSPPhilips VSP--11

Fixed Point VideoFixed Point Video

• 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

12 bitinteger ALU

12 bitinteger ALU

512x12 bitMemory element

512x12 bitMemory element

12 bitinteger ALU

10x18 cross-bar

12

12

10

Page 59: Embedded Systems P1

59

© DHBK 2008Philips VSPPhilips VSP--22

Fixed Point VideoFixed Point Video

• 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

22x50 cross-bar22

12

12

12 bitinteger ALU 1

12 bitinteger ALU 2

512x12 bitMemory element 1

512x12 bitMemory element 2

12 bitinteger ALU 12

512x12 bitMemory element 4

Page 60: Embedded Systems P1

60

© DHBK 2008

1. Embedded system introduction1. Embedded system introduction

• Introduction

• Embedded hardware

� Overview

� Microcontroller

� DSP

� PSoC

� RSoC

• Embedded software

Page 61: Embedded Systems P1

61

© DHBK 2008

GiGiớớii thithiệệuu chungchung vvềề PSoCPSoC

• 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ộcngười dùng.

�Kết hợp với một vi điều khiển trung tâm.

Page 62: Embedded Systems P1

62

© DHBK 2008

CCấấuu trtrúúcc PSoCPSoC

• 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

Page 63: Embedded Systems P1

63

© DHBK 2008

ỨỨngng ddụụngng

Xử lý tín hi ệu• Phát hi ện sóng Sin • Đo điện áp• Đo tần số• Điền chế/giảI điều chế• Lọc• Nhân tương tự• FSK

Giao ti ếp với cảm biến• Điện trở nhiệt• Cặp nhi ệt• Đo tín hi ệu hồng ngo ạI thụ động• Thu siêu âm• Đo áp su ất

Page 64: Embedded Systems P1

64

© DHBK 2008

ThiThiếếtt kkếế hhệệ ththốốngng ssửử ddụụngng PSoCPSoC

• 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

Page 65: Embedded Systems P1

65

© DHBK 2008

MMộộtt ssốố linhlinh kikiệệnn

• 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ồngngoại

Page 66: Embedded Systems P1

66

© DHBK 2008

ChChọọnn linhlinh kikiệệnn

Chọnlinhkiện

Linh kiện trong hệ thống

Tàinguyênhệthống

Hướngdẫn sửdụnglinhkiện

Page 67: Embedded Systems P1

67

© DHBK 2008

ThiThiếếtt kkếế

ChânIC

BUS

Số

Tươngtự

Thôngsốchung

Thôngsố linhkiện

Page 68: Embedded Systems P1

68

© DHBK 2008

LLậậpp trtrììnhnh

Quản lýtheo dự

án

Page 69: Embedded Systems P1

69

© DHBK 2008

1. Embedded system introduction1. Embedded system introduction

• Introduction

• Embedded hardware

� Overview

� Microcontroller

� DSP

� PSoC

� RSoC

• Embedded software

Page 70: Embedded Systems P1

70

© DHBK 2008

RSoCRSoC

• Reconfigurable System-on-Chip

� Processor core + (re)Programable logic

�E.g. FPGAs

�Changing the system behavior at the hardware level

Page 71: Embedded Systems P1

71

© DHBK 2008

1. Embedded system introduction1. Embedded system introduction

• Introduction

• Embedded hardware

• Embedded software

Page 72: Embedded Systems P1

72

© DHBK 2008

Basic Concepts

Embedded Software

Main Features

� Timeliness

� Concurrency

� Liveness

� Heterogeneity

� Reactivity

� Robustness

� Low power

� ScaleableInteraction with the physical world

User Input Output

Page 73: Embedded Systems P1

73

© DHBK 2008

Basic Concepts

� Embedded Software is not software for small computers

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

� It executes on machines that are not computers (cars, airplanes,telephones, audio equipment, robots, security systems…)

� 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

Page 74: Embedded Systems P1

74

© 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

Page 75: Embedded Systems P1

75

© DHBK 2008

Embedded Software PropertiesEmbedded 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.

Page 76: Embedded Systems P1

76

© DHBK 2008

Embedded Operating SystemsEmbedded 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

Page 77: Embedded Systems P1

77

© DHBK 2008

Embedded Operating SystemsEmbedded Operating Systems

The Embedded OS Market The Embedded OS Market 20022002

Page 78: Embedded Systems P1

78

© DHBK 2008

Embedded Operating SystemsEmbedded Operating Systems

Growth of Embedded Linux Growth of Embedded Linux