首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
辅导data编程、讲解C/C++程序设计、program留学生程序辅导 解析Java程序|辅导留学生 Statistics统计、回归、迭代
项目预算:
开发周期:
发布时间:
要求地区:
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
1 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Document Change History
Date Release Changed by Change Description
2018-10-31 4.4.0 AUTOSAR
Release
Management
Modified:
Updated the range and resolution of
requirements
SWS_EFX_00220,SWS_EFX_0022
3,SWS_EFX_00226,SWS_EFX_00
229,SWS_EFX_00232,SWS_EFX_
00235,SWS_EFX_00240,SWS_EF
X_00243,SWS_EFX_00246,SWS_E
FX_00250,SWS_EFX_00253,SWS_
EFX_00256
2017-12-08 4.3.1 AUTOSAR
Release
Management
Added:
A note has been added in Section
8.1 of EFX specification to provide
clarity in usage of mnemonic for
Boolean data types.
Modified:
The data type for Boolean has been
updated in the UML of
SWS_Efx_00355.
Inclusion of Pointer to Constant
(P2CONST) for SWS_Efx_00355,
SWS_Efx_00309, SWS_Efx_00307
& SWS_Efx_00193 and proper
categorization of Parameters as
InOut for SWS_Efx_00376.
Document Title Specification of Extended
Fixed Point Routines
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 400
Document Status Final
Part of AUTOSAR Standard Classic Platform
Part of Standard Release 4.4.0
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
2 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Document Change History
Date Release Changed by Change Description
2016-11-30 4.3.0 AUTOSAR
Release
Management
Modified:
Updated the correct reference to
SRS_BSW_General
(SRS_BSW_00437) &
(SRS_BSW_00448) for
SWS_Efx_00810 &
SWS_Efx_00822 requirements.
Updated EFX document to support
MISRA 2012 standard. (Removed
redundant statements in
SWS_Efx_00809 which already
exist in SWS_BSW document and
SWS_SRS document)
Updated SWS_Efx_00275 &
SWS_Efx_00276 to provide more
clarity on resolution of parameters.
Updated SWS_Efx_00278 &
SWS_Efx_00279 to provide more
clarity on rounding and minimum
value of Param_cpcst-
>SlopeXXX_u32 * dT_s32. Provided
the correct IT number.
Updated the section 8.5.3.1 for
Structure definitions for controller
routines.
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
3 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Document Change History
Date Release Changed by Change Description
Updated SWS_Efx_00240,
SWS_Efx_00243, SWS_Efx_00246,
SWS_Efx_00250, SWS_Efx_00253
& SWS_Efx_00256 to correct the
case sensitivity for the function
name.
Section 2 has been revisited to
update Default Error Tracer instead
of Development Error tracer.
Removed:
Removal of Efx_ISetParam from
BSW uml model which is obsolete.
Removed the duplicated trace
environments for SWS_Efx_00520
& SWS_Efx_00525.
Removed the requirements that are
marked as Deprecated. (8.5.1.2
Second computation,
SWS_Efx_00009 -
SWS_Efx_00011, SWS_Efx_00041
- SWS_Efx_00043,
SWS_Efx_00295 -
SWS_Efx_00302, SWS_Efx_00347
- SWS_Efx_00354,
SWS_Efx_00345, SWS_Efx_00460,
SWS_Efx_00461 & 8.5.14
Efx_DeadTime)
2015-07-31 4.2.2 AUTOSAR
Release
Management
Modified:
Updated the requirement ID for
SWS_Efx_00033 as per the
convention
Updated requirement ID
SWS_Efx_00436 (UML) for
OutTypeMn as per the standard
convention
Updated SWS_Efx_00001 for
naming convention under Section
5.1, File Structure
Updated SWS_Efx_00365 to correct
the data type of input parameters
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
4 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Document Change History
Date Release Changed by Change Description
2014-10-31 4.2.1 AUTOSAR
Release
Management
Added:
New Variants for SWS_Efx_00412
(0xE2 - 0xE9)
Note has been added for
SWS_Efx_00053, SWS_Efx_00072
& Section 8.5.3.1.
A statement has been added to
clarify the formula used for
Hypotenuse function just below the
section 8.5.9
A statement has been added to
provide more clarity on the formula
mentioned in SWS_Efx_00451
Modified:
Updated usage of const in a
consistent manner in EFX
document. (SWS_Efx_00050,
SWS_Efx_00067, SWS_Efx_00085,
SWS_Efx_00519, SWS_Efx_00107,
SWS_Efx_00122, SWS_Efx_00146,
SWS_Efx_00172, SWS_Efx_00205,
SWS_Efx_00379 &
SWS_Efx_00404)
Formula for TeQ_
has been
corrected in section 8.5.3.1 and font
has been updated for
SWS_Efx_00071
Condition check included for
SWS_Efx_00053, SWS_Efx_00072
& Section 8.5.3.1 and corrected for
SWS_Efx_00054, SWS_Efx_00073
& SWS_Efx_00504. Formula
updated for SWS_Efx_00073
Updated rounding for
SWS_Efx_00071, SWS_Efx_00091,
SWS_Efx_00502, SWS_Efx_00151
& SWS_Efx_00156.
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
5 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Document Change History
Date Release Changed by Change Description
Service ID[hex] for
SWS_Efx_00405, SWS_Efx_00410
& SWS_Efx_00412
Input & Output range has been
modified for SWS_Efx_00187
Statement on rounding was updated
for SWS_Efx_00441
Comment for structure element “n”
has been updated for
SWS_Efx_00204 &
SWS_Efx_00836. Data type of “n”
has been modified for
SWS_Efx_00204.
2014-03-31 4.1.3 AUTOSAR
Release
Management
Modified: Rounding mechanism was
updated for HpFilter, Average,
Array_Average & MovingAverage
functions.
Added: A note below
SWS_Efx_00307 for
Efx_RampGetSwitchPos function.
2013-10-31 4.1.2 AUTOSAR
Release
Management
Deprecated: Efx_DeadTime function
Removed: Requirements for
Efx_SlewRate, Efx_RampCalc and
Efx_RampCalcJump functions
Added: SWS_Efx_00837 for
Efx_RampCalc function
Modified:
Descriptions of Efx_RampCalc and
Efx_RampSetParam
Requirements for Efx_RampCalc
and Efx_RampCalcJump functions.
Syntax for variants of
Efx_SlewRate, Efx_Div and
Efx_MovingAverage functions.
Resolution of the in-parameter for
Efx_Arcsin and Efx_Arccos
functions.
Name "underflow" to "negative
overflow" throughout the document
Editorial changes
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
6 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Document Change History
Date Release Changed by Change Description
2013-03-15 4.1.1 AUTOSAR
Administration
Added 8-bit and 16-bit variants for
Hysteresis functions
Formulae modified for Hypotenuse
functions
Second computation First-order lowpass
filter functions are deprecated
Inequalities are corrected for
Efx_HystLeftRight,
Efx_HystDeltaRight,
Efx_HystCenterHalfDelta functions
Description and requirements are
modified for Efx_Div,
Efx_Debounce, Efx_HystLeftDelta,
Efx_SortAscend, Efx_SortDescend,
Efx_EdgeBipol, Efx_Hysteresis,
Efx_MovingAverage functions
Description of the in-parameter
corrected for
Efx_DebounceSetParam,
Efx_Debounce functions
Physical range of ‘fac’ parameter is
modified in LpFilter First
computation
Renamed RS_FlipFlop function for
removing the post-fixes
Added SWS_Efx_00823 for Integral
promotion
Modified syntax for Efx_Gt,
Efx_Debounce functions
Corrected for
‘DependencyOnArtifact’
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
7 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Document Change History
Date Release Changed by Change Description
2011-12-22 4.0.3 AUTOSAR
Administration
Initialization functionality introduced
for 'Counter Routines'
Interface for Efx_CtrlSetLimit
corrected
Efx_MovingAverage
routine interface corrected
Efx_RampCalcSwitch routine
definition and requirements updated
for correct behavior
Interface for Efx_Debounce_u8_u8
routine updated
Updated parameter sequences for
DT1 and PI controller routines.
Name revised for Efx_PCalc routine
Description correct for
Efx_DebounceParam_Type and
Efx_DebounceState_Type
Interface table corrected for
Efx_Div routine
Interface table corrected for
Efx_MedianSort routine
Error classification support and
definition removed as DET call not
supported by library
Configuration parameter description
/ support removed for
XXX_GetVersionInfo routine.
XXX_GetVersionInfo routine name
corrected.
2010-09-30 3.1.5 AUTOSAR
Administration
Introduction of additional LIMITED
Functions for controllers
Ramp functions optimised for
effective usage
Separation of DT1 Type 1 and Type
2 Controller functions
Introduction of additional
approximative function for
calculation of TeQ
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
8 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Document Change History
Date Release Changed by Change Description
2010-02-02 3.1.4 AUTOSAR
Administration
Initial Release
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
9 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Disclaimer
This work (specification and/or software implementation) and the material contained
in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR
and the companies that have contributed to it shall not be liable for any use of the
work.
The material contained in this work is protected by copyright and other types of
intellectual property rights. The commercial exploitation of the material contained in
this work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the
work may be utilized or reproduced, in any form or by any means, without permission
in writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
10 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Table of Contents
1 Introduction and functional overview ................................................................. 12
2 Acronyms and abbreviations ............................................................................. 14
3 Related documentation...................................................................................... 15
3.1 Input documents......................................................................................... 15
3.2 Related standards and norms .................................................................... 15
4 Constraints and assumptions ............................................................................ 16
4.1 Limitations .................................................................................................. 16
4.2 Applicability to car domains........................................................................ 16
5 Dependencies to other modules........................................................................ 17
5.1 File structure .............................................................................................. 17
6 Requirements traceability .................................................................................. 18
7 Functional specification ..................................................................................... 19
7.1 Error classification...................................................................................... 19
7.2 Error Detection ........................................................................................... 19
7.3 Error notification ......................................................................................... 19
7.4 Initialization and shutdown ......................................................................... 19
7.5 Using Library API ....................................................................................... 19
7.6 library implementation ................................................................................ 20
8 API specification................................................................................................ 21
8.1 Imported types............................................................................................ 21
8.2 Type definitions .......................................................................................... 21
8.3 Comment about rounding........................................................................... 21
8.4 Comment about routines optimized for target ............................................ 22
8.5 Mathematical functions definitions.............................................................. 22
8.5.1 First-order low-pass filter ........................................................................ 22
8.5.2 First-order High-pass filter ...................................................................... 25
8.5.3 Controller routines .................................................................................. 29
8.5.4 Square root............................................................................................. 64
8.5.5 Exponential............................................................................................. 66
8.5.6 Average .................................................................................................. 67
8.5.7 Array Average......................................................................................... 67
8.5.8 Moving Average...................................................................................... 68
8.5.9 Hypotenuse ............................................................................................ 69
8.5.10 Trigonometric functions .......................................................................... 72
8.5.11 Rate limiter ............................................................................................. 77
8.5.12 Ramp routines ........................................................................................ 79
8.5.13 Hysteresis routines ................................................................................. 86
8.5.14 Debounce routines.................................................................................. 91
8.5.15 Ascending Sort Routine .......................................................................... 94
8.5.16 Descending Sort Routine........................................................................ 94
8.5.17 Median sort routine................................................................................. 95
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
11 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
8.5.18 Edge detection routines .......................................................................... 96
8.5.19 Interval routines ...................................................................................... 98
8.5.20 Counter routines ................................................................................... 101
8.5.21 Flip-Flop routine.................................................................................... 102
8.5.22 Limiter routines ..................................................................................... 103
8.5.23 64 bits functions.................................................................................... 104
8.6 Examples of use of functions ................................................................... 108
8.7 Version API .............................................................................................. 108
8.7.1 Efx_GetVersionInfo............................................................................... 108
8.8 Call-back notifications .............................................................................. 108
8.9 Scheduled functions................................................................................. 108
8.10 Expected Interfaces.................................................................................. 108
8.10.1 Mandatory Interfaces ............................................................................ 108
8.10.2 Optional Interfaces................................................................................ 109
8.10.3 Configurable interfaces......................................................................... 109
9 Sequence diagrams ........................................................................................ 110
10 Configuration specification........................................................................... 111
10.1 Published Information............................................................................... 111
10.2 Configuration option ................................................................................. 111
11 Not applicable requirements ........................................................................ 112
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
12 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
1 Introduction and functional overview
AUTOSAR Library routines are the part of system services in AUTOSAR architecture
and below figure shows position of AUTOSAR library in layered architecture.
Figure : Layered architecture
This specification specifies the functionality, API and the configuration of the
AUTOSAR library dedicated to extended mathematical functions for fixed-point
values.
This extended mathematical library (Efx) contains the following routines:
Moving average
First order high pass filter
First order low-pass filter
Controller routines
Square root
Exponential
Average
Array Average
Moving Average
Hypotenuse
Trigonometric functions
Rate limiter functions
Ramp routines
Hysteresis function
Dead Time
Debounce
Ascending Sort Routine
Descending Sort Routine
Median Sort
Edge detection routines
Interval routines
Counter routines
Basic Software
Runtime Environment (RTE)
Application Layer
ECU Hardware
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
13 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
Flip-Flop routine
Limiter routines
64 bit functions
All routines are re-entrant and can be used by multiple runnables at the same time.
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
14 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
2 Acronyms and abbreviations
Acronyms and abbreviations, which have a local scope and therefore are not
contained in the AUTOSAR glossary, must appear in a local glossary.
Abbreviation /
Acronym:
Description:
Arcsin Inverse Sine
Arccos Inverse Cosine
BSW Basic Software
Cos Cosine
DET Default Error Tracer
EFX Extended Mathematical library – Fixed point
Hypot Hypotenuse
HpFilter High pass filter
LpFilterFac1 Low pass filter with a factor of 1 (included in [0, 1])
LpFilter Low pass filter
Mn Mnemonic
Lib Library
Sqrt Square root
Sin Sine
SWS Software Specification
SRS Software Requirement Specification
u8 Mnemonic for the uint8, specified in AUTOSAR_SWS_PlatformTypes
u16 Mnemonic for the uint16, specified in AUTOSAR_SWS_PlatformTypes
u32 Mnemonic for the uint32, specified in AUTOSAR_SWS_PlatformTypes
s8 Mnemonic for the sint8, specified in AUTOSAR_SWS_PlatformTypes
s16 Mnemonic for the sint16, specified in AUTOSAR_SWS_PlatformTypes
s32 Mnemonic for the sint32, specified in AUTOSAR_SWS_PlatformTypes
s64 Mnemonic for the sint64, specified in AUTOSAR_SWS_PlatformTypes
u64 Mnemonic for the uint64, specified in AUTOSAR_SWS_PlatformTypes
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
15 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
3 Related documentation
3.1 Input documents
[1] List of Basic Software Modules,
AUTOSAR_TR_BSWModuleList.pdf
[2] Layered Software Architecture,
AUTOSAR_EXP_LayeredSoftwareArchitecture.pdf
[3] General Requirements on Basic Software Modules,
AUTOSAR_SRS_BSWGeneral.pdf
[4] Specification of ECU Configuration,
AUTOSAR_TPS_ECUConfiguration.pdf
[5] Basic Software Module Description Template,
AUTOSAR_TPS_BSWModuleDescriptionTemplate.pdf
[6] Specification of Platform Types,
AUTOSAR_SWS_PlatformTypes.pdf
[7] Specification of Standard Types,
AUTOSAR_SWS_StandardTypes.pdf
[8] Requirement on Libraries,
AUTOSAR_SRS_Libraries.pdf
[9] Specification of Memory Mapping,
AUTOSAR_SWS_MemoryMapping.pdf
3.2 Related standards and norms
[10] ISO/IEC 9899:1990 Programming Language – C
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
16 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
4 Constraints and assumptions
4.1 Limitations
No limitations.
4.2 Applicability to car domains
No restrictions.
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
17 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
5 Dependencies to other modules
5.1 File structure
Implementation & grouping of routines with respect to C files is recommended as per
below options and there is no restriction to follow the same.
Option 1 :
can be function name providing one C file per function,
eg.: Efx_Pt1_s32.c etc.
Option 2 :
can have common name of group of functions:
2.1 Group by object family:
eg.:Efx_Pt1.c, Efx_Dt1.c, Efx_Pid.c
2.2 Group by routine family:
eg.: Efx_Filter.c, Efx_Controller.c, Efx_Average.c etc.
2.3 Group by method family:
eg.: Efx_Sin.c, Efx_Exp.c, Efx_Arcsin.c, etc.
2.4 Group by architecture:
eg.: Efx_Slewrate16.c, Efx_Slewrate32.c
2.5 Group by other methods: (individual grouping allowed)
Option 3 :
can be removed so that single C file shall contain all Efx
functions, eg.: Efx.c.
Using above options gives certain flexibility of choosing suitable granularity with
reduced number of C files. Linking only on-demand is also possible in case of some
options.
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
18 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
6 Requirements traceability
Requirement Description Satisfied by
SRS_BSW_00003 All software modules shall provide version and
identification information
SWS_Efx_00815
SRS_BSW_00007 All Basic SW Modules written in C language shall
conform to the MISRA C 2012 Standard.
SWS_Efx_00809
SRS_BSW_00304 All AUTOSAR Basic Software Modules shall use the
following data types instead of native C data types
SWS_Efx_00812
SRS_BSW_00306 AUTOSAR Basic Software Modules shall be compiler
and platform independent
SWS_Efx_00813
SRS_BSW_00318 Each AUTOSAR Basic Software Module file shall
provide version numbers in the header file
SWS_Efx_00815
SRS_BSW_00321 The version numbers of AUTOSAR Basic Software
Modules shall be enumerated according specific rules
SWS_Efx_00815
SRS_BSW_00374 All Basic Software Modules shall provide a readable
module vendor identification
SWS_Efx_00814
SRS_BSW_00378 AUTOSAR shall provide a boolean type SWS_Efx_00812
SRS_BSW_00379 All software modules shall provide a module identifier in
the header file and in the module XML description file.
SWS_Efx_00814
SRS_BSW_00402 Each module shall provide version information SWS_Efx_00814
SRS_BSW_00407 Each BSW module shall provide a function to read out
the version information of a dedicated module
implementation
SWS_Efx_00815,
SWS_Efx_00816
SRS_BSW_00411 All AUTOSAR Basic Software Modules shall apply a
naming rule for enabling/disabling the existence of the
API
SWS_Efx_00816
SRS_BSW_00437 Memory mapping shall provide the possibility to define
RAM segments which are not to be initialized during
startup
SWS_Efx_00810
SRS_BSW_00448 Module SWS shall not contain requirements from Other
Modules
SWS_Efx_00822
SRS_LIBS_00001 The functional behavior of each library functions shall
not be configurable
SWS_Efx_00818
SRS_LIBS_00002 A library shall be operational before all BSW modules
and application SW-Cs
SWS_Efx_00800
SRS_LIBS_00003 A library shall be operational until the shutdown SWS_Efx_00801
SRS_LIBS_00013 The error cases, resulting in the check at runtime of the
value of input parameters, shall be listed in SWS
SWS_Efx_00817,
SWS_Efx_00819
SRS_LIBS_00015 It shall be possible to configure the microcontroller so
that the library code is shared between all callers
SWS_Efx_00806
SRS_LIBS_00017 Usage of macros should be avoided SWS_Efx_00807
SRS_LIBS_00018 A library function may only call library functions SWS_Efx_00808
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
19 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
7 Functional specification
7.1 Error classification
[SWS_Efx_00821] ⌈No error classification definition as DET call not supported by
library
⌋ ()
7.2 Error Detection
[SWS_Efx_00819] ⌈Error detection: Function should check at runtime (both in
production and development code) the value of input parameters, especially cases
where erroneous value can bring to fatal error or unpredictable result, if they have the
values allowed by the function specification. All the error cases shall be listed in SWS
and the function should return a specified value (in SWS) that is not configurable.
This value is dependant of the function and the error case so it is determined case by
case.
If values passed to the routines are not valid and out of the function specification,
then such error are not detected.
E.g. If passed value > 32 for a bit-position or a negative number of samples of an
axis distribution is passed to a routine. ⌋ (SRS_LIBS_00013)
7.3 Error notification
[SWS_Efx_00817] ⌈The functions shall not call the DET for error notification. ⌋
(SRS_LIBS_00013)
7.4 Initialization and shutdown
[SWS_Efx_00800] ⌈Efx library shall not require initialization phase. A Library
function may be called at the very first step of ECU initialization, e.g. even by the OS
or EcuM, thus the library shall be ready. ⌋ (SRS_LIBS_00002)
[SWS_Efx_00801] ⌈Efx library shall not require a shutdown operation phase. ⌋
(SRS_LIBS_00003)
7.5 Using Library API
Efx API can be directly called from BSW modules or SWC. No port definition is
required. It is a pure function call.
The statement ‘Efx.h’ shall be placed by the developer or an application code
generator but not by the RTE generator
Using a library should be documented. if a BSW module or a SWC uses a Library,
the developer should add an Implementation-DependencyOnArtifact in the
BSW/SWC template.
minVersion and maxVersion parameters correspond to the supplier version. In case
of AUTOSAR library, these parameters may be left empty because a SWC or BSW
module may rely on a library behaviour, not on a supplier implementation. However,
the SWC or BSW modules shall be compatible with the AUTOSAR platform where
they are integrated.
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
20 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
7.6 library implementation
[SWS_Efx_00806] ⌈The Efx library shall be implemented in a way that the code can
be shared among callers in different memory partitions. ⌋ (SRS_LIBS_00015)
[SWS_Efx_00807] ⌈Usage of macros should be avoided. The function should be
declared as function or inline function. Macro #define should not be used. ⌋
(SRS_LIBS_00017)
[SWS_Efx_00808] ⌈A library function shall not call any BSW modules functions, e.g.
the DET. A library function can call other library functions. Because a library function
shall be re-entrant. But other BSW modules functions may not be re-entrant. ⌋
(SRS_LIBS_00018)
[SWS_Efx_00809] ⌈The library, written in C programming language, should conform
to the MISRA C Standard.
Please refer to SWS_BSW_00115 for more details.
⌋ (SRS_BSW_00007)
[SWS_Efx_00810] ⌈Each AUTOSAR library Module implementation
*.c and
*.h shall map their code to memory sections using the AUTOSAR memory
mapping mechanism. ⌋ (SRS_BSW_00437)
[SWS_Efx_00812] ⌈All AUTOSAR library Modules should use the AUTOSAR data
types (integers, boolean) instead of native C data types, unless this library is clearly
identified to be compliant only with a platform. ⌋ (SRS_BSW_00304, SRS_BSW_00378)
[SWS_Efx_00813] ⌈All AUTOSAR library Modules should avoid direct use of
compiler and platform specific keyword, unless this library is clearly identified to be
compliant only with a platform. eg. #pragma, typeof etc. ⌋ (SRS_BSW_00306)
[SWS_Efx_00823] ⌈Integral promotion has to be adhered to when implementing Efx
services. Thus, to obtain maximal precision, intermediate results shall not be limited.
⌋()
Specification of Extended Fixed Point Routines
AUTOSAR CP Release 4.4.0
21 of 112 Document ID 400: AUTOSAR_SWS_EFXLibrary
- AUTOSAR confidential -
8 API specification
8.1 Imported types
In this chapter, all types included from the following modules are listed:
Header file Imported Type
Std_Types.h boolean, sint8, uint8, sint16, uint16, sint32, uint32
It is observed that since the sizes of the integer types provided by the C language are
implementation-defined, the range of values that may be represented within each of
the integer types will vary between implementations.
The following mnemonic are used in the library routine names.
Size Platform Type Mnemonic Range
unsigned 8-Bit boolean u8 [ TRUE, FALSE ]
signed 8-Bit sint8 s8 [ -128, 127 ]
signed 16-Bit sint16 s16 [ -32768, 32767 ]
signed 32-Bit sint32 s32 [ -2147483648, 2147483647 ]
signed 64-Bit sint64 s64 [-9223372036854775808,
9223372036854775807]
unsigned 8-Bit uint8 u8 [ 0, 255 ]
unsigned 16-Bit uint16 u16 [ 0, 65535 ]
unsigned 32-Bit uint32 u32 [ 0, 4294967295 ]
unsigned 64-Bit uint64 u64 [0, 18446744073709551615]
Table 1: Base Types
As a convention in the rest of the document:
mnemonics will be used in the name of the routines (using
that
means Type Mnemonic for Input 1)
the real type will be used in the description of the prototypes of the routines
(using
or
).
Note:
The naming convention for the api's with boolean return type/parameter type is given
as _u8 which shall be interpreted as _b. (Boolean)
If there is no boolean data type present in the return type/parameter type then _u8
shall be interpreted as _u8 only.
8.2 Type definitions
None
8.3 Comment about rounding
Two types of rounding can be applied:
Results are ‘rounded off’, it means:
0 <= X < 0.5 rounded to 0
0.5 <= X < 1 rounded to 1
-0.5 < X <= 0 rounded to 0
-1 < X <= -0.5 rounded to -1
Results are rounded towards zero.
0 <= X < 1 rounded to 0
-1 < X <= 0 rounded to 0
Specification of Extended Fixed Point Routin
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写math 1151, autumn 2024 w...
2024-11-14
代做comp4336/9336 mobile dat...
2024-11-14
代做eesa01 lab 2: weather an...
2024-11-14
代写comp1521 - 24t3 assignme...
2024-11-14
代写nbs8020 - dissertation s...
2024-11-14
代做fin b377f technical anal...
2024-11-14
代做ceic6714 mini design pro...
2024-11-14
代做introduction to computer...
2024-11-14
代做cs 353, fall 2024 introd...
2024-11-14
代做phy254 problem set #3 fa...
2024-11-14
代写n1569 financial risk man...
2024-11-14
代写csci-ua.0202 lab 3: enco...
2024-11-14
代写econ2226: chinese econom...
2024-11-14
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!