Top Banner
8/12/2016 Chapter 2 1 ĐẠI HC QUC GIA TP.HCHÍ MINH TRƯỜNG ĐẠI HC BÁCH KHOA KHOA ĐIN-ĐIN TBMÔN KTHUT ĐIN T1 Embedded System Design Chapter 2: Develop a project of embedded system design 1. Design Process 2. Design Issues 3. Technology selection 4. Project plan Bmôn KThut ĐinT- ĐHBK 1. Embedded System Design Process Several models can be applied for embedded system design The waterfall model: in which there is a process for developing a system in steps, where results of one step flow into the next step. The spiral model: in which there is a process for developing a system in steps, and throughout the various steps, feedback is obtained and incorporated back into the process. Consecutive refinement model Most followed and simple model for building an Embedded System is Waterfall model Chapter 2 2
18

1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

Mar 10, 2020

Download

Documents

dariahiddleston
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: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 1

ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINHTRƯỜNG ĐẠI HỌC BÁCH KHOA

KHOA ĐIỆN-ĐIỆN TỬ BỘ MÔN KỸ THUẬT ĐIỆN TỬ

11

Embedded System Design

Chapter 2: Develop a project of embedded system design

1. Design Process

2. Design Issues

3. Technology selection

4. Project plan

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1. Embedded System Design Process

• Several models can be applied for embedded system design– The waterfall model: in which there is a process for developing a

system in steps, where results of one step flow into the next step.

– The spiral model: in which there is a process for developing a system in steps, and throughout the various steps, feedback is obtained and incorporated back into the process.

– Consecutive refinement model

• Most followed and simple model for building an Embedded System is Waterfall model

Chapter 2 2

Page 2: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1. Embedded System Design Process

3

Requirement definition

System specification

System partitioning

SW development

•Application SW•Compilers•Operating

Interface design

•SW driver•HW interface•User interface

HW design

•HW architecture•HW synthesis•Physical design

Integration and testing Reused components

Customers

System

architects

SW developer HW designer

CAD tools

Meet requirement?

No

YesDelivery and maintenance Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.1. System Specification

4

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.

Documents for System Specification

Chapter 2

Page 3: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 3

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.1. System Specification1. 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 )

• Example: Oven temperature control system

– 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

5Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.1. System Specification

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

6Chapter 2

Page 4: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 4

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.1. System Specification

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

7Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.1. System Specification

4. Software Specification:

– The requirements from engineering specification

– Interface to other software

– How the software implements the requirements

• Example: Oven temperature control system

– Temperature control algorithm

– Software functions: • void LCD_display(String str)

• int PID_control(int temp, int data[])

8Chapter 2

Page 5: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 5

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.1. System Specification

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

9Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.1. System Specification

• Group discussion

– Write a specification document for your own class project

10Chapter 2

Page 6: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 6

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.2. System partitioning• System partitioning: divide the system into three

parts:

– Hardware (HW): microcontrollers, memories, peripherals,

– Software (SW): OS, program, application software

– Interface: SW driver, HW interface, user interface

• Alternative way: divide the system into HW and SW

– which functions should be performed in hardware, and which in software?

– the more functions in software, the lower will be the product cost

11Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.2. System partitioning• System partitioning examples: Oven temperature control system

12Chapter 2

No. Functions Hardware Software

1 Measure temperature - Sensor LM35- AD converter

-ADC reading function-Calculate temperature value from the sensor input value

2 Display temperature value - LCD 1602 - LCD control function- Display function

3 Heating - Heater -Heater control function

4 Change the heating level - Button - Button reading function- Heating level setup function

5 Change heating time - Button - Timer function

Page 7: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 7

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

1.2. System partitioning

• Group discussion

– Apply system partitioning for your own class project

13Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

2. Embedded System Design Issues• Design issues are problems that make

it difficult to design an embeddedsystem

1. Constraint issues

– cost may matter more than speed

– long life cycle

– Reliability/safety

– Low-power

– Size / weight

Examples: Portable heart-beat monitor– Long life cycle (10 years)

– Reliability (accuracy 99%)

– Low-power (5 using days)

– Light weight (<1kg)

14Chapter 1

Page 8: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 8

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

2. Embedded System Design Issues1. Constraints

Examples for smart home system

15

No. Constraints Note

1 Low price (< 1.000.000 dong) Correct

2 Ability to detect smoke and fire Wrong

3 Low power (100mW when idle, 3W when active) Correct

4 Response time for control < 1ms ?

5 Support remote control by smartphones ?

6 Easy to install ?

Constraints are limitations or restrictions of some parameters of the system

Chapter 1

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

2. Embedded System Design Issues2. Functional issues

– safety-critical applications

– damage to life, health, economy

– affect to environment, society, politics

Example:

• Message LED for a shop– Display message for customers

– Malfunctions result in small damage

• Message LED for a stock market– Display stock data

– Malfunctions could damage to economy

• Battery charger– ?

16Chapter 1

Page 9: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 9

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

2. Embedded System Design Issues2. Functional issues

Examples for battery charger

17

No. Issues Note

1 Battery can be over-heat, it need to be detected by a sensor

Correct

2 Display a charging current and battery status Wrong

3 The system must have a fuse for protection of over current

?

4 Support 3 charging modes ?

5 Apply efficient algorithm for fast charging and increase battery life cycle

?

Functional issues are problems which can affect to life, health, economy, environment, society, politics, ethics.

Chapter 1

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

2. Embedded System Design Issues3. Real-time issues

– Determine whether the system is hard/soft/non real-time

– Determine the time constraint (delay)

Example

• Door entry alarm– Non/soft real-time system: delay < 1-2s

• Video recorder– Soft real-time system: delay < 1ms

• Car airbag system– ?

• Weather temperature monitoring– ?

18Chapter 1

Page 10: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 10

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

2. Embedded System Design Issues4. Concurrent issues

– System and environment run concurrently

– multi-functions

– interface with other systems

– May need a scheduler to manage concurrent tasks

Examples: Weather temperature monitoring

Multi-functions:

– Read temperature values from the sensor

– Write data to memory

– Display data on LCD

19Chapter 1

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

2. Embedded System Design Issues5. Reactive issues

– Continuous / discontinuous interaction

• Power on demand

– Turn ON when using

– Ex: MP3 player, Tivi system

• Always ON, once started run forever

– Continuous interaction with their environment

– Termination is a bad behavior => watchdog timer

– Ex: Camera surveillance system, data acquisition system

– Response to external periodic/non-periodic events

• Events are periodic: the system needs a scheduler to capture the events

• Events are non-periodic: the system needs to estimate miss event cases

20Chapter 1

Page 11: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 11

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

2. Embedded System Design Issues

• Group discussion

– Discuss about design issues of your own class project

21Chapter 1

Bộ môn Kỹ Thuật Điện Tử - ĐHBK22

3. Technology Selection

• Technology

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

• Three key technologies for embedded systems

– Processor technologies: general-purpose, application-specific, single-purpose

– IC technologies: Full-custom, semi-custom, PLD

– Design technologies: Compilation/synthesis, libraries/IP, test/verification

Chapter 2

Page 12: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 12

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

3. Technology Selection• Processor selection

– number of IO pins required

– interface required

– memory requirements

– number of interrupts required

– real-time considerations

– development environment

– processing speed required

23

General-purpose

processor

Single-purpose

processor

Application-specific

processor

Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK24

Processor technology• “Processor” not equal to general-purpose processor

Application-specific

Registers

CustomALU

DatapathController

Program memory

Assembly code for:

total = 0for i =1 to …

Control logic and State register

Datamemory

IR PC

Single-purpose (“hardware”)

DatapathController

Controllogic

State register

Datamemory

index

total

+

IR PC

Registerfile

GeneralALU

DatapathController

Program memory

Assembly code for:

total = 0for i =1 to …

Control logic and State register

Datamemory

General-purpose (“software”)

Chapter 2

Page 13: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 13

Bộ môn Kỹ Thuật Điện Tử - ĐHBK25

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

– IC’s consist of numerous layers (perhaps 10 or more)• IC technologies differ with respect to who builds each layer and

when

source drainchannel

oxide

gate

Silicon substrate

IC package IC

Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK26

Design technology

• Compilation/synthesis:

– C Compilers: CCS C, mikro C, Keil C, Code Composer Studio,

• Libraries/IP

– Stellarisware, Tivaware, STM32 Library,

– OS: Embedded Linux, RTOS

• Test/verification

– Development kits

– Simulation tools: Proteus, Orcad, PSIM

Chapter 2

Page 14: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 14

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

4. Project plan

• Build a team

• Build a plan

27Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

Build a team

• Important points about teams

– Teams bring together complementary skills and experiences

– Teams establish communication to support real-time problem solving

– Teams develop decisions by consensus rather than by authority

28Chapter 2

Page 15: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 15

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

Team Contract

29

TEAM CONTRACT

Team name: BK1 Date: 26 Aug. 2014

Team member Roles Signature

Nguyễn Văn A Leader, system engineer

Trần Văn B Hardware design

Nguyễn Thị C Software design

Tasks Responsible member

1. Develop system architecture Nguyễn Văn A

2. Design hardware Trần Văn B

3. Develop software Nguyễn Thị C

4. Integrate and test All

Team meeting 9AM, Wednesday, weekly

Team rules 1. Participate in all team meetings2. Listen carefully to all comments at meetings3. Complete all assigned tasks before deadlines4. Focus on results rather than excuses after.

Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

Build a plan

• Project planning activities

30

Identify the task

Develop teams

Develop schedule

Estimate time

Plan tasks

Approve plan

Refine plan

Proceed plan

Cancel plan

Chapter 2

Page 16: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 16

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

Project plan example (1)Project planning

Team name BK_DEE

Product name Home security system

Main features -Fire alarm-Door alarm-Send warning to home owner

Estimated Time 3 months (8 hours / a day)Start: 20 Aug. 2014 End: 20 Nov. 2014

Estimated Cost Components : 300,000 VNĐTools : 100,000 VNĐMaterials : 100,000 VNĐ

Total : 500,000 VNĐ

Team members Student 1: leaderStudent 2: hardware designStudent 3: software design

Schedule

31Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

Project plan example (2)Project planning

Schedule Month 1 Month2 Month 3

1. Design system architecture

2. Design hardware part

2.1. Design central control board

2.2. Design interface

2.3. Implement hardware board

3. Develop software part

3.1. Develop control algorithm

3.2. Develop driver, user interface

3.3. Implement software program

4. Integrate and test

4.1. Simulate operations

4.2. Verify system

32Chapter 2

Page 17: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 17

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

Class assignment• Design a embedded system for washing machine

33

No. Specification Describe

1 Product specification

-Washing process: soak, wash, rinse, spin-Mode: manual, fuzzy-Constraints

2 Engineering specification

-Inputs:-Outputs:-Use interface:

3 Hardware specification

-Microcontroller:-Sensors:-Actuators:

4 Software specification

-Functions:-Control algorithm:

5 Test specification

-Platform:-Test process:

Chapter 2

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

Group discussion

1. Consider the project car’s door mechanism

Write system specification for this project

34Chapter 2

Page 18: 1. Embedded System Design Processtqvinh/Lectures/ESD/ESD-Ch2_2016.pdf · 1. Embedded System Design Process • Several models can be applied for embedded system design – The waterfall

8/12/2016

Chapter 2 18

Bộ môn Kỹ Thuật Điện Tử - ĐHBK

Group discussion

2. Consider the project car door mechanism

Write team contract and plan for the project

35Chapter 2