大学课件CS4101嵌入式系统概论DesignandDevelopment.ppt
CS4101 嵌入式系統概論Design and Development,http:/,懦陋雾瓜慢眯坟吨汾彬犁续秤破透契堡坍氯等偏页暇蒙犬帆踢谊吭岸侯蔚【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Recap,More and more physical things will be augmented or embedded with computingThings become“smarter”Computing becomes ubiquitousAn embedded system is a system that is embedded with programmable computers for specific applications of that systemWhy embedded systems?Faster,more flexible development at lower costMore complex functionalities,http:/,磷掳樱撮蜜冀淤店杯县彩纺幅亡栗跺杰未牙曝鼻泉驹与蓝番北洱咯佐淮矩【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Suppose You Have a Product Idea,To develop a device that can record,for each day,the number of stairs that the user has climbed up or downFrom this number,we can then calculate the amount of CO2 saved and calories burnedLet us call this device stair counterHow to start from here?,http:/,轮止样浙撇妻楔败产牟胎吮玛戌聚柬菠呻芹痔煌篷刃毒沉涌瘫忧雨膝挡菌【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Typical Design Flow,requirements,specification,architecture,componentdevelopment,systemintegration,Top-downdesign,Bottom-updesign,Real design often iterative,http:/,渔顷恋比挨苑蔑汽认省妄大斗造氧僵簇最阅域惶歼狠豫诡淋牧隔慑瘸挤仟【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Requirements,Plain language description of what the user wants and expects to gete.g.to develop a device that can record,for each day,the number of stairs that the user has climbed up or downDescribe how the end product is usedby the userMay be developed in several ways:talking directly to customerstalking to marketing representativesproviding prototypes to users for comment,http:/,添歹裔哺软毯仕且捡洽免崎京共吴痞拥痔蘑酚伪便生副氮宜手娶沽砰馏闽【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Requirements,Often need to know target customers and business modelStair counter as an add-on of cell phoneStair counter as a consumer productStair counter as a gift,http:/,恨克卯谆胜杭黍登姚策蝎烤蛆副蒙臭双慢崎她粗羡伎矫斧耘蓄朝酣以灶卸【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Requirements,Functional requirements:Internals as a black box and describe only the outputs as a function of input;Show number of stairs climbed up or downShow amount of CO2 savedDo not count in other casesNon-functional requirements:Performance,reliability,etc.Size,weight,etc.Power consumptionCost,Describe“WHAT”,not“HOW”,http:/,置仍喇雪咖聘奸昂瑞置陪瞅苯臀窄埠握戍屉支喉版吼严匙乍沂谈绘努缆斗【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Requirements Form,http:/,盎描肠彭郁淬死遣路懒服揽疑数猴肾书妄晶竣杯饵浸汽盗刹疹薄影赃勒痞【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Specification,More precise,usually quantitative description of the system:Should not imply a particular architectureList assumptionse.g.,update screen 0.25 sec after eachstep,error rate 95%,cost$300May include functional and non-functional elementsMay be executable or may be in mathematical form for proofse.g.UML(Unified Modeling Language),http:/,共缠勤哑雅鸡焉醉逾痒诽诛体床跺韧谦童折疽母皆凝肥乏箱誊谊傅格能公【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Architecture Design,What major components satisfy the specification?HOWNeed to know what are availableHardware components:CPUs,peripherals,etc.e.g.MSP430 CPU,3-axis accelerometerSoftware components:Major programs and their operationse.g.no OS,accelerometer driver,LCD driverMust take into account functional and non-functional specifications,http:/,巷勉祟怨娇岿辞兼七蔼挣矽国珍佬棒岸梧奶吐涤颗锅熟油拣森遏苍络映杨【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Design Considerations,Environment which the embedded system is inExternal and internal stimulus sources that interact with the embedded system I/OActions and events caused by stimulusElements of the embedded system that could be affected by the stimulusDesired system responses to the stimulus,which reflects one or more system requirements algorithm/workflowHow the system responses can be measures,http:/,佳蒸奢供暂制哪叹滑轩钒后搀鳃啊蛮酥插瓣陡沟正堕库询麻旷犬亥需被橱【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Component Development,Actual implementation of individualhardware and software componentsMust spend time architecting the system before you start codingSome components are ready-made,some can be modified from existing designs,others are to be designed from scratche.g.MSP430 CPU,3-axis accelerometerGood surveys help,http:/,罚贴键夹种听购碳悯答裴齐征满制耕怠袭彩框漾许份轧接寒斗拘瞒澳拿普【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,System Integration,Put together the componentsMany bugs appear only at this stageRequire good interface definition fromthe startHave a plan for integrating components to uncover bugs quickly,test as much functionality as early as possible test and verification,http:/,炬叶轮功母柏溢墙巴热郸恤杉水立酵抗绿相拈即肾龟摄笺兢苇良整遣莹任【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,System Development,Now that you have better idea of the requirements,specifications,and architecture of the stair counterHow to proceed to develop the components and integrate the system?But,Real hardware?Programming environment?,http:/,杂汾画睦逐戴留蜀庶墟式毯询蓬忱佣钳扳牵啦罚出靶谣兼坯后沿绪袭揉痕【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Development Environment,Host:a computer running programming tools for developmentTarget:the HW on which code will runAfter program is written,compiled,assembled and linked,it is transferred to the target,Host system,Target system,X86,MSP430,http:/,拄己狱痕栖跑轨嚎晃爬宣皱角疫汉茄翁宅坟独闽聚匠劲仕噎饿小召胀迟净【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,What If Real HW Not Available?,Development board:Before real hardware is built,software can be developed and tested using development boardsDevelopment boards usually have the same CPU as the end product and provide many IO peripherals for the developed software to useas if it were running on thereal end productTools for program developmentIntegrated Development Environment(IDE):cross compiler,linker,loader,OS and related libraries and packages,http:/,玻议椰碘汲音抢凯瘪阻浪抉声肛赦贵浓平劫对集喧缠镭疙练日亿省调栽臂【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Cross Compiler,Runs on host but generates code for targetTarget usually have different architecture from host.Hence compiler on host has to produce binary instructions that will be understood by target,http:/,铸揭熄惺趟霉汕锈炮匡湖糊跟煽露辱床爪求鞋褒虐藏指干拷兜钧搪碱廖滞【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Development Process,Process for creating instructions that are built on host but meant for the targetTools are compatible with each other a toolchainBinutils:as,ldGlibc:C runtime LibGCC:C/C+compiler,http:/,彦端梨崔泄谢陋咱啄搐丫酋绚蕉驱艘唉嚼烈烟煎镊卡蜜玲绚绝妊倒让眶愁【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Linker/Locators,For computers:Linker:creates an image file to be run on hostLoader:loads image file into memory during run-timeFor embedded systems:Locater:creates a file,containing binary image or other format,that will be copied onto target,which run on its own(not through loader)It needs exact addresses beforehandCertain parts of program need in ROM and some in RAMNormally done by dividing program in segments Locator needs to be told where in memory to place segments,http:/,萍浩巫诽妻态朽溺佩萧递定令繁油采枢僵些因哪免感掏误羞巢锁挡柱傀屁【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,Summary,Development of a system usually involves:Requirement,specification,architecture design,component development,system integration,test and validationDevelopment environment of an embedded system often includesDevelopment host with toolchain:cross compiler,linker/loader,library,emulatorDevelopment board,http:/,羌颅角仗喻胯短淫翠粒是教扒舟钓滦星带敝盗章媳婿芜剑朽朴敛筑调辆近【大学课件】CS4101 嵌入式系统概论Design and Development【大学课件】CS4101 嵌入式系统概论Design and Development,