ImageVerifierCode 换一换
格式:PDF , 页数:31 ,大小:178.81KB ,
资源ID:1027490      下载积分:10000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-1027490.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(SAE J 2640-2008 General Automotive Embedded Software Design Requirements《通用汽车嵌入式软件设计要求》.pdf)为本站会员(dealItalian200)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

SAE J 2640-2008 General Automotive Embedded Software Design Requirements《通用汽车嵌入式软件设计要求》.pdf

1、_SAE Technical Standards Board Rules provide that: “This report is published by SAE to advance the state of technical and engineering sciences. The use of this report is entirely voluntary, and its applicability and suitability for any particular use, including any patent infringement arising theref

2、rom, is the sole responsibility of the user.” SAE reviews each technical report at least every five years at which time it may be reaffirmed, revised, or cancelled. SAE invites your written comments and suggestions. Copyright 2008 SAE International All rights reserved. No part of this publication ma

3、y be reproduced, stored in a retrieval system or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of SAE. TO PLACE A DOCUMENT ORDER: Tel: 877-606-7323 (inside USA and Canada) Tel: 724-776-4970 (outside USA)

4、Fax: 724-776-0790 Email: CustomerServicesae.org SAE WEB ADDRESS: http:/www.sae.orgJ2640 OCT2008 SURFACEVEHICLERECOMMENDEDPRACTICEIssued 2006-04Revised 2008-10 Superseding J2640 APR2006 (R) General Automotive Embedded Software Design Requirements RATIONALEChanges were made based on the feedback from

5、the previously balloted document. Changes include consistent terminology usage and spelling mistakes in the following section; 3. Definitions 5.1.2 Use of Interrupts Caused by Module Input Signals (1-2) 5.1.3 Bounding Interrupt Overhead (1-3) 5.1.4 Use of Nested Interrupts (1-4) 5.2.1 Worst-Case CPU

6、 Load Measurement (2-1) 5.2.4 Use of Software Wait Loops (2-4) 5.3.1 Initialization of All Control Registers (3-1)5.3.2 Refreshing Control Registers (3-2) 5.3.3 Clock Prescaler and Pll (3-3) 5.5.2 Unused Memory (5-2) 5.5.4.4 Data Integrity Recovery (5-6) 5.5.4.6 Non-Volatile Memory Initialization (5

7、-8) Appendix A Discussion on System Design Interactions FOREWORDNOTE: This document represents input from software experts in the automotive embedded software industry. Participants are from the OEMs, the automotive electronic module supplier base, related software suppliers, and consultants to the

8、industry. TABLE OF CONTENTS 1. SCOPE 32. REFERENCES 33. DEFINITIONS . 33.1 Automotive Embedded Software 33.2 Corner Frequency . 33.3 Customer. 33.4 Embedded Software Anomaly 43.5 Embedded Software Robustness . 43.6 Hard Real-Time. 43.7 LOS (Limited Operating Strategy). 43.8 Multi-Threading (Multi-Ta

9、sking) 4Copyright SAE International Provided by IHS under license with SAENot for ResaleNo reproduction or networking permitted without license from IHS-,-,-SAE J2640 Revised OCT2008 - 2 -3.9 Non-Preemptive System . 53.10 NVM (Non-Volatile Memory). 53.11 Overlapping Interrupts 53.12 Preemptive Syste

10、m. 53.13 Resource Sharing . 53.14 Sleep Mode . 53.15 Soft Real-Time 53.16 Stop-Band Frequency . 63.17 Supplier . 63.18 Watchdog 64. OVERVIEW. 64.1 Elements of a Requirement 64.2 Requirement Heuristics. 65. FUNDAMENTAL REQUIREMENTS. 65.1 Interrupt Requirements . 65.1.1 Use of Interrupts (1-1). 65.1.2

11、 Use of Interrupts Caused by Module Input Signals (1-2) 75.1.3 Bounding Interrupt Overhead (1-3). 85.1.4 Use of Nested Interrupts (1-4) 85.2 Timing Consistency Requirements . 95.2.1 Worst-Case CPU Load Measurement (2-1) . 95.2.2 Worst-Case CPU Load Margin (2-2). 95.2.3 Software Measuring Timing (2-3

12、) . 105.2.4 Use of Software Wait Loops (2-4). 105.3 Microcontroller Consistency Requirements 115.3.1 Initialization of All Control Registers (3-1). 115.3.2 Refreshing Control Registers (3-2) . 125.3.3 Clock Prescaler and PLL (3-3) 125.4 Watchdog Requirements 135.4.1 Use of a Watchdog Timer (4-1). 13

13、5.4.2 Servicing the Watchdog Timer (4-2) . 135.5 Memory Requirements 145.5.1 Run-Time Data Integrity Checking (5-1). 145.5.2 Unused Memory (5-2) . 145.5.3 Dynamic Memory Allocation (5-3). 145.5.4 Non-Volatile Memory Requirements. 155.6 Microcontroller Selection Requirements. 185.6.1 Use of a Custom

14、Microcontroller (6-1) 195.6.2 Determining Memory Size (6-2) 196. HARDWARE INTERFACE REQUIREMENTS (NEVER TRUST A RAW INPUT SIGNAL) . 206.1 Discussion. 206.1.1 Control Theory 206.1.2 Noise Sources. 216.1.3 Debounce Algorithms 216.2 Digital Input Interfacing Requirements 226.2.1 Regular, Periodic Sampl

15、ing (7-1) 226.2.2 Low Pass Input Filter (7-2) 226.2.3 Digital Input Debounce (7-3). 246.3 Analog Input Interfacing Requirements 246.3.1 Filter Matching - Just To Get One Valid Sample 246.3.2 Software Versus Hardware Ratiometric Conversions - Just To Get One Valid Sample 256.3.3 Stabilizing A Discret

16、e Analog Input. 266.3.4 Measuring A Steady-State Continuous Analog Signal . 27Copyright SAE International Provided by IHS under license with SAENot for ResaleNo reproduction or networking permitted without license from IHS-,-,-SAE J2640 Revised OCT2008 - 3 -7. UPCOMING TOPICS 278. NOTES 288.1 Margin

17、al Indicia. 28APPENDIX A DISCUSSION ON SYSTEM DESIGN INTERACTIONS.29A.1 DEBOUNCING AND POWER SUPPLY . 29A.2 DEBOUNCING AND SLEEP/AWAKE 29A.3 SYSTEM VOLTAGE . 29A.4 DEBOUNCING AND SYSTEM VOLTAGE . 29A.5 DEBOUNCE, VOLTAGE MONITORING, KEY-OFF LOAD AND SLEEP/AWAKE 30A.6 SLEEP/AWAKE AND NVM MODIFICATIONS

18、 . 30A.7 VOLTAGE DROPOUT 30A.8 SUGGESTIONS FOR IMPROVING SYSTEM RELIABILITY. 30APPENDIX B SUGGESTED RELATED MATERIALS 31B.1 BOOK RESOURCES 31B.1.1 Software Standards 31B.1.2 Software Reliability 311. SCOPE The scope of this Recommended Practice encompasses the following objectives: Concentrate on ge

19、neral best practices for vehicular embedded software design. Establish programming language-independent best practices. Establish hardware/software interface best practices. Establish multi-threaded system best practices. Provide verification criteria to evaluate product compliance with this best pr

20、actice. 2. REFERENCES There are no referenced publications specified herein. 3. DEFINITIONS 3.1 Automotive Embedded Software A set of instructions that controls special purpose hardware residing in a vehicle. 3.2 Corner Frequency The corner frequency is defined as the frequency at which the output i

21、s attenuated by 3 decibels (1/2 the power) of the input signal for a single pole filter. Half the power is 1/Sqrt(2) or 0.707 gain. 3.3 Customer The company that requested the embedded software. Copyright SAE International Provided by IHS under license with SAENot for ResaleNo reproduction or networ

22、king permitted without license from IHS-,-,-SAE J2640 Revised OCT2008 - 4 -3.4 Embedded Software Anomaly Any unexpected behavior exhibited by the software regardless of whether the anomaly is induced by external module conditions (for example an electrical transient or a gamma ray that flips a bit i

23、n a control register) or internally caused by ahardware anomaly (for example, the watchdog timer fails to initialize) or internally caused by a software problem (for example, a stack overflow is not detected). 3.5 Embedded Software Robustness A measure of the predictability of softwares response to:

24、 Unusual and unexpected inputs and loads (CPU, interrupts, network.) Unanticipated events Hardware and software defects Hardware failures Errors introduced during system maintenance. 3.6 Hard Real-Time A real-time system can be classified as either hard or soft. The distinction, however, is somewhat

25、 fuzzy. As illustrated in Figure 1 - Real-Time Spectrum, the meaning of real-time spans a spectrum. At one end of the spectrum is non-real-time, where there are no important deadlines (meaning all deadlines can be missed). The other end is hard real-time, where no deadlines can be missed. Every appl

26、ication falls somewhere between the two endpoints. FIGURE 1 - REAL-TIME SPECTRUM A hard real-time system is one in which one or more activities must never miss a deadline or timing constraint, otherwise the system fails. Failure includes damage to the equipment, major loss in revenues, or even injur

27、y or death. 3.7 LOS (Limited Operating Strategy) Strategy for providing limited functionality under failure conditions. 3.8 Multi-Threading (Multi-Tasking) Method whereby multiple tasks (or processes/threads) run on a single CPU. Only one tasks/process/threads is “running” at any one time. A “schedu

28、ler” switches between threads in order to simulate simultaneous thread execution. There are two basic types of multi-threading: cooperative and preemptive. Cooperative: the threads voluntarily give up control at thread defined points. Preemptive: control is taken from a thread at any time. NOTE: The

29、 difference between task, processes and threads is not pertinent to this discussion. Copyright SAE International Provided by IHS under license with SAENot for ResaleNo reproduction or networking permitted without license from IHS-,-,-SAE J2640 Revised OCT2008 - 5 -3.9 Non-Preemptive System A system

30、where none of the tasks can preempt the execution of the current task and take control of the processor. A non-preemptive system doesnt use interrupts and relies entirely on polling. Any system that uses interrupts is preemptive system. 3.10 NVM (Non-Volatile Memory) Programmatically alterable memor

31、y used to store data values when power is removed. 3.11 Overlapping Interrupts An overlapping interrupt occurs when an interrupt is asserted prior to completion of processing of the previous assertion of the same interrupt. An overlapping interrupt can be caused by any of the following items: Proces

32、sing of the interrupt takes longer than the minimum possible time between interrupts Processing of higher-priority interrupts causes the first interrupt assertion to experience latency greater than the minimum possible time between interrupts. Many advanced 32-bit CPU architectures have multiple lev

33、els of interrupts. Critical sections of software inhibit interrupts such that an interrupt can be asserted twice between the beginning of the critical section and the completion of processing the first assertion. This includes any latency issues caused by higher-priority interrupts. Poor filtering o

34、f the signal causing spurious interrupts (ringing, noise.) A combination of any or all the above issues. Overlapping interrupts are a system issue and require good system design practices to ensure that they can never occur. Since interrupts are by nature asynchronous, they cannot be anticipated and

35、 worst-case analysis is usually required. 3.12 Preemptive System A system where one or more tasks or interrupts can preempt the current task and take control of the processor. A preemptive system uses a preemptive operating system with multiple tasks or interrupts or both. A simple round-robin sched

36、uler with interrupts is a preemptive system. 3.13 Resource Sharing A resource is defined as any component within a computer based system that is used by the application to accomplish a task. Examples include the processor, memory, I/O, etc. Resources may be dedicated or shared. For example, the memo

37、ry in which the application is running is typically dedicated, while global memory is shared. As soon as any resource is shared, the application must provide a means to manage this sharing. Resource sharing is the management of resources that are shared between different areas of the application to

38、ensure data consistency, system integrity, and resource availability. Typically, the Operating System or Kernel has resource sharing management services, but it is left to the developer to determine when to use these services. In embedded systems, typical shared resources that must be managed includ

39、e Non-Volatile RAM or EEPROM, communications channels (SAE J1850, CAN, LIN), global variables used by interrupts or multiple tasks, and I/O. Often overlooked resources are data items shared between tasks that take multiple memory cycles to access (bit-fields, large memory blocks). 3.14 Sleep Mode A

40、special module-operating mode that uses a low quiescent current but is still able to respond to a limited set of inputs. Usually this only occurs when the ignition is off. 3.15 Soft Real-Time A soft real-time system is one that has timing requirements, but occasionally missing them has negligible ef

41、fects, as application requirements as a whole continue to be met. Copyright SAE International Provided by IHS under license with SAENot for ResaleNo reproduction or networking permitted without license from IHS-,-,-SAE J2640 Revised OCT2008 - 6 -3.16 Stop-Band Frequency The frequency above which the

42、 attenuation of the signal could exceed a specified value. Typically, this is specified to guarantee that the signal does not produce a response. For example, TTLs would use an attenuation of 0.9 for a 5 volt signal, this attenuation would guarantee the filter response in the Stop-Band frequency to

43、be 0-0.5V. 3.17 Supplier The company that provided the embedded software to the Customer. 3.18 Watchdog A watchdog is a device that is used to protect a system from lockup causing the system to stop responding. Software errors are one of the major contributors to lockup, but other issues can also ca

44、use it. Normally the system must periodically send information to the watchdog (pet the dog) to keep it from rebooting/restarting the microcontroller or system. 4. OVERVIEW 4.1 Elements of a Requirement Each requirement is composed of the following elements (some of which are optional): Requirement

45、Title (m-n) where m-n is the traceable requirement number. o “m” is the requirement category 1 is Interrupts 2 is Timing Consistency 3 is Data Consistency 4 is Watchdog 5 is Memory REQUIREMENT Describes the requirement. CATEGORY Type of requirements JUSTIFICATION Supports the reasons why the require

46、ment is needed. EXCEPTIONS Lists any acceptable exceptions to the requirement. REVIEW QUESTIONS These are typical questions that will be asked at the design review. 4.2 Requirement Heuristics Embedded software is not robust when the software design and implementation have not addressed all condition

47、s that might introduce an anomaly. The requirements in this document will reduce the incidence of these anomalies. 5. FUNDAMENTAL REQUIREMENTS 5.1 Interrupt Requirements 5.1.1 Use of Interrupts (1-1) 5.1.1.1 Requirement Use of interrupts must be limited to the absolute minimal set needed to perform

48、the required task(s). 5.1.1.2 Justification Interrupts introduce preemptive resource sharing issues. The history of module development has demonstrated that preemptive resource sharing anomalies are a leading cause of recalls, product introduction delays, and slow product update turnarounds. Copyright SAE International Provided by IHS under license with SAENot for ResaleNo reproduction or networking permitted without license from IHS-,-,-SAE J2640 Revised OCT2008 - 7 -5.1.1.3 Review Questi

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1