lifecyle phase

Embed Size (px)

Citation preview

  • 8/7/2019 lifecyle phase

    1/23

    CS4101

    Design and Development

    9/16/2010Slides from Computers as Components: Principles of Embedded Computing System Design , Wayne Wolf , Morgan Kaufman;An Embedded Software Primer , David E. Simon , Addison Wesley

  • 8/7/2019 lifecyle phase

    2/23

    2

    N ow, You Have Decided to

    Save the Earth!

    But how?

  • 8/7/2019 lifecyle phase

    3/23

    3

    Af ter Extensive Study, You FoundFac t 1: If every elev a tor in the world moves one

    less floor, the annu a l world CO 2 emission will beredu ced by X%

    Fac t 2: If a person climbs one floor, he or she willburn Y ca lories

    Wh at a business to h elp exercises& save eart h!

  • 8/7/2019 lifecyle phase

    4/23

    4

    Your Product IdeaTo develop a devi ce th a t can re cord, for e achday, the number of floors th a t the user h asclimbed and the number of floors th a t the user

    has t aken the elev a torFrom this number, we can then ca lcula te the amount of CO2 saved and ca lories burnedLet us ca ll this devi ce st a ir counter

    How to start from here?

  • 8/7/2019 lifecyle phase

    5/23

    5

    T ypical Design Flow

    requirements

    specification

    architecture

    componentdevelopment

    systemintegration

    Top-downdesign

    Bottom-updesign

    Rea l designoften iter a tive

  • 8/7/2019 lifecyle phase

    6/23

    6

    RequirementsPla in langu age des cription of wh a t theuser w ants and expe cts to get

    e.g. to develop a devi ce th a t can re cord,

    for e ach d ay, the number of floors th a t the user h as climbed and the number of floors th a t the user h as t aken the elev a torVision the end produ ct used b y the user

    May be developed in sever a l way s:t a lking dire ctly to customerst a lking to m arketing represent a tivesproviding protot y pes to users for comment

    requirements

    specification

    architecture

    component

    developmentsystem

    integration

  • 8/7/2019 lifecyle phase

    7/23

    7

    RequirementsOften need to know t arget customers andbusiness model

    St a ir counter as an add-on of cell phone

    St a ir counter as a consumer produ ct

    St a ir counter as a gift

  • 8/7/2019 lifecyle phase

    8/23

    8

    RequirementsFun ction a l requirements :

    Output as a fun ction of input; intern a ls as a black box

    Show number of st a irs climbed and amount of ca lories burnedShow number of floors b y elev a tor and amount of CO2 sav edDo not count in other cases

    Non-fun ction a l requirements :Perform ance, reli abilit y , et c.Size, weight, et c.Power consumptionCost

    D escribe WHAT, not HOW

  • 8/7/2019 lifecyle phase

    9/23

    9

    Requirements Form

    name Stair counterpurpose Count and show stairs climbed

    and floors in elevatorsinputs ower-on/off buttonoutputs Back-lit LCD 200 X 300performance Update on every step

    manufacturing cost $150power 100 mWphysical size/weight No more than 2 X 3 , 4 oz.

  • 8/7/2019 lifecyle phase

    10/23

    10

    Speci f icationMore pre cise, usu a lly qu antit a tivedes cription of the system :

    Should not imply a particular archite cture

    List assumptionse.g., upd a te s creen 0.25 se c after e achstep, error r a te < 95%, cost < $300

    May include fun ction a l andnon-fun ction a l elementsMay be exe cut able or m ay be in m a them a tica lform for proofs

    e.g. UML (Unified Modeling L angu age)

    requirements

    specification

    architecture

    componentdevelopment

    systemintegration

  • 8/7/2019 lifecyle phase

    11/23

    11

    A rc h itecture DesignW ha t m ajor components s a tisfy thespe cifica tion? HOW

    Need to know wh a t are ava ilable

    Hardw are components :CPUs, peripher a ls, et c.e.g. 8051 C PU, 3- axis acc elerometer

    Softw are components :

    Major progr ams and their oper a tionse.g. no O S , acc elerometer driver, LCD driverMust t ake into acc ount fun ction a l and non- fun ction a l spe cifica tions

    requirements

    specification

    architecture

    componentdevelopment

    systemintegration

  • 8/7/2019 lifecyle phase

    12/23

    1 2

    Design ConsiderationsE nvironment whi ch the embedded system is inE xtern a l and intern a l stimulus sour ces th a t inter ac t with the embedded system I/ O

    Actions and events caused by stimulusE lements of the embedded system th a t could beaffected by the stimulus

    Desired system responses to the stimulus, whi ch

    refle cts one or more system requirementsa lgorithm / wor kflowHow the system responses can be me asures

  • 8/7/2019 lifecyle phase

    13/23

    1 3

    Component DevelopmentActu a l implement a tion of individu a lhardw are and softw are components

    Must spend time archite cting the system

    before you st art codingSome components are re ady-m ade,some can be modified from existingdesigns, others are to be designedfrom s cra t ch

    e.g. 8051 CPU, 3- axis acc elerometerGood surveys help

    requirements

    specification

    architecture

    componentdevelopment

    systemintegration

  • 8/7/2019 lifecyle phase

    14/23

    14

    System IntegrationPut together the components

    Many bugs appe ar only a t this st ageRequire good interf ace definition from

    the st art Have a plan for integr a tingcomponents to un cover bugs qui ckly,test as mu ch fun ction a lity as e arlyas possible

    requirements

    specification

    architecture

    componentdevelopment

    systemintegration

  • 8/7/2019 lifecyle phase

    15/23

    1 5

    System DevelopmentNow th a t you h ave better ide a of therequirements, spe cifica tions, andarchite cture of the st a ir counter

    How to pro ceed to develop thecomponents and integr a te thesystem?

    But, Rea l hardw are?Progr amming environment?

    requirements

    specification

    architecture

    componentdevelopment

    systemintegration

  • 8/7/2019 lifecyle phase

    16/23

    1 6

    Development EnvironmentHost : a computer running progr amming toolsfor development Target : the H W on whi ch code will runAfter progr am is written, compiled, assembledand lin ked, it is tr ansferred to the t arget

    Host system Target system

    X8 6 80 5 1

  • 8/7/2019 lifecyle phase

    17/23

    1 7

    Wh at I f Real H W N ot Available?D evelopment bo ard :

    Before re a l hardw are is built, softw are can bedeveloped and tested using development bo ardsD

    evelopment bo ards usu a lly have the s ame C PU asthe end produ ct and provide m any IO peripher a ls forthe developed softw are to useas if it were running on there a l end produ ct

    Pla tform-b ased design

  • 8/7/2019 lifecyle phase

    18/23

    1 8

    Plat f orm-Based Design

    Pla tform :

    PLD

    Common tools for progr am development Integr a ted D evelopment E nvironment (I DE ):

    Toolcha in: cross compiler, lin ker, lo ader, OS and rel a ted libr aries and p acka ges

  • 8/7/2019 lifecyle phase

    19/23

    1 9

    Cross CompilerRuns on host but gener a tes code for t arget

    Target usu a lly have different archite cture from host.Hen ce compiler on host h as to produ ce bin ary

    instru ctions th a t will be understood by t arget

  • 8/7/2019 lifecyle phase

    20/23

    2 0

    DevelopmentProcess

    Process for cre a tinginstru ctions th a t arebuilt on host but

    me ant for the t arget Tools are comp a tiblewith e ach other

    a tool cha in

    Binutils: as, ldGlibc C runtime Lib

    GCC C/ C++ compiler

  • 8/7/2019 lifecyle phase

    21/23

    2 1

    Linker/ LocatorsFor computers :

    Lin ker : cre a tes an i mage f i le to be ru n on host L oad er : load s i mage f i le in to memory d ur in g ru n- t i me

    For embe dd ed systems :L oca ter : cre a tes a f i le, con t a inin g b in ary i mage orother form a t, th a t w i ll be cop i ed on to t arget, wh i chrun on i ts ow n (n ot through lo ad er)It n ee d s ex ac t add resses beforeh an d

    Cert a in parts of progr am n ee d in ROM an d somein RAM

    Norm a lly d on e by d i vi d in g progr am in segme n tsL oca tor n ee d s to be tol d where in memory to pl acesegme n ts

  • 8/7/2019 lifecyle phase

    22/23

    22

    Getting So f tware into T argetPROM Progr ammers

    Classic way use output file to build a ROM or PROM(if softw are still needs some changes)

    ROM E mula torsReplace (emul a te) ROM in the t arget systemLook like a ROM with a seri a l port or networ k conne ction to t a lk to host

    In -Circuit E mula tors (IC E )Replace pro cessor with an emul a tor for debuggingUse overl ay-memory to get softw are to t arget

  • 8/7/2019 lifecyle phase

    23/23

    23

    Getting So f tware into T argetMonitors

    Progr ams on t arget ROM tha t know how to lo ad newprogr ams to the system

    S tore user softw are sent from host through a communi ca tions lin k (seri a l) to t arget RAMand run it Might a lso perform some lo ca tor and debuggerfun ctions (setting bre akpoints, che cking registerva lues) et c. a lso