42
Smart Home and Embedded System Design Class: International graduate stud ent Instructor: Dr.-Ing. Wei, Chao-Hua ng ( 魏魏魏 ) Office: S706-3 E-Mail: [email protected] Mobile Phone: 0930-937-932 Skype: drwei06

Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: [email protected]@mail.stust.edu.tw

Embed Size (px)

Citation preview

Page 1: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Smart Home andEmbedded System Design

Class: International graduate student

Instructor: Dr.-Ing. Wei, Chao-Huang (魏兆煌 )Office: S706-3E-Mail: [email protected] Phone: 0930-937-932Skype: drwei06

Page 2: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Self Introduction

I was born in Hsin-Chu Taiwan 1951, graduated from National Taiwan University with BS degree of Physics, then went to Germany for further study, and received Diplom Informatik degree from Institute of Informatik / Technical University Berlin Germany and Ph.D degree from Institute of Microelectronics in the year 1989. After that I returned to Taiwan and serviced several IT industry companies for about 10 years. Now I’m teacher at department of electrical engineering of Southern Taiwan University of Science and Technology.

In recent 6 years I have applied 42 patents and won 44 international invention awards.

Page 3: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Smart Home

Page 4: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Smart Home

Page 5: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Smart Home

Page 6: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Smart Home

Page 7: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Smart Home

Powerline Node 1(for DVD)

Powerline Node 2(for Lamp)

Web Controller

Page 8: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Course Schedule

Hardware Design (VHDL & Schematic Entry) Software Design (Microprocessor & C) HW & SW Co-design Small Real Time Operating System Ethernet NetworkEthernet Network Final Project

Page 9: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Content

What are embedded systems History and development of embedded systems Composition of embedded systems Characteristic of embedded systems Embedded system hardware development Embedded system software development

Page 10: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

What are embedded systems?

Definition: Embedded system : any device that includes a

programmable computer but is not itself a general-purpose computer.

Data processing systems except PCs and mainframe computers.

Embedded systems are application dedicated computing system.

Page 11: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

A More Detailed Definition

Embedded system are application oriented devices, which should be optimized with hardware and software resources. A special computing system with demand of functionality, reliability, cost, size, and power consumption.

Generally, an embedded system consists of 4 parts -- embedded microprocessor, peripheral hardware equipment, embedded operating system and user's application program , used for realizing the functions , such as control on other equipment , monitoring or management.

Page 12: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Characteristics (1/3)

Single-functioned Executes a single program, repeatedly Ex: RFID Reader

Tightly-constrained Low cost Low power Small Ex: MP3 Player

Page 13: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Characteristics (2/3)

Low cost Tens of thousands to millions of units Using a (relatively) suitable processor and s

mall memory size Low power

Ex: Calculator Slow speed

Fulfilling the requirement is OK

Page 14: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Characteristics (3/3)

Reactive and real-time Continually reacts to changes in the system’s en

vironment Must compute certain results in real-time witho

ut delay Ex: Microwave Oven

Firmware Software embedded in hardware devices

Page 15: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Characteristic of embedded systems

Dedicate for special application The embedded system is a specia

l-purpose system, while the PC is for general applications.

Technology integration Soft-/Hardware, computing and

network communication integration

Constrain of real-time Use RTOS commonly

Constrain of power consumption

Usually no difference of system software and application software, Software in ROM.

Small system kernel High reliability Resources much less then PC Requirement of special

development tools Not market monopoly

Page 16: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

History and development of embedded systems

First microprocessors was presented in 1971, it marks the beginning of the embedded system.

View history of embedded systems from 4 respects: Hardware Software Products System architecture

Page 17: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

History of embedded hardware

1971: Intel 4004, 4-bit microprocessor TI, TMS1000, 4-bit microcontroller

ROM, RAM, CPU + I/O port 1980: Intel MCS-51, 8microcontroller 16-bit, 32-bit microprocessor … 1990’s, DSP

TMS320C30

Page 18: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

History of embedded software

Procedure control and monitoring Operating system

1981, Embedded real time kernel VTRX32 1990’s, QNX-4 pSOS, VxWorks, Palm OS, WinCE, Embedded

Linux, LynxOS, uCOS, Nucleus… Win Mobile, iOS, Android

Page 19: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Architecture develops of embedded system

Hardware system 4-bit single chip 8-bit/ 16-bit single chip 32-bit special purpose m

icroprocessor 32-bit DSP SoC SoPC

Software system Real-time control/

monitoring procedure Dedicate system General purpose

system

Page 20: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

General structure of an embedded system

Processor I/OI/O

Software

Storage

Input Output

Page 21: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Embedding a computer

Page 22: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Example: Digital camera

Microcontroller

CCD preprocessor Pixel coprocessorA2D

D2A

JPEG codec

DMA controller

Memory controller ISA bus interface UART LCD ctrl

Display ctrl

Multiplier/Accum

Digital camera chip

lens

CCD

Input interface

Output display

Digital signal processor

Central processor

Page 23: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Typical embedded system hardware architecture

Chip Board Circuit

CPU Core

External Devices

USB LCD Pen Keyboard IRDA Others

Connection for DebuggingPorts

ResetCircuit

OscillationCircuit

PowerSupply

DMA

Timer

Prescaler

A/D

I/O Port

InterruptControler

ConnectingDRAM

ConnectingSRAM

ConnectingFlash

ConnectingROM

CPUBCU

Page 24: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

PDA: Handspring Visor Hardware Specs:

Operating System: Palm OS version 3.5.2H

Processor: 33 MHz Motorola Dragonball VZ (16-bit)

Memory: 8 MB RAM, 2M ROM Display: 160x160 pixel, High-Res B&W,

4-bit (16 shades of gray) . Touch Panel Battery: 2 AAA batteries PC Connection : USB, IrDA, UART Expansion Slot: PCMCIA  

Page 25: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

High-End Embedded System

Page 26: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Examples

Personal digital assistant (PDA). Printer. Cell phone. Automobile: engine, brakes, air condition, etc. Audio Video Recorder/Player. Household appliances. PC Keyboard/Mouse.

Page 27: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Software Architecture

Application Software

Hardware

Page 28: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Typical embedded system software architecture (VxWorks)

Software tools, application programs

VxWorks LibrariesTCP/IP I/O System

Wind kernel

BSP

File System

SCSI DriverNetwork Driver

Hardware dependent Software

EthernetController

SerialController

ClockTimer

SCSIController

Hardware

Hardware Independent Software

Page 29: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Embedded Operating System

Where to use Multi-Task Convenient user's interface Network function Upgrade and advance development

Basic functions of operating system Scheduling of multi-task Memory management Hardware resource management

Page 30: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Real-time operation

Must finish operations by deadlines. Hard real time: missing deadline causes failure. Soft real time: missing deadline results in

degraded performance. Many systems are multi-rate: must handle operations

at widely varying rates.

Page 31: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Fundamental hardware and software elements

Hardware Embedded processor Memory/Storage Circuits and power

supply Interface controller

and connector

Software Real time operating

system (RTOS) Board Support

Package ( BSP ) Device Driver Protocol Stack Application programs

Page 32: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Experiment board for the course

Page 33: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

DE2 Applications

Page 34: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Quartus II Design Software forHardware Circuits

Page 35: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Embedded system software development

Programming Languages Assemble, C, Java… Cross compiler

A kind program, which compiles the execution code of target machine on another host machine.

Page 36: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Development of Graphic User Interface

Page 37: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Embedded system software development

Programming Languages Assemble, C, Java… Cross compiler

A kind program, which compiles the execution code of target machine on another host machine.

Page 38: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Procedure of software development

Debug

Target Board

System ImageFile

.obj File

C/AssembleSource Code

Library Linker

Cross Compiler

Reset & Download

OS kernel Device Driver

Page 39: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Download and debugging of execution code

Development Platform

Target Platform

Download execution code

Return debug information

Page 40: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

Summary of Embedded System (1/3)

An "embedded system" is any computer system or computing device that performs a dedicated function or is designed for use with a specific embedded software application.

Embedded systems may use a ROM-based operating system or they may use a disk-based system, like a PC. But an embedded system is not usable as a commercially viable substitute for general purpose computers or devices.

Page 41: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

A specialized computer system that is part of a larger system or machine. Typically, an embedded system is housed on a single microprocessor board with the programs stored in ROM. Virtually all appliances that have a digital interface -- watches, microwaves, VCRs, cars -- utilize embedded systems. Some embedded systems include an operating system, but many are so specialized that the entire logic can be implemented as a single program.

Summary of Embedded System (2/3)

Page 42: Smart Home and Embedded System Design Class: International graduate student Instructor: Dr.-Ing. Wei, Chao-Huang ( 魏兆煌 ) Office: S706-3 E-Mail: drwei@mail.stust.edu.twdrwei@mail.stust.edu.tw

The embedded system can be divided into chip, board, and system level.

System on chip - Processor including the procedure or the algorithm in one chip.

System on board - board contains some core module.

System on system - in main computing system.

Summary of Embedded System (3/3)