® 实时嵌入式软件设计 李曦 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