
嵌入式处理器体系结构
嵌入式处理器体系结构

内容提要(实例)·嵌入式处理器概述·通用处理器体系结构-CISC-RISC·嵌入式处理器·I/O系统-中断-DMA
内容提要 • 嵌入式处理器概述(实例) • 通用处理器体系结构 – CISC – RISC • 嵌入式处理器 • I/O系统 – 中断 – DMA

Stanford STARMAC ProjectLowLevelCarbonFiberControl ProcessorTubingRobostixFiberglassHighLevelHoneycombControlProcessorStargateSBCPlastic TubeStrapsorPC/104GPSSuperstarIlBrushlessSonicRangerDCMotorsSRF08Axi2208/26Inertial MeasurementElectronicUnit(IMU)Speed3DMG-X1ControllerBatteryPhoenix25LithiumPolymerLIDARStereo VisionHokuyoVidereSystemsURG-04LXSmall VisionSystem
Stanford STARMAC Project

四旋翼飞控:STARMAC architectureLIDARRS232URG-04LX115kbpsPC/10410HzrangesWiFiUSB2PentiumM802.11g+1GBRAM,1.8GHZStereoCam480MbpsFirewire$54MbpsVidereSTOCEst.&controlRS232480Mbps30fps320x240GPSUARTStargate1.0SuperstarIl19.2kbpsWiFiIntelPXA25510HzCF802.11bUART64MBRAM.400MHz100MbpsS5MbpsUART115KbpsIMUSupervisorGPsUART3DMG-X1Robostix76or100Hz115kbpsAtmega128LowlevelcontrolRanger12CPPMSRF08100Hz400kbpsTAnalog13HzAltitudeRangerBeaconEsC&MotorsMini-AETracker/DTSTimingPhoenix-25.Axi2208/2610-50HzAltitudeAnalog1Hz
四旋翼飞控:STARMAC architecture

Typical Architecture for RTS嵌入式系统虽然复杂,但通用处理器的设计经验会有很大帮助oPeripheral BusDEBUGPortNon-volatile memoryCustom Devices*EPROM.FLASH.DISK·ASIC-Hybrid.FPGA.PALMicroprocessor.4,8,16,32,4bitbus.CISC,RISC,DSPStandardDevices-Integrated peripheralsVolatile Memory.1/OPorts.Debug/TestPort·DRAM,SRAM-PeripheralControllers.Caches-Hybrid-Pipeline.Multiprocessing SystemsCommunicationDevices·Ethemet-RS-232-SCSI-CentronicsSystemClocks-Proprietary.RTC circuitrySoftware-System clocks.Integratedin uC·ApplicationCodeMicroprocessorBus-Imported/Exported-DriverCode/BIOS-Real TimeOperatingSystem.Custom.UserInterface.PCI-CommunicationsProtocolStacks.VME.C.C++,AssemblyLanguage-PC-102-Legacy Code5/87Ilxx@ustc.edu.cn
Typical Architecture for RTS llxx@ustc.edu.cn 5/87

Microprocessor types by applications:General-purpose Microprocessor-Desktopapplications:X86、PowerPC-Server applications·科学和工程计算:Power1,Power2,Power3,Power4数据库和事务处理:RS64,RS64-Il,RS64-IⅢI.EmbeddedMicroprocessor:-focusedonparticularapplicationarea.Microprocessors:Media,Graphic,NetworkandCommunication:Microcontrollers·Digital Signal Processors (DSP): System on Chips(SoC).Oftodaysmicroprocessors-95%gointoembeddedapplications-5o%ofrevenuestemsfromembeddedsystems6/87Ilxx@ustc.edu.cn
• General-purpose Microprocessor – Desktop applications: X86、PowerPC – Server applications • 科学和工程计算:Power1, Power2, Power3, Power4 • 数据库和事务处理:RS64, RS64-II, RS64-III • Embedded Microprocessor: – focused on particular application area Microprocessor types by applications llxx@ustc.edu.cn 6/87 – focused on particular application area • Microprocessors: Media, Graphic, Network and Communication • Microcontrollers • Digital Signal Processors(DSP) • System on Chips(SoC) • Of todays microprocessors – 95% go into embedded applications – 50% of revenue stems from embedded systems

嵌入式微处理器1瑞萨科技Over60亿片in20032飞思卡尔半导体PPC9,0003MicrochipTechnology8,0004NEC电子7,0005英飞凌6,000S6东芝Tn5,0004,0007Atmel3,0008三星2,0009恩智浦半导体(NXP)1,00010意法半导体ARM1997199819992000200120022003200420052006SH3/SH41%4-Bit32-bit+8-Bit16-BitLBySEMICOx868%PowerPC12%ARETMIPS8%ARXS15%ARMTICortex-10或310%Cortex-A8减ag其修ARM71%AO1015%2025%30%35%45%50%7/87
嵌入式微处理器 1 瑞萨科技 2 飞思卡尔半导体PPC 3 Microchip Technology 4 NEC电子 5 英飞凌 6 东芝 7 Atmel 8 三星 9 恩智浦半导体(NXP) 7/87 9 恩智浦半导体(NXP) 10 意法半导体ARM

Microchip PIC单片机初档8位单片机:PIC12C5XXX/16C5X系列一最早在市场上得到发展,价格较低,有较完善的开发手段,在国内应用最广;一PIC12C5XX:世界第一个8引脚低价位单片机·512字节ROM、25字节RAM、一个8位定时器、一根输入线、5根I/O线·应用:摩托车点火器。售价36元/片。一可用于简单的智能控制等一些对单片机体积要求较高的地方,前景十分广阔。中档8位单片机:PIC12C6XX/PIC16CXXX系列一近年来重点发展的系列产品,品种最为丰富。。增加了中断功能,指令周期达到20OnS,含A/D,内部E2PROM数据存储器,双时钟工作,2C和SPI接口,异步串行通讯(UART),模拟电压比较器、LCD驱动等。封装从8~68脚:一可用于高、中、低档的电子产品设计。价格适中。PIC16C74:40引脚。含:4KROM、192字节RAM、8路A/D、3个8位定时器、2个CCP模块、三个串行口、1个并行口、11个中断源、33个I/O脚。高档8位单片机:PIC17CXX系列PIC17CXX,是适合高级复杂系统开发的系列产品,增加了硬件乘法器,指令周期可达成160ns,性价比最高;,可用于高、中档产品的开发,如马达控制、音调合成。8/87Ilxx@ustc.edu.cn
Microchip PIC单片机 • 初档8位单片机:PIC12C5XXX/16C5X系列 – 最早在市场上得到发展,价格较低,有较完善的开发手段,在国内应用最广; – PIC12C5XX:世界第一个8引脚低价位单片机 • 512字节ROM、25字节RAM、一个8位定时器、一根输入线、5根I/O线 • 应用:摩托车点火器。 售价3~6元/片。 – 可用于简单的智能控制等一些对单片机体积要求较高的地方,前景十分广阔。 • 中档8位单片机:PIC12C6XX/PIC16CXXX系列 – 近年来重点发展的系列产品,品种最为丰富。 llxx@ustc.edu.cn 8/87 – 近年来重点发展的系列产品,品种最为丰富。 • 增加了中断功能,指令周期达到200ns,含A/D,内部E2PROM数据存储器,双时 钟工作,I2C和SPI接口,异步串行通讯(UART),模拟电压比较器、LCD驱动等。 封装从8~68脚; – 可用于高、中、低档的电子产品设计。价格适中。 – PIC16C74:40引脚。含: 4K ROM、192字节RAM、8路A/D、3个8位定时器、 2个CCP模块、三个串行口、1个并行口、11个中断源、33个I/O脚。 • 高档8位单片机:PIC17CXX系列PIC17CXX – 是适合高级复杂系统开发的系列产品,增加了硬件乘法器,指令周期可达成 160ns,性价比最高; – 可用于高、中档产品的开发,如马达控制、音调合成

嵌入式处理器的特征Generalrules(withexceptions):1. Designed for efficiency (vs. ease of programming)2. Huge variety of processors (resulting from 1.)3.Harvardarchitecture4.Heterogeneous registersets5.Limited instruction-level parallelism or VLIW ISA6. Different operation modes (saturating arithmetic, fixedpoint)7.Specialised microcontroller & DSP instructions (bit-reversal, multiplylaccumulate, bit-field addressing, moduloaddressing)8. Multiple memory banks9. No “fat" (MMU, caches, memory protection, target buffers,complex pipeline logic, ...)Thesefeatureshaveto beknowntothecompiler!9/87Ilxx@ustc.edu.cn
嵌入式处理器的特征 • General rules (with exceptions): 1. Designed for efficiency (vs. ease of programming) 2. Huge variety of processors (resulting from 1.) 3. Harvard architecture 4. Heterogeneous register sets 5. Limited instruction-level parallelism or VLIW ISA 6. Different operation modes (saturating arithmetic, fixed point) llxx@ustc.edu.cn 9/87 7. Specialised microcontroller & DSP instructions (bitreversal, multiply/accumulate, bit-field addressing, modulo addressing) 8. Multiple memory banks 9. No “fat” (MMU, caches, memory protection, target buffers, complex pipeline logic, .) • These features have to be known to the compiler!

处理器技术·“处理器”不是一定都是可编程的一嵌入式微处理器并不等同于通用微处理器ControllerDatapathControllerDatapathControllerDatapathindexControlControlControlRegistersRegisterlogiclogicandlogicandfiletotalStateStateStateCustomregisterregisterALUregisterGeneralALUPCIRIRPCDataDatamemorymemoryDataProgramProgrammemorymemorymemoryAssembly codeAssemblycodefor:for:total=0total =0fori=l to...fori=l to..General-purpose("software")Single-purpose ("hardware")Application-specific10/87Ilxx@ustc.edu.cn
处理器技术 • “处理器”不是一定都是可编程的 – 嵌入式微处理器并不等同于通用微处理器 Registers Custom Controller Datapath Control logic and State Controller Datapath Control logic State index total Register file Controller Datapath Control logic and State llxx@ustc.edu.cn 10/87 Application-specific Custom ALU Program memory Assembly code for: total = 0 for i =1 to . State register Data memory IR PC Single-purpose (“hardware”) State register Data memory + IR PC General ALU Program memory Assembly code for: total = 0 for i =1 to . State register Data memory General-purpose (“software”)