当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

中国科学技术大学:《嵌入式系统设计方法》课程教学资源(课件讲稿,第一版)04 实时系统设计(软件设计、控制系统、EA、语言)

资源类别:文库,文档格式:PDF,文档页数:93,文件大小:2.78MB,团购合买
点击下载完整版文档(PDF)

® 实时嵌入式软件设计 李曦 llxx@ustc.edu.cn 计算机系计算机应用研究室

实时嵌入式软件设计 李曦 llxx@ustc.edu.cn 计算机系计算机应用研究室

内容提要 ·实时系统的定义与特征 反应式系统,实时系统 -控制系统设计简介 。 任务的定义 -Event--action模型 ·识别事件和动作,任务=动作 DARTS方法 ·基于系统的DFG进行任务划分 ●出 。 实时编程模式(programming paradigms) 并发与实时系级 -编程模式:way of thinking about programming 一二故 - 同步方法/异步方法:同步/异步语言 用行日 。 实时软件分析设计方法DARTS:Hassan Gomaa提出 《并发与实时系统软件设计》 一并发、实时系统和分布式实时系统的重要概念和特征 一通过经典的案例对并发和实时系统进行深入的剖析 一行驶监控系统,机器人控制器,电梯控制系统,分布式工厂 自动化系统 -Ada简介 -卡内基·梅隆大学CMU软件工程研究所SE推荐教材 llxx@ustc.edu.cn 2/100

内容提要 • 实时系统的定义与特征 – 反应式系统,实时系统 – 控制系统设计简介 • 任务的定义 – Event-action模型 • 识别事件和动作,任务=动作 – DARTS方法 • 基于系统的DFG进行任务划分 llxx@ustc.edu.cn 2/100 • 实时编程模式(programming paradigms) – 编程模式:way of thinking about programming – 同步方法/异步方法:同步/异步语言 • 实时软件分析设计方法DARTS:Hassan Gomaa提出 – 《并发与实时系统软件设计》 – 并发、实时系统和分布式实时系统的重要概念和特征 – 通过经典的案例对并发和实时系统进行深入的剖析 – 行驶监控系统,机器人控制器,电梯控制系统,分布式工厂 自动化系统 – Ada简介 – 卡内基·梅隆大学CMU软件工程研究所SEI推荐教材

Building blocks of RT/E Embedded computers Sensors Actuators Network Software now makes up 90 percent of the value of these devices. More than 80%of innovations in the automotive industry are expected to result from embedded software over the next decade. Apolication ware Other Hardware RTOS Comparing Software Complexity Real-Time Oporating System 4 Lines of code 100M RT03) 100M 30M ND 10M 10M Converters 2M ASIC/FPGA Processor(s) DIA 1M Actuators 100K 50K Diagnostic Port Auxiliary Systems pOwer,cooling.-】 Video Processor Human Command Interface

Building blocks of RT/E • Embedded computers + Sensors + Actuators + Network • Software now makes up 90 percent of the value of these devices. – More than 80% of innovations in the automotive industry are expected to result from embedded software over the next decade

Systems分类 ·系统的行为特征,分 -Transformational Systems变换式系统 ·程序与环境Sequential act:输入计算输出Terminated Reactive Systems:react to external event Event-driven,Non-terminated 一其行为定义为系统状态的无限序列的集合 一其行为必须是确定的:即输出由输入和时间确定 ·Concurrent,包括两层含义: 一程序执行与环境并行 并行设计:in an aircraft,the pitch and the roll must be controlled at the same time 》称”逻辑并发“,与物理实现无关! 58.2 ·O同步方式,分 -Interactive Systems:按系统时间 -Reactive Systems:按环境时间 Permanent reaction to an environment that cannot wait

Systems分类 • 系统的行为特征,分 – Transformational Systems变换式系统 • 程序与环境Sequential act:输入|计算|输出|Terminated – Reactive Systems:react to external event • Event-driven,Non-terminated – 其行为定义为系统状态的无限序列的集合 – 其行为必须是确定的:即输出由输入和时间确定 即输出由输入和时间确定 • Concurrent,包括两层含义: – 程序执行与环境并行 – 并行设计:in an aircraft, the pitch and the roll must be controlled at the same time » 称”逻辑并发“ ,与物理实现无关! • I/O同步方式,分 – Interactive Systems:按系统时间 – Reactive Systems:按环境时间 • Permanent reaction to an environment that cannot wait

反应式系统:激励/响应系统 系统行为由一个激励序列和相应的响应动作及时间约束进 行定义 -“Stimulus-Response”过程:由一组并发协作的实时任务实现 ·针对输入激励(周期性、非周期),系统产生相应的反应 -Timing Constraints:开始时间,完成时间,截止时间,。。。 Device l/O Environment Task 1 R1 Output Manager 1 Device 1/O P Task 2 Inputs Outputs Task 3 R2 Output Manager 2 州州 Task 4 Periodic timer(s) llxx@ustc.edu.cn 5/100

反应式系统:激励/响应系统 • 系统行为由一个激励序列和相应的响应动作及时间约束进 行定义 – “Stimulus-Response ”过程:由一组并发协作的实时任务实现 • 针对输入激励(周期性、非周期),系统产生相应的反应 – Timing Constraints:开始时间,完成时间,截止时间,。。。 llxx@ustc.edu.cn 5/100

11 12 实时系统定义 fimctionality implementation stressing on Real-Time timing constraints Reactive stressing on Embedded hardware constraints Donald Gillies,1991~1992 一个实时系统是指计算的正确性不仅取决于程序的逻辑正确性,也 取决于结果产生的时间。 value domain,temporal domain 一条件一:必须在规定的时间范围内(环境时间)正确地响应外部物理过 程的变化。 一条件二:任务的执行时间可以根据系统的软硬件信息进行确定性预测。 Running faster is good,but does not guarantee a correct behavior

实时系统定义 • Donald Gillies,1991~1992 – 一个实时系统是指计算的正确性不仅取决于程序的逻辑正确性,也 取决于结果产生的时间。 • value domain,temporal domain – 条件一:必须在规定的时间范围内(环境时间)正确地响应外部物理过 程的变化。 – 条件二:任务的执行时间可以根据系统的软硬件信息进行确定性预测。 • Running faster is good, but does not guarantee a correct behavior

Release time,Deadline,WCET WCRT tobservation tresponse treaction Arrival Release Completion (invocation) processing system sensor actuator Time tasks Jitter Execution scheduler wcet messages Response Time Static analysis Measurements gives safe might miss the timing values! longest time! possible program execution times time

Release time, Deadline, WCET & WCRT

-1 Reference ex Embedded Uk A/D Inputs Converter Control Laws r(t) y A/D D/A Converter Control System Converter y u(t) Outputs y() Flow meter Valve Controlled System pipe tobservation tresponse processing system sensor actuator tasks scheduler wcet messages

Hierarchical control Time Budget visual-based navigation 100m5 obstacle object avoidance recognition 10ms visual vehicle tracking control 20 ms 5m5 feature extraction motor motor motor motor control control control control 1 ms 1ms camera pan tilt US1 US2 mot dx mot sx

Hierarchical control & Time Budget

硬实时vs.软实时:deadline! 。 硬实时 -超过时限完成任务没有意义(incorrect) ·软实时 -超过时限完成对任务有一定影响(degraded) 实践中,与系统的时间精度有关 典型的,软实时任务的调度精度毫秒级,硬实时微秒级。 Figure 1:The real-time spectrum Non- Soft Hard real time real time real time Computer User Internet Cruise Tele. Flight Electronic simulation interface video control communications control engine llxx@ustc.edu.cn 10/87

硬实时vs.软实时:deadline! • 硬实时 – 超过时限完成任务没有意义(incorrect) • 软实时 – 超过时限完成对任务有一定影响(degraded) • 实践中,与系统的时间精度有关 – 典型的,软实时任务的调度精度毫秒级,硬实时微秒级。 llxx@ustc.edu.cn 10/87

点击下载完整版文档(PDF)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共93页,可试读20页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有