嵌入式项目开发过程PPT课件_第1页
嵌入式项目开发过程PPT课件_第2页
嵌入式项目开发过程PPT课件_第3页
嵌入式项目开发过程PPT课件_第4页
嵌入式项目开发过程PPT课件_第5页
已阅读5页,还剩68页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

.,1,第八讲:嵌入式项目开发过程EmbeddedSystemProjectManagement主讲教员:徐欣,国防科大电子科学与工程学院嵌入式系统开放研究小组,面向二十一世纪的嵌入式系统设计技术,.,2,主要内容,嵌入式设计生命周期选择过程划分决策详细的硬件与软件设计嵌入式硬件开发过程嵌入式软件开发过程软硬件协同设计过程开发、调试环境与工具,.,3,嵌入式项目设计的各个阶段(图),.,4,嵌入式项目设计的七个具体阶段,产品定义软件与硬件的划分迭代与实现详细的硬件与软件设计硬件与软件集成产品测试与发布持续维护与升级,.,5,嵌入式项目开发过程中使用的工具,参见PDF文档中的Figure1.2,.,6,嵌入式项目设计生命周期(一)产品定义,工程师追求卓越的功能和性能浪费时间和资源决策层早期一般不允许工程师接触客户损失了一些有用的建议和观点理想的客户研究访问首席:市场营销;第二成员:记录与提问其他技术人员:参与探讨并形成产品蓝图列出必做适宜清单,找到设计产品的共同蓝图,.,7,嵌入式项目设计生命周期(二)硬件与软件的划分,观点:软硬件是可以互相替换的如:浮点运算与浮点处理器(FPU)等两种不同的划分策略优化处理器能力和软件通过ASIC设计找到解决途径划分中需要考虑的许多需求价格低、性能领先、市场竞争、知识产权等CPU的选择将影响划分决策和开发工具选择,.,8,嵌入式项目设计生命周期(三)迭代与实现,迭代与实现阶段的主要特点:主要障碍可能还是在软硬件的详细划分上设计约束被深刻理解和建模保留软硬件划分之间的余地软硬件设计人员之间的迭代结构体系模拟器:Simulator评估板或开发板:EvaluationBoard目的:减小设计阶段后期风险,.,9,嵌入式项目设计生命周期(四)详细的硬件与软件设计文档管理,这里不详细讨论软硬件设计问题大部分同学在其他课程中学到的C/C+/JAVA编程技术、数字设计和微处理器知识使他们有足够的机会解决设计中遇到的问题文档管理与质量控制设计复用和可视化减小设计修改成本有助于测试和质量控制,.,10,嵌入式项目设计生命周期(五)硬件与软件集成,NotaeasyProblemBigEndian/LittleEndian引发的问题调试过程及实时系统调试方法带来的一些问题等嵌入式系统设计中软硬件集成的理想状态由第一个硬件原型、应用软件、驱动代码、操作系统设计出完美的系统没有致命错误没有飞线不用重新设计ASIC或FPGA没有太多的软件设计修改,.,11,嵌入式项目设计生命周期(六)产品测试与发布,嵌入式产品测试具有特殊的意义人们或许可以容忍PC偶然死机,但是核电站报警系统?!导弹控制系统?!PC外围硬件Isthereanyproblemwithyou?测试的目的不仅是确信软件不会在关键时刻崩馈还必须查明是否在运行时能接近最优性能,尤其是用高级语言编写或多个开发人员编写的程序每个微小的错误都可能是致命的如轻微内存泄漏,长时间运行才能发现的问题等,.,12,嵌入式项目设计生命周期(七)产品维护和升级,产品维护的模式维护/支持小组!设计小组维护详细文档经验技巧上一代产品产品升级的巨大代价理解原设计人员的思路与代码反向逆推并改进原始设计小组的工作需要非凡的技艺或强大的反向设计工具否则,不如开始新的设计,这是原供应商和生产上所不愿意看到的,.,13,主要内容,嵌入式设计生命周期选择过程划分决策详细的硬件与软件设计嵌入式硬件开发过程嵌入式软件开发过程软硬件协同设计过程开发、调试环境与工具,.,14,选择过程处理器平台,选择处理器是一个复杂的工作,它不仅是一个简单的“优化”问题,必须通过四道关键测试:是否便于实现是否能够提供足够的性能是否有合适的操作系统支持是否有大量合适的开发工具(和设计资源)支持其他因素可能会影响这种选择上市时间、企业对特定开发商的偏好或承诺等,.,15,Howdowechoosemicroprocessor?,PowerBudget,CostofGoods,Real-timeConstraints,LegacyCode,Performance,TimetoMarket,Landmines,ToolSupport,.,16,BruteforcemethodofimprovingperformanceBottleneckcouldbeinsoftwaredesignorcompiler!FasterisntalwaysbetterPerformanceClockspeedTrade-off:AsclockspeedenergyMemorycostsincreaseOtherperipheraldeviceswillcostmore,ClockSpeed,.,17,Evaluatingprocessorperformance,Clockspeed:butinstructionspercyclemaydifferInstructions/sec:butworkperinstructionmaydifferDhrystone:Syntheticbenchmark,developedin1984SPEC:realisticbenchmarks,butorientedtodesktopsEEMBCEDNEmbeddedBenchmarkConsortium,Suitesofbenchmarks:automotive,consumerelectronics,networking,officeautomation,telecommunications,.,18,vonNeumannArchitecture,memory,CPU,PC,address,data,IR,ADDr5,r1,r3,200,200,ADDr5,r1,r3,.,19,Harvardarchitecture,CPU,PC,datamemory,programmemory,address,data,address,data,.,20,vonNeumannvs.Harvard,Harvardcantuseself-modifyingcode.Harvardallowstwosimultaneousmemoryfetches.MostDSPuseHarvardarchitectureforstreamingdata:greatermemorybandwidth;morepredictablebandwidth.,.,21,ARMvs.SHARC,ARM7isvonNeumannarchitectureWewillconcentrateonARM7ARM9isHarvardarchitectureSHARCismodifiedHarvardarchitecture.Onchipmemory(1Gbit)evenlysplitbetweenprogrammemory(PM)anddatamemory(DM)Programmemorycanbeusedtostoresomedata.Allowsdatatobefetchedfrombothmemoryinparallel,.,22,uPPerformance,Widthofdatapathperformance(WidthofDataPath)2ThemostgeneralcategorizationofprocessorperformanceTypicaldatabuswidths:4,8,16,32,64,128bitswideWiderdatabusses-greaterdataprocessingcapabilityDatabuswidthtrade-off,thewiderdatapath:IsmorecomplextodesignTakesupmoreroomonPCboardsGeneratesgreateramountsofenergyRequiresmorecostlymemorydesignsIsnotcompatiblewithexistinghardware,.,23,Moreondatapathwidth,Datapathwidthgenerallydeterminesfunctionality4,8bits-Appliances,modems,simpleapplications16bits-Industrialcontrollers,automotive32bits-Telecomm,laserprinters,high-performanceapps64bits-PCs,UNIXworkstations,games128,256bits(VLIW)-NextgenerationInternalandexternaldatapathsmaydifferinsizeNarrowermemoryismoreeconomicalMC68000:32-bitinternal/16-bitexternalMC68008:32-bitinternal/8-bitexternal80C188:16-bitinternal/8-bitexternalRemember:An8-bitprocessorcandoalmosteverythinga64-bitprocessorcando,itwilljusttakelongertoaccomplish,.,24,ProcessorMicro-architecture,On-chipinstruction/datacache,howbig?PipelinesSuperscalar/VLIWTrade-off-highperformancecostsmoney,powerAddressbusdesignAddressbuswidth:16-36bitsMultiplexed,synchronous,asynchronousProcessortype:CISC,RISC,DSPWhatisthenatureofthealgorithmtoimplement?Controlrich:CISCDatarich:RISCDatatransformsandmathematicalprocessing:DSP,.,25,Moreonaddressbuswidth,TheamountofexternallyaccessiblememoryisdefinedastheAddressSpaceoftheprocessorCanvaryfrom1KBforsimplemicrocontrollerstoover60GBinhighperformanceprocessorsSizeoftheaddressspacedoesntmeanthatyouhavethatmuchmemory,itonlymeansthatthecapabilitiesexisttodirectlyaccessitProcessorswithsmalleraddressspacescanstillmanipulatelargermemoryarrayswithtechniquessuchasPagingSpecialmemoryorI/OlocationusedtoswapinandoutmemorypagesExample:An8-bitZ80processorwitha16-bitaddressbus(64K)canaddressa1Mbyteaddressspacebyswappingbetweenoneof16,64Kbyte,memorypages,.,26,CombineCISC,RISCandDSPinasingledesignTightcouplingorloosecouplingArchitectureCodedesign,compilercapabilitiesDebugtoolavailabilitySystemsimulationtools,SingleorMultipleprocessors,.,27,Microprocessorormicrocontroller?Review:AmicroprocessorcontainsthebasicCPUfunctionality,andmoreAmicrocontrollercombinestheCPUcorewithperipheraldevicesThemicroprocessorisusuallytheleadingedgeofperformanceLowestlevelofintegrationHighestcostHigherlevelsofintegrationimplyLowersystemcostsGreaterreliabilityLesspowerFasterHigherprocessorcostAsuPmaturesthecoremovesintotheuCfamilies,Integrationoffunctions,.,28,RAM,ROM,FLASH,Timers,DMA,$100KNRE,Coprocessor,Cache,A/DConverter,SerialPorts,Ethernet,ParallelPorts,Watchdog,LCDController,FLASH,PCIBusBridge,CPUCore,Real-timeClock,CSSAP490B,.,29,主要内容,嵌入式设计生命周期选择过程划分决策详细的硬件与软件设计嵌入式硬件开发过程嵌入式软件开发过程软硬件协同设计过程开发、调试环境与工具,.,30,划分决策,软件与硬件的双重性软件与硬件的分离:基于开发成本和性能的决策新的硬件描述语言:HDLHandel-C协同设计过程,.,31,Hardware/SoftwarePartitioning,DefinitionTheprocessofdeciding,foreachsubsystem,whethertherequiredfunctionalityismoreadvantageouslyimplementedinhardwareorsoftwareGoalToachieveapartitionthatwillgiveustherequiredperformancewithintheoverallsystemrequirements(insize,weight,power,cost,etc.)Thisisamultivariateoptimizationproblemthatwhenautomated,isanNP-hardproblem,.,32,HW/SWPartitioningIssues,PartitioningintohardwareandsoftwareaffectsoverallsystemcostandperformanceHardwareimplementationProvideshigherperformanceviahardwarespeedsandparallelexecutionofoperationsIncursadditionalexpenseoffabricatingASICsSoftwareimplementationMayrunonhigh-performanceprocessorsatlowcost(duetohigh-volumeproduction)Incurshighcostofdevelopingandmaintaining(complex)software,.,33,PartitioningApproaches,Startwithallfunctionalityinsoftwareandmoveportionsintohardwarewhicharetime-criticalandcannotbeallocatedtosoftware(software-orientedpartitioning)Startwithallfunctionalityinhardwareandmoveportionsintosoftwareimplementation(hardware-orientedpartitioning),.,34,主要内容,嵌入式设计生命周期选择过程划分决策详细的硬件与软件设计嵌入式硬件开发过程嵌入式软件开发过程软硬件协同设计过程开发、调试环境与工具,.,35,软硬件设计过程中的文档管理,需求分析文档(产品定义阶段)总体方案设计(选择过程和软硬件划分)概要设计文档(软硬件初步设计)详细设计文档(软硬件详细设计)测试需求文档(模块测试及联调准备)系统测试报告(测试小组)使用说明文档/源程序注释,.,36,总体方案设计,项目概述(来自需求分析文档)功能与指标描述(来自需求分析文档)系统外部接口描述系统软硬件设计框架(选择过程和划分决策)软硬件模块化设计概要功能、接口时间与进度安排(甘特图)产品成本估算研制经费需求,.,37,甘特图,.,38,模块化设计,功能描述接口描述:硬件接口与软件参数设计流图自然语言流程框图原理框图状态流图UML:统一建模描述语言,.,39,状态流图软硬件统一描述方式,StateDiagramofRecordingaMessage,Checkthenumberofmessages,TurnontheWarning,Turnoffthewarning,Generatememoryaddressandrecordmessagetargetmaybehardtocontrol;maybehardtogeneraterealisticinputs;setupsequencemaybecomplex.,.,44,InstructionLevelSimulator,HostbasedsoftwarethatsimulatesthefunctionalityandinstructionsetofthetargetprocessorTwotypesFunctionality-accurateImplementsonlyinstructionsetCycle-accurateMaintaincycle-by-cycleaccuracyofprocessor,includingcache,pipeline,andmemorybehaviorUsefulinearlystageoftheprojectDisadvantage:NosimulationofperipheralsCannotmodelinteractionwithI/Odevices,.,45,RemoteDebugger,Front-endrunsonhostcomputerandprovidesuserinterfaceBackendrunsontargetprocessorandcommunicateswiththefront-endovercommunicationlinkBackendisknownasdebugmonitorandprovideslowlevelcontroloftargetprocessor,.,46,Debugmonitor,AmonitorprogramresidingonthetargetROMprovidesbasicdebuggerfunctionsReadregisterxModifyregisteryReadnbytesofmemorystartingataddressModifydataataddressRuntobreakpointSinglestepLoadcodeDebuggershouldhaveminimalfootprintinmemory.Userprogrammustbecarefulnottodestroydebuggerprogram,.,47,Debugmonitor(Contd.),SYSTEMROMCODEPARTITION,0 x00000,0 xFFFFF,Poweronresetcode,SerialPortInt.Vector,SerialPortISR,DebugKernel,Softwaredebugtrapvector,ApplicationProgram,HOST-BASEDDEBUGGERPROGRAM-Knowledgeofsourcefiles-KnowledgeofobjectfilesSymbolTableCrossreferencefiles,SERIALCOMMLINK,1,0,2,3,0,1,2,.,48,Debugmonitors:Advantages,Lowcost:$0to200channels,1GHzdataratesCanobserveentiredigitalsystematthesametimeCanbeusedinconjunctionwithinstrumentedcodeforrealtimemeasurementsincachedprocessors,.,60,LogicAnalyzer:Disadvantages,CanbeveryexpensiveStrictlypassive,cannotprovidecontrolofprocessorComplexNotwell-integratedintosoftwaredesignenvironmentMustcombinewithothertoolsforcompletesolutionCachedprocessorscannotbeobservedCodemustbeinstrumentedifcacheisnotvisible,.,61,In-circuitemulators(ICE),AnICEprovidesanintegrationofthemostimportantfunctionsrequiredtodebugembeddedsystemsMicroprocessorrunControl(Debugmonitor)Memorysubstitution(ROMEmulator)RealTimeTrace(LogicAnalyzer)Amicroprocessorin-circuitemulatorisaspecially-instrumentedmicroprocessor.,.,62,Atypicalengineerwithemulator,Typicalengineer,Emulator,Targetsystem,HostComputer,.,63,ICE(Contd.),Targetsystem,Probeheadcontainemulationmicroprocessor-Substitutesfor,ordisablestargetmicroprocessor-Containsruncontrolcircuitryandcablebuffers-Maycontainmemorymappinghardware,Mainchassis-Containsemulation(overlaymemory)-Traceanalysishardwareandtracememory-Performanceanalysishardware(-Powersupply-Controlandcommunications,Hostcomputerrunsemulatorcontrolsoftware-Providesruncontrol-Displaysrealtimetraceatsourcelevel-Loadsoverlaymemorywithobjectcode-High-speedlinktoemulationchassis,.,64,ICE(Contd.),RuncontrolSimilartothefunctionalityofasoftwaredebugkernelPeek/pokememoryModifyregistersSinglestepSetbreakpointsDisassemblememorycodeDownloadcode,.,65,ICE(contd.),OverlaymemorySimilartofunctionalityofROMemulatorProvidesoverlay(substitution)memoryfortargetsystemmemoryEntirememoryspacecanbe“mapped”toprovidememoryregionsinanywhereintheaddressspaceoftargetprocessorEmulationmemoryinterspersedwithtargetsystemmemoryEmulationmemorycanbeassignedspecialattributesROM(nowritesallowed)Guarded(breakonwrite)CodespaceordataspaceSharedmemory(simulatedI/O),.,66,ICEAdvantages,Premiertoolforembeddedsystemhw/swintegrationProvidesallthefunctionalityneededforconnectivity,observationandcontrolofanembeddedsystemControlofthemicroprocessorisguaranteed,independentofthestateoftargetsystemhardwareOverlaymemorysubstitutesforthetargetsystemROMtopermittraceofcodeexecutionTracesprogramflowFilteroutextraneousbusactivity(pre-fetches)SpecialcircuitrycandisplaycacheactivityTightintegrationthroughsingleuserinterfaceonhostCanprovideveryuniqueandvaluablemeasurements,.,67,ICE:Disadvantages,Notalwaysmostcost-effectivesolutionCanbeextremelyexpensive($20K)CostlytoequipateamofdesignersNewemulatoroftenrequiredfornewprocessororupgradeViewedasacomplexandfragileinstrumentAvailabilityusuallylagsearlysiliconCannoteasilytrackmicrocontrollervariantsConnectivitytosurface-mountedprocessorsisverydifficult,andtheproblemisgettingworseViewingcachedprogramactivitycanbeverydifficult(or,atworst)impossibleNotthetoolofchoiceforcodedesignattheupperlevelsofabstraction,.,68,JointTestActionGroup(JTAG),Originallydevelopedasaboardtestmethodologytoreplace“bedofnails”testersPCboardstestedoncomplexmachineswithdensearrayofpointcontacts(bedofnails)toconnecttoeverynodeontheboardNodeisasharedinterconnectionbetweenboardcomponentsLinkoutputsofalldigitaldevicesonPCboard

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论