嵌入式系统概论
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
– Non-Recurring Engineering cost
• Flexibility: the ability to change the functionality of the
system without incurring heavy NRE cost
Time-to-market: a demanding design metric
• Availability/Usefulness • Reliability • Safety • Maintainability • Cost • Image size
llxx@ustc.edu.cn
16/87
性能指标
• 性能(Performance)
– 时钟频率、IPS(instructions per second)等
Typical EmS Functional Requirements
• Control laws
– e.g. PID control, fuzzy control
• Sequencing control
– e.g. FSMs, mode changes, switching between control laws
7/87
What is an Embedded System?
• Embed
– Longman Dictionary:to fix (something) firmly and deeply
– Webser Dictionary:to enclose closely in a surrounding mass
• Signal processing
– e.g. voice, video
• Fault response
– e.g. de百度文库ection, reconfiguration
• Application-specific user interface device
– e.g. buttons, bells, lights
entry
entry
2W Time
Losses due to delayed market entry (cont.)
Revenues ($)
Market rise
Peak revenue
On-time Delayed
Peak revenue from delayed entry
Market fall
• TTM
– 从设计开始到产品可以销售所需的时间
• Market Window
– 产品投放市场的最佳时间
Market Window
• 平均TTM是8个月
Revenues ($)
• TTM的推迟将导致产品利润下降
Time (months)
40%:60%
Revenue Model
• Simplified revenue model
• Application and Domain Specific • Reactive and Real-time • Distributed • Heterogeneous • Operate in harsh environments • Must meet high-integrity quality attribute
tota l c ost (x1000) p er p rod uc t c ost
$200,000 $160,000 $120,000
$80,000 $40,000
嵌入式实时系统设计方法概论 Embedded real-time systems (Embedded Computing)
李曦 llxx@ustc.edu.cn 陈香兰 xlanchen@ustc.edu.cn
Presentation Outline
• 嵌入式系统概述
– 嵌入式系统的定义 – 嵌入式系统的特征与指标 – 嵌入式系统分类
– 英国电机工程师协会 – 早期的典型应用领域在制造业
• 1962年,美国一个乙烯厂实现工业装置中的直接数字化控制 (DDC)
llxx@ustc.edu.cn
9/87
嵌入式控制系统的软/硬件框架
llxx@ustc.edu.cn
10/87
嵌入?
• 单板机Single Board computer
– Z80
• Wayne Wolf,《高性能嵌入式计算》
llxx@ustc.edu.cn
13/87
应用层 OS层 驱动层
电源管理
Flash
EEPROM
内
SDRAM SRAM
存
应用程序 文件系统/图形用户应用程序接口
实时操作系统(RTOS) 设备驱动程序、HAL、BSP
SOC/SOPC
GPIO IIS USB LCD
• 发展方向:CPS • 热点应用示例
– 汽车电子 – 。。。
• 课程说明
llxx@ustc.edu.cn
2/87
计算机系统的发展趋势
llxx@ustc.edu.cn
3/87
Embedded Systems around us
消费电子、通信产品 工业控制、信息家电
移动互联设备海量增长
嵌入式系统应用领域
• System
– implicitly a controlling system.
llxx@ustc.edu.cn
8/87
嵌入式系统的定义(1)
• “devices used to control, monitor, or assist the operation of equipment, machinery or plants”
• Unit cost: the monetary cost of manufacturing each
copy of the system, excluding NRE cost
• NRE cost: The one-time monetary cost of designing the
system
requirements • Small Size and Weight • Power concerns
llxx@ustc.edu.cn
15/87
Quality Attributes
• Throughput • Response • Security • Testability • Debugability • Survivability
• 相机0.25s完成照片处理
– 延迟(Latency)
• 加速比(Speedup)
– 如B相对于A的加速比 = B的性能 / A的性能
• Throughput speedup = 8/4 = 2
“可用性”度量:缓急度函数
• 实时任务的松弛度(laxity):决定优先级/实时性等
– 实线:导弹,晚了,无效或炸错,不如不投。 – 点线:刷卡消费,连接时间长后,不耐烦或放弃。 – 短线:股票显示系统,允许一些数据延迟,但可用性下降很快,大的延迟造成损失
• 但不是好指标:用户关心数码相机产生照片的速度
• 吞吐率(Throughput)
– Tasks per second, 相机A每秒处理4幅照片 – 吞吐率比延迟可以更好的描述并发性
• 相机B每秒处理8幅照片(存储前一幅照片的同时抓拍一张新照片)
• 响应时间(response time)
– 任务开始到结束的时间
美国进口一部“中国产”iPhone
• 总价=$179
– 日本34%:闪存=$24,屏幕=$35 – 德国17%:GPS+摄像+WiFi=$30 – 南韩13%:处理器+零部件=$23 – 米国6%:蓝牙+录音+3G=$12 – 其他:材料+软件许可+专利=$48 – 中国3.6%:组装=$6.5
llxx@ustc.edu.cn
Market rise
Peak revenue
On-time Delayed
Peak revenue from delayed entry
Market fall
– The difference between the on-time and delayed triangle areas
D
W
On-time Delayed
• 单片机Single Chip computer
– 8051:CPU+片上存储+I/O控制(INT/DMA)+GPIO
• SOC/SOPC
– System-on-a-Programmable-Chip – Xilinx Zynq系列
• GPP+DSP+Accelerator+片上存储+I/O
– 可编程、可裁减、可扩充、可升级
• 成本:
– total cost = NRE cost + unit cost * # of units
• 分摊:Amortizing
– per-product cost = total cost / # of units = (NRE cost / # of units) + unit cost
一位高管猜测,2005年制造第一台iPhone工程机花了1.5亿美元以上的费用。
Compare technologies by costs
• best depends on quantity
– Technology A: NRE=$2,000, unit=$100 – Technology B: NRE=$30,000, unit=$30 – Technology C: NRE=$100,000, unit=$2
llxx@ustc.edu.cn
12/87
嵌入式系统定义(2)
• 定义2:以应用为中心、以计算机技术为基础、软 件硬件可裁剪、适应应用系统对功能、可靠性、 成本、体积、功耗严格要求的专用计算机系统。
– 量身定做 – 资源有限 – “在过去的20年中,虽然嵌入式系统仍是许多消费电
子设备、工业设备和军方设备中不可见的部分,但它 作为一个整体已经脱颖而出。如今,嵌入式计算不再 限于简单设备控制,它已经能以高实时处理率和低能 耗来执行复杂的处理任务” 。
ADC/DAC
处理器/ARM核
Timer/RTC
MMU/Cache
DSP/浮点运算协处理器
CAN 以太网 DMA
FPGA/CPLD
UART和IrDA
看门狗及复 位电路
人机交互接口LCD/触摸屏、键盘、鼠标
嵌入式计算机组成
llxx@ustc.edu.cn
软件 硬件
输 入 输 出 接 口
14/87
Characteristics
• Area = 1/2 * base * height
– On-time = 1/2 * 2W * W – Delayed = 1/2 * (W-
D+W)*(W-D)
• Percentage revenue loss = (D(3W-D)/2W2)*100%
• examples
D
W
On-time Delayed
• Example – NRE=$2000, unit=$100 – For 10 units – total cost = $2000 + 10*$100 = $3000 – per-product cost = $2000/10 + $100 = $300
Amortizing NRE cost over the units results in an additional $200 per unit
entry
entry
2W Time
– Lifetime 2W=52 wks, delay D=4 wks – (4*(3*26 –4)/2*26^2) = 22% – Lifetime 2W=52 wks, delay D=10 wks – (10*(3*26 –10)/2*26^2) = 50%
产品研发成本(NRE)与产品成本(UnitCost)
“成本”度量指标
• Time-to-prototype: the time needed to build a
working version of the system
• Time-to-market: the time required to develop a
system to the point that it can be released and sold to customers
– Product life = 2W, peak at W
– Time of market entry defines a triangle, representing market penetration
– Triangle area equals revenue
• Loss
Revenues ($)
• Flexibility: the ability to change the functionality of the
system without incurring heavy NRE cost
Time-to-market: a demanding design metric
• Availability/Usefulness • Reliability • Safety • Maintainability • Cost • Image size
llxx@ustc.edu.cn
16/87
性能指标
• 性能(Performance)
– 时钟频率、IPS(instructions per second)等
Typical EmS Functional Requirements
• Control laws
– e.g. PID control, fuzzy control
• Sequencing control
– e.g. FSMs, mode changes, switching between control laws
7/87
What is an Embedded System?
• Embed
– Longman Dictionary:to fix (something) firmly and deeply
– Webser Dictionary:to enclose closely in a surrounding mass
• Signal processing
– e.g. voice, video
• Fault response
– e.g. de百度文库ection, reconfiguration
• Application-specific user interface device
– e.g. buttons, bells, lights
entry
entry
2W Time
Losses due to delayed market entry (cont.)
Revenues ($)
Market rise
Peak revenue
On-time Delayed
Peak revenue from delayed entry
Market fall
• TTM
– 从设计开始到产品可以销售所需的时间
• Market Window
– 产品投放市场的最佳时间
Market Window
• 平均TTM是8个月
Revenues ($)
• TTM的推迟将导致产品利润下降
Time (months)
40%:60%
Revenue Model
• Simplified revenue model
• Application and Domain Specific • Reactive and Real-time • Distributed • Heterogeneous • Operate in harsh environments • Must meet high-integrity quality attribute
tota l c ost (x1000) p er p rod uc t c ost
$200,000 $160,000 $120,000
$80,000 $40,000
嵌入式实时系统设计方法概论 Embedded real-time systems (Embedded Computing)
李曦 llxx@ustc.edu.cn 陈香兰 xlanchen@ustc.edu.cn
Presentation Outline
• 嵌入式系统概述
– 嵌入式系统的定义 – 嵌入式系统的特征与指标 – 嵌入式系统分类
– 英国电机工程师协会 – 早期的典型应用领域在制造业
• 1962年,美国一个乙烯厂实现工业装置中的直接数字化控制 (DDC)
llxx@ustc.edu.cn
9/87
嵌入式控制系统的软/硬件框架
llxx@ustc.edu.cn
10/87
嵌入?
• 单板机Single Board computer
– Z80
• Wayne Wolf,《高性能嵌入式计算》
llxx@ustc.edu.cn
13/87
应用层 OS层 驱动层
电源管理
Flash
EEPROM
内
SDRAM SRAM
存
应用程序 文件系统/图形用户应用程序接口
实时操作系统(RTOS) 设备驱动程序、HAL、BSP
SOC/SOPC
GPIO IIS USB LCD
• 发展方向:CPS • 热点应用示例
– 汽车电子 – 。。。
• 课程说明
llxx@ustc.edu.cn
2/87
计算机系统的发展趋势
llxx@ustc.edu.cn
3/87
Embedded Systems around us
消费电子、通信产品 工业控制、信息家电
移动互联设备海量增长
嵌入式系统应用领域
• System
– implicitly a controlling system.
llxx@ustc.edu.cn
8/87
嵌入式系统的定义(1)
• “devices used to control, monitor, or assist the operation of equipment, machinery or plants”
• Unit cost: the monetary cost of manufacturing each
copy of the system, excluding NRE cost
• NRE cost: The one-time monetary cost of designing the
system
requirements • Small Size and Weight • Power concerns
llxx@ustc.edu.cn
15/87
Quality Attributes
• Throughput • Response • Security • Testability • Debugability • Survivability
• 相机0.25s完成照片处理
– 延迟(Latency)
• 加速比(Speedup)
– 如B相对于A的加速比 = B的性能 / A的性能
• Throughput speedup = 8/4 = 2
“可用性”度量:缓急度函数
• 实时任务的松弛度(laxity):决定优先级/实时性等
– 实线:导弹,晚了,无效或炸错,不如不投。 – 点线:刷卡消费,连接时间长后,不耐烦或放弃。 – 短线:股票显示系统,允许一些数据延迟,但可用性下降很快,大的延迟造成损失
• 但不是好指标:用户关心数码相机产生照片的速度
• 吞吐率(Throughput)
– Tasks per second, 相机A每秒处理4幅照片 – 吞吐率比延迟可以更好的描述并发性
• 相机B每秒处理8幅照片(存储前一幅照片的同时抓拍一张新照片)
• 响应时间(response time)
– 任务开始到结束的时间
美国进口一部“中国产”iPhone
• 总价=$179
– 日本34%:闪存=$24,屏幕=$35 – 德国17%:GPS+摄像+WiFi=$30 – 南韩13%:处理器+零部件=$23 – 米国6%:蓝牙+录音+3G=$12 – 其他:材料+软件许可+专利=$48 – 中国3.6%:组装=$6.5
llxx@ustc.edu.cn
Market rise
Peak revenue
On-time Delayed
Peak revenue from delayed entry
Market fall
– The difference between the on-time and delayed triangle areas
D
W
On-time Delayed
• 单片机Single Chip computer
– 8051:CPU+片上存储+I/O控制(INT/DMA)+GPIO
• SOC/SOPC
– System-on-a-Programmable-Chip – Xilinx Zynq系列
• GPP+DSP+Accelerator+片上存储+I/O
– 可编程、可裁减、可扩充、可升级
• 成本:
– total cost = NRE cost + unit cost * # of units
• 分摊:Amortizing
– per-product cost = total cost / # of units = (NRE cost / # of units) + unit cost
一位高管猜测,2005年制造第一台iPhone工程机花了1.5亿美元以上的费用。
Compare technologies by costs
• best depends on quantity
– Technology A: NRE=$2,000, unit=$100 – Technology B: NRE=$30,000, unit=$30 – Technology C: NRE=$100,000, unit=$2
llxx@ustc.edu.cn
12/87
嵌入式系统定义(2)
• 定义2:以应用为中心、以计算机技术为基础、软 件硬件可裁剪、适应应用系统对功能、可靠性、 成本、体积、功耗严格要求的专用计算机系统。
– 量身定做 – 资源有限 – “在过去的20年中,虽然嵌入式系统仍是许多消费电
子设备、工业设备和军方设备中不可见的部分,但它 作为一个整体已经脱颖而出。如今,嵌入式计算不再 限于简单设备控制,它已经能以高实时处理率和低能 耗来执行复杂的处理任务” 。
ADC/DAC
处理器/ARM核
Timer/RTC
MMU/Cache
DSP/浮点运算协处理器
CAN 以太网 DMA
FPGA/CPLD
UART和IrDA
看门狗及复 位电路
人机交互接口LCD/触摸屏、键盘、鼠标
嵌入式计算机组成
llxx@ustc.edu.cn
软件 硬件
输 入 输 出 接 口
14/87
Characteristics
• Area = 1/2 * base * height
– On-time = 1/2 * 2W * W – Delayed = 1/2 * (W-
D+W)*(W-D)
• Percentage revenue loss = (D(3W-D)/2W2)*100%
• examples
D
W
On-time Delayed
• Example – NRE=$2000, unit=$100 – For 10 units – total cost = $2000 + 10*$100 = $3000 – per-product cost = $2000/10 + $100 = $300
Amortizing NRE cost over the units results in an additional $200 per unit
entry
entry
2W Time
– Lifetime 2W=52 wks, delay D=4 wks – (4*(3*26 –4)/2*26^2) = 22% – Lifetime 2W=52 wks, delay D=10 wks – (10*(3*26 –10)/2*26^2) = 50%
产品研发成本(NRE)与产品成本(UnitCost)
“成本”度量指标
• Time-to-prototype: the time needed to build a
working version of the system
• Time-to-market: the time required to develop a
system to the point that it can be released and sold to customers
– Product life = 2W, peak at W
– Time of market entry defines a triangle, representing market penetration
– Triangle area equals revenue
• Loss
Revenues ($)