Why Specint95 Should Not Be Used to Benchmark Embedded
Total Page:16
File Type:pdf, Size:1020Kb
EmbeddedEmbedded SystemsSystems ComputerComputer ArchitectureArchitecture JakobJakob EngblomEngblom VirtutechVirtutech ABAB && UppsalaUppsala UUniversityniversity [email protected] EmbeddedEmbedded SystemsSystems 29 November 2002 Embedded Computer Architecture 2 EmbeddedEmbedded SystemsSystems Now what is this elephant thing? You’re all wrong, it is a fan! No, a It is a wall! snake! No, it is a treetrunk! No, a pillar! 29 November 2002 Embedded Computer Architecture 3 EmbeddedEmbedded SystemsSystems »»““AA computercomputer thatthat doesn’tdoesn’t looklook likelike aa computer”computer” »»InteractsInteracts withwith worldworld »»PrimitivePrimitive oror nono useruser interfaceinterface »»PartPart ofof otherother productsproducts 29 November 2002 Embedded Computer Architecture 4 EmbeddedEmbedded SystemsSystems »»TheThe vastvast majoritymajority ofof processors!processors! ¡¡200200 millionmillion PCPC andand serverserver ¡¡80008000 millionmillion embeddedembedded "Embedded" 98% "Desktop" 2% 29 November 2002 Embedded Computer Architecture 5 EmbeddedEmbedded SystemsSystems »»SingleSingle purposepurpose productsproducts ¡NotNot generalgeneral purposepurpose likelike desktopdesktop PCsPCs ¡DoDo oneone tthhinging veryvery efficientefficientllyy »»SoftwareSoftware veryvery important:important: ¡GivesGives charactercharacter toto productproduct Used to differentiate inside a “platform” ¡CanCan bebe changedchanged latelate ¡ProcessorProcessor cheapercheaper thanthan specialspecial HWHW ¡DominatesDominates HWHW developmentdevelopment cost!cost! 29 November 2002 Embedded Computer Architecture 6 RealReal--TimeTime SystemSystem »»TimingTiming asas importantimportant asas resultresult »»HardHard realreal--time:time: ¡HardHard deadlinesdeadlines ¡DeadDead ifif missedmissed deadlindeadlinee ¡WorstWorst--casecase »»SoftSoft realreal--time:time: ¡FuzzierFuzzier deadlindeadlineess ¡CanCan missmiss somesome deadlinesdeadlines ¡AverageAverage--casecase 29 November 2002 Embedded Computer Architecture 7 RealReal--TimeTime SystemsSystems »»EmbeddedEmbedded andand RealReal--TimeTime ¡Synonymous?Synonymous? »»Most embedded Most embedded embeddedembedded systemssystems areare realreal--timetime embeddedembedded realreal--timetime »»MostMost realreal--timetime systemssystems areare embeddedembedded realreal--timetime 29 November 2002 Embedded Computer Architecture 8 ExamplesExamples:: SimpleSimple 8-bit Intel 8051, standard microcontroller Behavior, talk, IR communications 8-bit Hitachi H8/300 32 kB ROM, 32 kB RAM Standard microcontroller chip Byte-code machine, sensor drivers, … 29 November 2002 Embedded Computer Architecture 9 NoNo UpgradesUpgrades PossiblePossible »»OnceOnce aa productproduct ships…ships… »»…it…it oftenoften cannotcannot bebe servicedserviced ¡NoNo downloaddownload abilityability ¡NoNo writablewritable persistentpersistent storagestorage ¡NoNo disksdisks ¡NoNo loaderloader »»SoftwareSoftware isis writewrite--onceonce »»(There(There areare exceptions)exceptions) 29 November 2002 Embedded Computer Architecture 10 ExamplesExamples:: ConsumerConsumer Heterogeneous multiprocessor 8-bit Atmel AVR for UI, control, SMS, … 16-bit fixed-point TI C54 DSP for GSM coding, radio interface, … 32-bit ARM7 in Bluetooth module + maybe ARM7 in IRDA interface All embedded in custom ASICs 29 November 2002 Embedded Computer Architecture 11 ExamplesExamples:: DistributedDistributed CAN network for body electronics: 30 nodes? CAN network for engine control: few nodes LIN network for instruments 8-bit CPUs (PIC, HC08) for door locks, lights, etc. 16-bit CPUs (C167, HC11, HC12) for most functions 32-bit CPUs (PPC,V850) for engine control, airbags Total: up to 100 CPUs in a high-end car Total amount of code: 40-50 MB 29 November 2002 Embedded Computer Architecture 12 Examples:Examples: DistributedDistributed »»FormForm followsfollows functionfunction ¡ProcessingProcessing wherewhere thethe actionaction isis ¡ArchitectureArchitecture givengiven byby applicationapplication ¡SensorsSensors andand actuatorsactuators distributeddistributed »»HeterogeneousHeterogeneous systemssystems ¡ManyMany differentdifferent makesmakes ofof CPUsCPUs ¡StandardizedStandardized atat thethe networknetwork/bus/bus 29 November 2002 Embedded Computer Architecture 13 TimingTiming AspectsAspects »»InterruptInterrupt latencylatency ¡ImportantImportant criterioncriterion forfor embeddedembedded ¡AA fewfew clockclock cyclescycles atat mostmost ¡MeasureMeasure ofof RTOSRTOS performanceperformance »»RealReal--TimeTime == predictabilitypredictability ¡InIn--orderorder pipelinespipelines ¡SRAMSRAM insteadinstead ofof cachescaches ¡LockableLockable cachescaches ¡SeveralSeveral smallsmall CPUsCPUs insteadinstead ofof oneone bigbig 29 November 2002 Embedded Computer Architecture 14 ExamplesExamples:: ExtremeExtreme Standard multiprocessor UltraSparc servers for radar, target tracking, combat control, … Many CPUs in missiles, gun controls, engines, … 29 November 2002 Embedded Computer Architecture 15 TrendsTrends »»HardwareHardware toto softwaresoftware ¡ IncreaseIncrease flexibility,flexibility, lowerlower costcost ¡ SoftwareSoftware onon fastfast processorprocessor cancan equalequal HWHW »»SoftwareSoftware toto hardwarehardware ¡ BetterBetter powerpower consumptionconsumption && performanceperformance ¡ DesignDesign customcustom hardwarehardware forfor applicationapplication »»HardwareHardware--softwaresoftware codesigncodesign ¡ DelayDelay divisiondivision HW/SWHW/SW toto latelate inin projectproject ¡ ObtainObtain “optimal”“optimal” HW/SWHW/SW divisiondivision 29 November 2002 Embedded Computer Architecture 16 EmbeddedEmbedded ProcessorsProcessors 29 November 2002 Embedded Computer Architecture 17 MicrocontrollersMicrocontrollers »»Microcontrollers:Microcontrollers: RAM (small) ¡CPUCPU CoreCore ROM CPU (big) ¡IntegratedIntegrated memorymemory Core ¡IntegratedIntegrated peripheralsperipherals A/D Timer UART ¡IntegratedIntegrated servicesservices LCD D »»Goal:Goal: Outside World ¡SystemSystem onon oneone chipchip ¡NoNo externalexternal HWHW ¡FitFit applicationapplication “perfectly”“perfectly” 29 November 2002 Embedded Computer Architecture 18 Microcontrollers:Microcontrollers: WideWide SpanSpan »»ProcessorProcessor size:size: 44 toto 6464 bitsbits ¡MostMost common:common: 88 bitbit (4G(4G units)units) ¡32/6432/64--bitbit outnumbersoutnumbers desktopdesktop ¡3232--bitbit growinggrowing fastestfastest »»Frequency:Frequency: DCDC toto 11 GhzGhz »»Memory:Memory: FromFrom 0.50.5 toto 512512 kBkB »»Power:Power: mWmW (and(and up)up) »»1/301/30 toto 1010 instructionsinstructions perper cyclecycle 29 November 2002 Embedded Computer Architecture 19 Example:Example: PICPIC 12CE67412CE674 » Architecture:Architecture: HarvardHarvard » ProgramProgram memory:memory: 20482048 xx 1414 (OTP/Flash)(OTP/Flash) » EEPROM:EEPROM: 1616 bytesbytes » RAM:RAM: 128128 bytesbytes » ADCADC channels:channels: 44 (8(8 bits)bits) » I/OI/O ports:ports: 66 » Timers:Timers: OneOne 88--bit,bit, OneOne WDTWDT » Clock:Clock: onchiponchip crystal,crystal, 10MHz10MHz » Package:Package: 88 pinspins (Pentium(Pentium 4:4: 500500 pins)pins) » Cost:Cost: $1.00$1.00 (Pentium(Pentium 4:4: >$200.00)>$200.00) 29 November 2002 Embedded Computer Architecture 20 Example:Example: ARMARM 926EJ926EJ--SS » VonVon NeumannNeumann architecturearchitecture » InstructionInstruction sets:sets: ¡ 32-bit ARM v5TE ISA ¡ 16-bit THUMB ISA ¡ Java bytecodes via Jazelle » Clock:Clock: 180180--270270 MhzMhz » Cache:Cache: 88 kBkB icacheicache andand 88 kBkB dcachedcache » Power:Power: 0.20.2 toto 0.90.9 mW/MhzmW/Mhz (P4:(P4: >35>35 mW/MhzmW/Mhz)) » MMU:MMU: forfor SymbianSymbian,, WindowsWindows CE,CE, LinuxLinux » CoreCore macrocellmacrocell,, notnot aa chipchip ¡ Add external units to build complete microcontroller 29 November 2002 Embedded Computer Architecture 21 TrendsTrends »»MarketMarket ¡3232--bitbit marketmarket isis growinggrowing fastfast ¡DSPsDSPs areare growinggrowing fastfast »»TechnologyTechnology ¡ConfigurableConfigurable processorsprocessors ¡ConfigurableConfigurable logiclogic asas helphelp ¡FusionFusion ofof DSPDSP andand microcontrollersmicrocontrollers ¡MoreMore complexcomplex architecturesarchitectures ¡MoreMore stuffstuff onon aa singlesingle chipchip 29 November 2002 Embedded Computer Architecture 22 InstructionInstruction SetsSets 29 November 2002 Embedded Computer Architecture 23 ISIS ArchiArchitetecturesctures »»NewNew lifelife forfor oldold architecturesarchitectures ¡Z80,Z80, 6502,6502, 8051,8051, PIC,PIC, ….,…., 6800068000--ColdFireColdFire »»NewNew careercareer forfor failedfailed desktopsdesktops ¡MIPS,MIPS, PowerPCPowerPC »»FreshFresh architecturesarchitectures ¡AVR,AVR, dsPICdsPIC,, V850,V850, SH,SH, …… 29 November 2002 Embedded Computer Architecture 24 InstructionInstruction SetsSets »»CodeCode SizeSize importantimportant ¡VariableVariable instructioninstruction lengthlength Several size jumps (short-long-...) Common instructions short RISC machines with 16-64 bit instructions Stunted immediate operand sizes Two-operand rather than three-operand ¡CompactCompact andand powerfulpowerful instructionsinstructions Push/pop multiple Switch 29 November 2002 Embedded Computer Architecture 25 InstructionInstruction SetsSets »»SpecialSpecial--purposepurpose instructionsinstructions ¡DigitalDigital SignalSignal ProcessingProcessing ¡BitBit--manipulationmanipulation Set bit in memory, test bit in memory Several memory accesses per instruction ¡ApplicationApplication--specificspecific Fuzzy logic support (68HC12) Table interpolation (68300) ¡OrOr