《嵌入式系统概述 南京大学软件学院ppt课件.ppt》由会员分享,可在线阅读,更多相关《嵌入式系统概述 南京大学软件学院ppt课件.ppt(50页珍藏版)》请在三一办公上搜索。
1、嵌入式系统概述,宋健建南京大学软件学院2004/02/10,内容,什么是嵌入式系统嵌入式系统的历史和发展嵌入式系统的组成嵌入式系统的特点嵌入式系统软件开发,1. What are embedded systems?,Definition:Embedded system: any device that includes a programmable computer but is not itself a general-purpose computer.Take advantage of application characteristics to optimize the design:d
2、ont need all the general-purpose bells and whistles.,A More Detailed Definition,国内一般定义嵌入式系统是以应用为中心,以计算机技术为基础,并且软硬件可裁剪,适用于应用系统对功能、可靠性、成本、体积、功耗有严格要求的专用计算机系统。一般由嵌入式微处理器、外围硬件设备、嵌入式操作系统以及用户应用程序等四个部分组成,用于实现对其他设备的控制、监视或管理等功能。,Embedding a computer,CPU,mem,input,output,analog,analog,embeddedcomputer,Examples
3、,Personal digital assistant (PDA).Printer.Cell phone.Automobile: engine, brakes, dash, etc.Television.Household appliances.PC keyboard (scans keys).,Reference Interpretation (1),An embedded system is any computer system or computing device that performs a dedicated function or is designed for use wi
4、th a specific embedded software application.Embedded systems may use a ROM-based operating system or they may use a disk-based system, like a PC. But an embedded system is not usable as a commercially viable substitute for general purpose computers or devices.,Reference Interpretation (2),A speciali
5、zed computer system that is part of a larger system or machine. Typically, an embedded system is housed on a single microprocessor board with the programs stored in ROM. Virtually all appliances that have a digital interface - watches, microwaves, VCRs, cars - utilize embedded systems. Some embedded
6、 systems include an operating system, but many are so specialized that the entire logic can be implemented as a single program.,Reference Interpretation(3),中国微机学会的定义:嵌入式系统是以嵌入式应用为目的的计算机系统,可以分为片级、板级、系统级。芯片级嵌入 含程序或算法的处理器模块级嵌入 系统中的某个核心模块板系统级嵌入 主计算机系统,1.2 嵌入式系统历史和发展,1971年代单片微处理器问世,它标志着嵌入式系统的开端。从4个方面了解嵌入
7、式系统历史硬件软件代表产品系统结构,嵌入式硬件的历史,1971年Intel 4004, 4位微处理器TI, TMS1000, 4位微控制器ROM, RAM, CPU + I/O port1980年Intel MCS-51, 8位微控制器16位, 32位微处理器1990s, DSPTMS320C30,嵌入式处理器的分类和术语(1),微控制器(MCU:Micro-Controller Unit)即单片机。早期比较流行的处理器,将整个计算机系统集成到一个芯片中,内部以某种微处理器为核心,并对ROM、RAM、总线、总线逻辑、定时器/计数器、I/O、串行口、A/D转换、D/A转换等必要外设加以集成。In
8、tel 8051微处理器(MPU:Micro-Processor Unit)必须在电路板上完成嵌入式系统功能。将MPU和其必要外设装配在一起的电路板称为单板机。ARM系列,MIPS,嵌入式处理器的分类和术语(2),数字信号处理器(DSP: Digital Signal Processor)对系统结构和指令进行特殊设计,使其适合于执行DSP算法,编译效率较高,指令执行速度也快。TI TMS320C30-片上系统(System-on-Chip, SoC)将重要处理器的内核和各种外围的芯片器件整合在一起,进一步降低功耗。Intel PCA架构;PXA 255,Microprocessor varie
9、ties,Microcontroller: includes I/O devices, on-board memory.Digital signal processor (DSP): microprocessor optimized for digital signal processing.Typical embedded word sizes: 8-bit, 16-bit, 32-bit.,嵌入式软件的历史,监控程序操作系统1981, 嵌入式实时内核 VTRX321990s, QNX-4pSOS, VxWorks, Palm OS, WinCE, Embedded Linux, LynxO
10、S, uCOS, Nucleus,嵌入式系统结构演变,硬件系统4位单片机8位单片机/ 16位单片机32位专用微处理器32位DSP微处理器SoCSoPC,软件系统实时监控程序专用系统通用系统,IA & Embedded System,Information ApplianceAn appliance specializing in information : Knowledge, facts, graphics, images, video, or sound. An information appliance is designed to perform activity, such as m
11、usic, photography, or writing. A distinguishing feature of information appliance is the ability to share information among themselves. (Don Norman),IA & Embedded System (contd),信息电器的核心就是嵌入式系统信息电器的成本取决于嵌入式系统的成本信息电器的使用性能取决于嵌入式系统的软件信息电器的发展方向决定着嵌入式系统的发展方向,1.4 嵌入式系统的基本组成,软件硬件基本要素,硬件嵌入式处理器各种类型存储器模拟电路及电源接口
12、控制器及接插件,软件实时操作系统(RTOS)板级支持包(BSP)设备驱动(Device Driver)协议栈(Protocol Stack)应用程序(Application),嵌入式处理器的分类,微控制器(MPU)微处理器(MCU)数字信号处理器(DSP)片上系统(SoC),存储设备,ROMPROM,EPROM,EEPROMFlash ROMFlash在嵌入式系统中的两种作用(boot ROM、hard disk)RAMSRAMDRAM,典型的嵌入式系统硬件组成,PXA255 Architecture,典型的嵌入式系统软件组成,VxWorks Architecture,Embedded Lin
13、ux,Basic components:Boot loaderLinux kernelFurther:Hardware driversApplication programsFile systems based on ROM or RAMTCP/IP stackGUI,嵌入式操作系统,需要操作系统的场合多任务方便的用户界面网络功能升级和二次开发嵌入式操作系统的基本功能多任务调度内存管理硬件资源管理,1.5 嵌入式系统的特点,专门用于特定任务嵌入式系统一般是专用系统,而PC是通用计算平台。技术集成软硬件集成,计算机和网络通信集成有实时约束一般采用实时操作系统有功耗约束,软件通常没有系统和应用的区
14、别,软件固化。系统内核小高可靠性资源比PC少得多嵌入式系统需要专用的开发工具非垄断市场,Characteristics of embedded systems,Sophisticated functionality.Real-time operation.Low manufacturing cost.Low power.Designed to tight deadlines by small teams.,Functional complexity,Often have to run sophisticated algorithms or multiple algorithms.Cell ph
15、one, laser printer.Often provide sophisticated user interfaces.,Real-time operation,Must finish operations by deadlines.Hard real time: missing deadline causes failure.Soft real time: missing deadline results in degraded performance.Many systems are multi-rate: must handle operations at widely varyi
16、ng rates.,Non-functional requirements,Many embedded systems are mass-market items that must have low manufacturing costs.Limited memory, microprocessor power, etc.Power consumption is critical in battery-powered devices.Excessive power consumption increases system cost even in wall-powered devices.,
17、Design teams,Often designed by a small team of designers.Often must meet tight deadlines.6 month market window is common.Cant miss back-to-school window for calculator.,1.6 嵌入式系统软件开发,编程语言汇编、C、Java交叉编译器(cross compiler)在一种机器(host)上为另一种机器(target)生成代码的编译程序,开发流程,代码的下载与调试,开发平台,目标平台,下载代码,返回调试信息,嵌入式系统调试的方法,
18、LEDSimulatorICE (In-Circuit Emulator)基于JTAG的Embedded ICEAngel,Simulator,Simulator (模拟器)完全基于主机的软件。在主机上模拟了目标机中处理器的功能和指令,特点简单可行 缺乏在线调试功能和实时仿真功能仅能模拟目标处理器,无法模拟处理器有关I/O的功能 常作为初步基本调试工具,ICE,ICE: In-Circuit Emulator传统用于测试印刷电路板的方法。ICE是一种专用的设备,配有专用于特定CPU芯片的接头。将ICE的接头骑在CPU芯片上并加以固定,使它的每一条引线与CPU芯片上的对应引线接触,就可以监测CP
19、U芯片各条引线上的逻辑电平。由于集成电路的集成度不断提高,芯片的引脚不断增加;此外,为了缩小体积常常采用表面贴装技术。因此,无法用常规的在线仿真的方式,Embedded ICE,Embedded ICE: 一组调试寄存器IBCR (Instruction Break Control Register)DBAR (Data Break Address Register)JTAG接口JTAG(Joint Test Action Group) 制定了边界扫描标准,只需5根引脚就可以实现在线仿真的功能。ARM架构处理器内含嵌入式在线仿真宏单元,为JTAG调试提供相应的接口。同时,为了能达到实时跟踪调试
20、的功能,ARM架构处理器还内含嵌入式跟踪宏单元,通过逻辑分析仪来实现实时跟踪调试的功能。,Angel,Angel是一组运行在目标机上的程序,可以接受主机上调试器发送的命令。功能Debug。接收和解释PC主机的调试命令,显示处理器、存储器和寄存器的状态,也可以通过未定义指令来设置断点。支持Angel调试协议ADP(Angel Debug Protocol),从而实现PC主机与目标机的串行或并行通信,也支持与目标板的网卡通信。支持目标机中应用程序可使用主机PC上的标准C函数库。通过软中断SWI指令来实现。具有多任务调度和处理器模式管理功能。能分配任务优先级并对任务进行管理,也可根据操作需要在不同处
21、理器模式中运行。具有中断功能。从而能实现调试、通信和管理等操作的要求。,ARM的调试系统,Embedded System Design,Top-down design:start from most abstract description;work to most detailed.Bottom-up design:work from small components to big system.Real design uses both techniques.,Levels of abstraction,requirements,specification,architecture,componentdesign,systemintegration,Example: GPS moving map,RequirementsSpecificationArchitecture Component designSystem integration,Review,