《车载资通讯嵌入式系统.ppt》由会员分享,可在线阅读,更多相关《车载资通讯嵌入式系统.ppt(267页珍藏版)》请在三一办公上搜索。
1、教育部顧問室資通訊科技人才培育先導型計畫車載資通訊嵌入式系統,VI.ARM嵌入式系統原理與實作,2,Embedded System OverviewARM Embedded SystemsARM Processor FundamentalsARM Instruction SetEfficient C Programming,ARM Embedded System,Embedded System Design:A Unified Hardware/Software IntroductionFrank Vahid,and Tony D.Givargis,John Wiley,2002,ISBN:0
2、-471-38678-2,3,Outline,Embedded Systems OverviewDesign Challenge Optimizing Design MetricsTechnologiesProcessor technologiesIC technologiesDesign technologiesTradeoffsSummary,4,Embedded Systems Overview,Computing systems are everywhereMost of us think of“desktop”computersPCsLaptopsWorkstationsMainfr
3、amesServersBut theres another type of computing systemFar more common.,5,Embedded Systems Overview(Cont.),Embedded computing systemsComputing systems embedded within electronic devicesHard to define.Nearly any computing system other than a desktop computerBillions of units produced yearly,versus mil
4、lions of desktop unitsPerhaps 50 per household and per automobile,Computers are in here.,and here.,and even here.,Lots more of these,though they cost a lot less each.,6,A“short list”of embedded systems,And the list goes on and on,Anti-lock brakesAuto-focus camerasAutomatic teller machinesAutomatic t
5、oll systemsAutomatic transmissionAvionic systemsBattery chargersCamcordersCell phonesCell-phone base stationsCordless phonesCruise controlCurbside check-in systemsDigital camerasDisk drivesElectronic card readersElectronic instrumentsElectronic toys/gamesFactory controlFax machinesFingerprint identi
6、fiersHome security systemsLife-support systemsMedical testing systems,ModemsMPEG decodersNetwork cardsNetwork switches/routersOn-board navigationPagersPhotocopiersPoint-of-sale systemsPortable video gamesPrintersSatellite phonesScannersSmart ovens/dishwashersSpeech recognizersStereo systemsTeleconfe
7、rencing systemsTelevisionsTemperature controllersTheft tracking systemsTV set-top boxesVCRs,DVD playersVideo game consolesVideo phonesWashers and dryers,7,Some Common Characteristics of Embedded Systems,Single-functionedExecutes a single program,repeatedlyTightly-constrainedLow cost,low power,small
8、size,fast,etc.Reactive and real-timeContinually reacts to changes in the systems environmentMust compute certain results in real-time without delay,8,An Embedded System Example Digital Camera,Single-functioned-always a digital cameraTightly-constrained-Low cost,low power,small,fastReactive and real-
9、time-only to a small extent,9,Design Challenge Optimizing Design Metrics,Obvious design goal:Construct an implementation with desired functionalityKey design challenge:Simultaneously optimize numerous design metricsDesign metric A measurable feature of a systems implementation,10,Design Challenge Op
10、timizing Design Metrics(Cont.),Common metricsNRE cost(Non-Recurring Engineering cost):The one-time monetary cost of designing the systemUnit cost:the monetary cost of manufacturing each copy of the system,excluding NRE costSize:the physical space required by the systeme.g.bytes for software,gates or
11、 transistors for hardwarePerformance:the execution time or throughput of the systemPower:the amount of power consumed by the systemFlexibility:the ability to change the functionality of the system without incurring heavy NRE cost,11,Design Challenge Optimizing Design Metrics(Cont.),Common metrics(co
12、ntinued)Time-to-prototype:the time needed to build a working version of the systemTime-to-market:the time required to develop a system to the point that it can be released and sold to customersMaintainability:the ability to modify the system after its initial releaseCorrectness:the functionality imp
13、lemented correctlySafety:the probability that the system will not cause harm,12,Design Metric Competition-Improving One May Worsen Others,Expertise with both software and hardware is needed to optimize design metricsNot just a hardware or software expert,as is commonA designer must be comfortable wi
14、th various technologies in order to choose the best for a given application and constraints,Hardware,Software,13,Time-to-Market:a Demanding Design Metric,Time required to develop a product to the point it can be sold to customersMarket windowPeriod during which the product would have highest salesAv
15、erage time-to-market constraint is about 8 monthsDelays can be costly,14,Revenue Losses Due to Delayed Market Entry,Simplified revenue modelProduct life=2W,peak at WTime of market entry defines a triangle,representing market penetrationTriangle area equals revenueLoss The difference between the on-t
16、ime and delayed triangle areasPercentage revenue loss=(On-time-Delayed)/On-time)*100%,15,Revenue Losses Due to Delayed Market Entry(Cont.),Example:market rise angle is 45 degreesArea=1/2*base*heightOn-time=1/2*2W*WDelayed=1/2*(W-D+W)*(W-D)Percentage revenue loss=(D(3W-D)/2W2)*100%Try some examplesLi
17、fetime 2W=52 wks,delay D=4 wks(4*(3*26 4)/2*262)=22%Lifetime 2W=52 wks,delay D=10 wks(10*(3*26 10)/2*262)=50%Delays are costly!,16,NRE and Unit Cost Metrics,Costs:Unit cost:the monetary cost of manufacturing each copy of the system,excluding NRE costNRE cost(Non-Recurring Engineering cost):The one-t
18、ime monetary cost of designing the systemtotal cost=NRE cost+unit cost*#of unitsper-product cost=total cost/#of units=(NRE cost/#of units)+unit cost,ExampleNRE=$2000,unit=$100For 10 unitstotal cost=$2000+10*$100=$3000per-product cost=$2000/10+$100=$300,17,NRE and Unit Cost Metrics(Cont.),Compare tec
19、hnologies by costs Technology A:NRE=$2,000,unit=$100Technology B:NRE=$30,000,unit=$30Technology C:NRE=$100,000,unit=$2best technology choice will depend on quantity,18,The Performance Design Metric,Performance:how long the system takes to execute our desired tasksMost widely-used measure,most abused
20、Clock frequency,instructions per second not good measuresDigital camera example a user cares about how fast it processes images,not clock speed or instructions per secondTwo main measures of performance:Latency(response time):Time between task start and ende.g.,Cameras A and B process images in 0.25
21、 secondsThroughput:number of tasks that can be processed per second e.g.Camera A processes 4 images per secondSpeedup of A over B=As performance/Bs performancee.g.throughput speedup=8/4=2(A is 2 times faster than B),19,Three Key Embedded System Technologies,TechnologyA manner of accomplishing a task
22、,especially using technical processes,methods,or knowledgeThree key technologies for embedded systemsProcessor technologyIC technologyDesign technology,20,Processor Technology,The architecture of the computation engine used to implement a systems desired functionalityProcessor does not have to be pr
23、ogrammable“Processor”not equal to general-purpose processor,Application-specific,Registers,CustomALU,Datapath,Controller,Program memory,Assembly code for:total=0 for i=1 to,Control logic and State register,Datamemory,IR,PC,Single-purpose(“hardware”),Datapath,Controller,Control logic,State register,D
24、atamemory,index,total,+,IR,PC,Registerfile,GeneralALU,Datapath,Controller,Program memory,Assembly code for:total=0 for i=1 to,Control logic and State register,Datamemory,General-purpose(“software”),21,Processor Technology(Cont.),Processors vary in their customization for the problem at hand,total=0f
25、or i=1 to N loop total+=Miend loop,General-purpose processor,Single-purpose processor,Application-specific processor,Desired functionality,22,General-Purpose Processors,Programmable device suitable for a variety of applicationsAlso known as“microprocessor”FeaturesProgram memoryGeneral datapath with
26、large register file and general ALU,Desired functionality,General-purpose processor,23,General-Purpose Processors(Cont.),When used in an embedded system:Benefits:Low time-to-market and NRE costsHigh flexibilityUnit cost may be low in small quantitiesPerformance may be fast for computation-intensive
27、applicationsDrawbacks:Unit cost may be relatively high for large quantitiesPerformance may be slow for certain applicationsSize and power may be large“Pentium”the most well-known,but there are hundreds of others,24,Single-Purpose Processors,Digital circuit designed to execute exactly one programa.k.
28、a.coprocessor,accelerator or peripheralFeaturesContains only the components needed to execute a single programNo program memory,Desired functionality,Application-specific processor,25,Single-Purpose Processors(Cont.),When used in an embedded system:Benefits:Unit cost may be low for large quantitiesP
29、erformance may be fastSize and power may be smallDrawbacks:High time-to-market and NRE costslow flexibilityUnit cost may be high for small quantitiesPerformance may not match general-purpose processors for some applications,26,Application-Specific Processors,Programmable processor optimized for a pa
30、rticular class of applications having common characteristicsCompromise between general-purpose and single-purpose processorsFeaturesProgram memoryCan optimize datapath for application classAdd special functional units for common operationsEliminate other infrequently used units,Desired functionality
31、,Single-purpose processor,27,Application-Specific Processors(Cont.),Benefitsflexibility,good performance,size and powerDrawbacks:large NRE costs to build the processor and a compilerTwo well-known types of ASIPs:MicrocontrollersA microprocessor optimized for embedded control applicationsdigital sign
32、al processorsA microprocessor designed to perform common operations on digital signals,IR,PC,Registers,CustomALU,Datapath,Controller,Program memory,Assembly code for:total=0 for i=1 to,Control logic and State register,Datamemory,28,IC Technology,The manner in which a digital(gate-level)implementatio
33、n is mapped onto an ICIC:Integrated circuit,or“chip”IC technologies differ in their customization to a designICs consist of numerous layers(perhaps 10 or more)The bottom layers form the transistorsThe middle layers form logic componentsThe top layers connect these components with wiresIC technologie
34、s differ with respect to who builds each layer and when,29,IC Technology(Cont.),Three types of IC technologiesFull-custom/VLSISemi-custom ASIC(gate array and standard cell)PLD(Programmable Logic Device),30,Full-Custom/VLSI,All layers are optimized for a particular embedded systems digital implementa
35、tionPlacing transistors to minimize interconnection lengthsSizing transistors to optimize signal transmissionsRouting wires among transistorsBenefitsExcellent performance,small size,low powerDrawbacksHigh NRE cost(e.g.,$300k),long time-to-marketUsually used only in high-volume or extremely performan
36、ce-critical applications,31,Semicustom ASIC(gate array and standard cell),Lower layers are fully or partially builtDesigners are left with finishing upper layers,such as routing of wires and maybe placing some blocksBenefitsGood performance,good size,less NRE cost than a full-custom ICs(perhaps$10k
37、to$100k)DrawbacksStill require weeks to months to manufacture,32,PLD(Programmable Logic Device),All layers already existDesigners can purchase an ICConnections on the IC are either created or destroyed to implement desired functionalityField-Programmable Gate Array(FPGA)very popularBenefitsLow NRE c
38、osts,almost instant IC availabilityDrawbacksBigger than ASICs,expensive(perhaps$30 per unit),power hungry,slowerReasonable performance,well-suited to rapid prototyping,33,Trends-Moores Law,The most important trend in embedded systems Predicted in 1965 by Intel co-founder Gordon MooreIC transistor ca
39、pacity has doubled roughly every 18 months for the past several decades,Note:logarithmic scale,34,Graphical Illustration of Moores Law,1981,1984,1987,1990,1993,1996,1999,2002,Leading edgechip in 1981,10,000transistors,Leading edgechip in 2002,150,000,000transistors,Something that doubles frequently
40、grows more quickly than most people realize!A 2002 chip can hold about 15,000 1981 chips inside itselfThis trend of increasing chip capacity has enabled the proliferation of low-cost,high-performance embedded systems,35,Design Technology,The manner in which we convert our concept of desired system f
41、unctionality into an implementation,36,Ideal Top-Down Design Process,and Productivity Improvers,Libraries/IP:Incorporates pre-designed implementation from lower abstraction level into higher level.,Systemspecification,Behavioralspecification,RTspecification,Logicspecification,To final implementation
42、,Compilation/Synthesis:Automates exploration and insertion of implementation details for lower level.,Test/Verification:Ensures correct functionality at each level,thus reducing costly iterations between levels.,Compilation/Synthesis,Libraries/IP,Test/Verification,Systemsynthesis,Behaviorsynthesis,R
43、Tsynthesis,Logicsynthesis,Hw/Sw/OS,Cores,RTcomponents,Gates/Cells,Model simulat./checkers,Hw-Swcosimulators,HDL simulators,Gate simulators,37,Ideal Top-Down Design Process,System specificationThe designer describes the desired functionality in some language,often a natural language like English,but
44、preferably an executable language like CBehavioral specificationsThe designer refines system specification by distributing portions of it among several general and/or single-purpose processors,yielding behavioral specifications for each processor.Register-transfer(RT)specificationsThe designer conve
45、rts behavior on general-purpose processors to assembly code,and converts single-purpose processors to a connection of register-transfer components and state machines.,38,Ideal Top-Down Design Process(Cont.),Logic specificationThe designer refines the RT specification of a single-purpose processor in
46、to a logic specification consisting of Boolean equations.Finally,the designer refines the remaining specifications into an implementation,consisting of machine code for general-purpose processors and a gate-level netlist for single-purpose processors.,39,Improving the Design Processor for Increased
47、Productivity,Compilation/SynthesisLets a designer specify desired functionality in an abstract manner and automatically generates lower-level implementation detailsLibraries/IPLibraries involve reuse of preexisting implementationsIntellectual property(IP)must be protected from copyingTest/Verificati
48、onInvolves ensuring method of testing for correct functionalitySimulation is the most common method,40,Design Productivity Exponential Increase,Exponential increase over the past few decadesSource:the international technology roadmap for semiconductors,100,000,10,000,1,000,100,10,1,0.1,0.01,1983,198
49、1,1987,1989,1991,1993,1985,1995,1997,1999,2001,2003,2005,2007,2009,Productivity(K)Trans./Staff Mo.,41,The Co-Design Ladder,In the past,hardware and software design technologies were very differentRecent maturation of RT and behavioral synthesis tools enables a unified view of hardware and softwareHa
50、rdware/software“codesign”,The choice of hardware versus software for a particular function is simply a tradeoff among various design metrics,like performance,power,size,NRE cost,and especially flexibility;there is no fundamental difference between what hardware or software can implement.,42,Independ