46
ESW聯盟 「嵌入式系統與軟體工程」 Introduction 課程:嵌入式系統與軟體工程 開發學校:輔仁大學資工系 范姜永益

Software Design for Embedded Systemscilab.csie.ncu.edu.tw/course/esw/CH1-1.pdf · ESW聯盟「嵌入式系統與軟體工程」 Motivation for Course • According to forecasts characterized

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

  • ESW聯盟 「嵌入式系統與軟體工程」

    Introduction

    課程:嵌入式系統與軟體工程

    開發學校:輔仁大學資工系

    范姜永益

  • ESW聯盟 「嵌入式系統與軟體工程」

    Introduction

    • How many embedded systems did you use/know today?

    2

  • ESW聯盟 「嵌入式系統與軟體工程」

    Motivation for Course

    • According to forecasts characterized by terms such as

    – Disappearing computer,

    – Ubiquitous computing,

    – Pervasive computing,

    – Ambient intelligence,

    – Post-PC era.

    • Basic technologies:

    – Embedded Systems

    – Communication technologies

  • ESW聯盟 「嵌入式系統與軟體工程」

    What is an Embedded System (ES)?

  • ESW聯盟 「嵌入式系統與軟體工程」

    ES Market?

    • CPU is not only in general-purpose computer

    • Embedded systems use more than 95% of all manufactured processors in the world. (Annually, 80 million PCs but about 3000 million CPUs in ES.)

    • PC market is almost saturated but embedded systems market is growing.

    5

  • ESW聯盟 「嵌入式系統與軟體工程」

    What is an Embedded System?

    • Embedded system: any device that includes a programmable computer but is not itself a general-purpose computer– With OS (use microprocessors)– Without OS (use microcontrollers)

    • Take advantage of application characteristics to optimize the design:– Do not need all the general-purpose bells and whistles

    6

  • ESW聯盟 「嵌入式系統與軟體工程」7

    The Basic Architecture is similar with General Purpose Computer

    CPU

    mem

    input

    output analog

    analog

    embeddedcomputer

  • ESW聯盟 「嵌入式系統與軟體工程」8

    Why Embedded Computer?

    • The evolution of a Watch

  • ESW聯盟 「嵌入式系統與軟體工程」9

    Why Embedded Computer?

    More smarter, more functionalities, digitalized and connecting with virtual world

  • ESW聯盟 「嵌入式系統與軟體工程」

    Mobisys Tutorial, San Francisco

    A New Paradigm of Computing

    year

    log

    (peo

    ple

    per c

    ompu

    ter)

    Streaming information

    to/from physical world

    Number CrunchingData Storage

    ProductivityInteractive

    Mainframe

    Minicomputer

    WorkstationPC

    LaptopPDA

  • ESW聯盟 「嵌入式系統與軟體工程」

    Embedded Systems and Ubiquitous Computing• Ubiquitous computing: Information anytime, anywhere.• Embedded systems provide fundamental technology.

    Ist.gif

    UMTS,

  • ESW聯盟 「嵌入式系統與軟體工程」

    EXAMPLESSome embedded systems from real life

  • ESW聯盟 「嵌入式系統與軟體工程」13

    • Product: Sonicare Elite toothbrush

    • Microprocessor: 8-bit

    • Has a programmable speed control, timer, and charge gauge

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」14

    Inside view of a Microsoft Mouse

    Examples of Embedded Systems

    • Product: Any PC Mouse, Keyboard, or USB Device

    • Microprocessor: 8-bit Microcontroller

  • ESW聯盟 「嵌入式系統與軟體工程」15

    Examples of Embedded Systems

    • Product: Any Disk Drive

    • Microprocessor: Dual 32-bit Marvel ARM SOC & mixed signal DSP

  • ESW聯盟 「嵌入式系統與軟體工程」16

    • Product: Vendo Vue 40 vending machine

    • Microprocessor: Two 16-bit Hitachi H8/300H Processors

    • A robot hand dispenses items

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」17

    Photograph courtesy of NASA/JPL CALTECH

    • Product: NASA's Twin Mars Rovers

    • Microprocessor: Radiation Hardened20Mhz PowerPC

    • Commercial Real-time OS

    • Software and OS was developed during multi-year flight to Mars and downloaded using a radio link

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」18

    • Product: Sony Aibo ERS-7 Robotic Dog

    • Microprocessor: 64-bit MIPS R7000

    • OS: Aperios - Sony’s Real Time OS

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」19

    • Product: Radiant Systems Point-of-Sale (POS) Terminal

    • Microprocessor: Intel X86 Celeron

    • OS: Windows XP Embedded

    • Look for one next time you order fast food!

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」20

    • Product: Microsoft’s Smart Personal Object Technology (SPOT) watch

    • Microprocessor: 32-bit ARM with FM Radio Chip

    • Downloads News using extra bandwidth on FM radio stations in major cities

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」21

    • Product: Motorola Q Pocket PC Phone

    • Microprocessor: TI OMAP (ARM+DSP)

    • OS: Windows Mobile 5.0(Windows CE OS)

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」22

    • Product: Atronic Slot Machine

    • Microprocessor: X86• OS: Windows CE• Slots are networked to a casino’s back office computer system. State Gaming agencies audit code and payoff odds

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」23

    • Product: Dresser Wayne Ovation iX Gas Pump

    • Microprocessor: Marvel Xscale (ARM)

    • OS: Windows CE• Displays video ads &is networked to a gas station’s back office computer system. Also has remote maintenance features

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」24

    • Product: Bernina Artista 200 Sewing Machine

    • Microprocessor: Marvel StrongARM

    • OS: Windows CE• Can download new images from Internet and sew them

    Examples of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」25

    Aircraft & Military Systems

    Aircraft autopilots, avionics and navigation systems, automatic landing systems, guidance systems, engine controls.

    Biomedical XRAY, MRI, and Ultrasound imaging systems, patient monitors, heart pacers.

    Cars Engine control, anti-lock braking systems, traction control systems, air bag controls, heating and air conditioning controls, GPS mapping, Satellite Radio, On-board Diagnostics.

    Communications Communication Satellites, network routers, switches, hubs.

    More Examples

  • ESW聯盟 「嵌入式系統與軟體工程」

    Computer I/O devices

    Keyboards, mouse, printers, scanners, displays, modems, hard disk drives, DVD drives, graphics cards, USB devices.

    Electronic Instrumentation

    Oscilloscopes, voltmeters, signal generators, logic analyzers.

    Home Electronics Microwave ovens, dishwashers, DVD players, televisions, stereos, security systems, cameras, TVs, clock radios, answering machines, satellite or cable box

    Industrial Equipment

    Elevator controls, surveillance systems, robots, CNC machines, Programmable Logic Controllers, industrial automation and control systems.

    26

    More Examples

  • ESW聯盟 「嵌入式系統與軟體工程」27

    OfficeMachines

    FAX machines, copiers, telephones, calculators, cash registers.

    Personal Devices

    Cell phones, portable MP3 players, Video players, Personal Digital Assistants (PDAs), electronic wrist watches, handheld video games, digital cameras, GPS systems.

    Robots Industrial robots, autonomous vehicles, space exploration robots (i.e. Mars robots)

    Toys Video Game systems, “Aibo”, "Furby“, and “Elmo” type robot toys.

    More Examples

  • ESW聯盟 「嵌入式系統與軟體工程」

    Characteristics

  • ESW聯盟 「嵌入式系統與軟體工程」

    Characteristics of Embedded Systems

    Must be dependable,• Reliability R(t) = probability of system working correctly provided

    that is was working at t=0• Maintainability M(d) = probability of system working correctly d

    time units after error occurred.• Availability A(t): probability of system working at time t• Safety: no harm to be caused• Security: confidential and authentic communication

    Even perfectly designed systems can fail if the assumptions about the workload and possible errors turn out to be wrong.Making the system dependable must not be an after-thought, it must be considered from the very beginning

  • ESW聯盟 「嵌入式系統與軟體工程」

    Characteristics of Embedded Systems

    • Must be efficient− Energy efficient− Code‐size efficient

    (especially for systems on a chip)

    − Run‐time efficient− Weight efficient− Cost efficient

    • Dedicated towards a certain applicationKnowledge about behavior at design time can  be used to minimize resources and to maximize robustness

    • Dedicated user interface(no mouse, keyboard and screen)

  • ESW聯盟 「嵌入式系統與軟體工程」

    – Many ES must meet real-time constraints• A real-time system must react to stimuli from the controlled

    object (or the operator) within the time interval dictated by the environment.

    • For real-time systems, right answers arriving too late are wrong.

    • “A real-time constraint is called hard, if not meeting that constraint could result in a catastrophe“ [Kopetz, 1997].

    • All other time-constraints are called soft.• A guaranteed system response has to be explained without

    statistical arguments

    Characteristics of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」

    Real-Time Systems

    • Embedded and Real-Time Synonymous?– Most embedded

    systems are real-time

    – Most real-time systems are embedded

    embedded

    real-time

    embedded real-time

  • ESW聯盟 「嵌入式系統與軟體工程」

    – Frequently connected to physical environment through sensors and actuators,

    – Hybrid systems(analog + digital parts).

    – Typically, ES are reactive systems:“A reactive system is one which is in continual interaction with is environment and executes at a pace determined by that environment“ [Bergé, 1995]

    – Behavior depends on input and current state.

    Characteristics of Embedded Systems

  • ESW聯盟 「嵌入式系統與軟體工程」

    Challenged for Embedded Software

    Dynamic environments

    Capture the required behaviour!

    Validate specifications

    Efficient translation of specifications into implementations!

    How can we check that we meet real‐time constraints?

    How do we validate embedded real‐time software? (large volumes of data, testing may be safety‐critical)

  • ESW聯盟 「嵌入式系統與軟體工程」35

    Why OS in Embedded Device?

    • Support for multitasking, scheduling, and synchronization

    • Support for a wide range of I/O devices• Support for file systems• Scheduling and buffering of I/O operations• Support for networking• Memory management• Support for graphics displays• Security and Power Management

  • ESW聯盟 「嵌入式系統與軟體工程」

    36

    Introduction to Embedded OS

  • ESW聯盟 「嵌入式系統與軟體工程」 37

    Introduction to Embedded OS

    • Windows CE / Windows Mobile– Microsoft– Support CPU: x86, ARM, MIPS, …etc– Windows CE Platform Builder– eVC, eVB– Friendly GUI– Application: PDA, WebPAD, PVR,

    Thin Client, …etc

  • ESW聯盟 「嵌入式系統與軟體工程」 38

    • DOS– Microsoft– 16 bits, single user single task– Application: LED billboard, industry control

    Introduction to Embedded OS

  • ESW聯盟 「嵌入式系統與軟體工程」 39

    • Palm OS– Palm Computing– Succinct architecture– Small hardware requirement– low-power– Application: PDA

    Introduction to Embedded OS

  • ESW聯盟 「嵌入式系統與軟體工程」 40

    • VxWorks– WindRiver– Support CPU: x86, i960, MIPS, PowerPC– Popularly use in embedded systems– GNU compiler and debugger– Hard real time

    – It’s famous to apply to robot on Mars and Sony robot

    • MicroC/OS– Hard real time

    Introduction to Embedded OS

  • ESW聯盟 「嵌入式系統與軟體工程」 41

    • Symbian– The mobile operating system– Friendly GUI– Development with Microsoft

    Virtual C++ 6.0 and S60 (SDK)– The main competitor is Windows

    Introduction to Embedded OS

  • ESW聯盟 「嵌入式系統與軟體工程」 42

    • Linux/Embedded Linux– Support CPU: x86, ARM, MIPS, SH,

    i960, PowerPC, …etc– Open Source– Powerful Network Functions– Easy Software Porting – GNU Complier and Debugger

    Introduction to Embedded OS

    http://wiki.openmoko.org/wiki/Image:Neo_front_3.gif

  • ESW聯盟 「嵌入式系統與軟體工程」43

    Commercial OS Used

    0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00%

    Others

    Palm

    Green Hills

    Symbian

    Wind River

    Microsoft Emb.

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

  • ESW聯盟 「嵌入式系統與軟體工程」44

    Programming Languages Used

    0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 60.00% 70.00%

    Others

    Assembly

    Java

    C#

    C++

    C

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

  • ESW聯盟 「嵌入式系統與軟體工程」45

    Course Theme

    • Work through the design and development of an embedded system– Domains: ARM-based Digital Photo Frame

    • Emphasize on– Expressing, communicating, and documenting the process– Innovation development and execution (problem solving)– Team work

  • ESW聯盟 「嵌入式系統與軟體工程」46

    Two Threads

    • Design process through UML and CMMI

    • Platform introduction– ARM 9

    IntroductionIntroductionMotivation for CourseWhat is an Embedded System (ES)?ES Market?What is an Embedded System?The Basic Architecture is similar with General Purpose ComputerWhy Embedded Computer?Why Embedded Computer?A New Paradigm of ComputingEmbedded Systems and Ubiquitous ComputingEXAMPLESExamples of Embedded SystemsExamples of Embedded SystemsExamples of Embedded Systems投影片編號 16投影片編號 17投影片編號 18投影片編號 19投影片編號 20投影片編號 21投影片編號 22投影片編號 23投影片編號 24投影片編號 25投影片編號 26投影片編號 27Characteristics投影片編號 29投影片編號 30投影片編號 31Real-Time Systems投影片編號 33Challenged for Embedded SoftwareWhy OS in Embedded Device?Introduction to Embedded OSIntroduction to Embedded OS投影片編號 38投影片編號 39投影片編號 40投影片編號 41投影片編號 42Commercial OS UsedProgramming Languages UsedCourse ThemeTwo Threads