This is the multi-page printable view of this section. Click here to print.
Component Implementation
1 - WhlImbRejctn_IntegrationManual
Integration Manual
For
WhlImbRejctn
VERSION: 1.0
DATE: 11-Mar-2016
Prepared By:
Sankardu Varadapureddi,
Nexteer Automotive,
Saginaw, MI, USA
Location: The official version of this document is stored in the Nexteer Configuration Management System.
Revision History
Sl. No. | Description | Author | Version | Date |
1 | Initial version | Sankardu Varadapureddi | 1.0 | 11-Mar-2016 |
Table of Contents
3.2 Global Functions(Non RTE) to be provided to Integration Project 6
4 Configuration REQUIREMeNTS 7
4.2 Configuration Files to be provided by Integration Project 7
4.3 Da Vinci Parameter Configuration Changes 7
4.4 DaVinci Interrupt Configuration Changes 7
4.5 Manual Configuration Changes 7
5 Integration DATAFLOW REQUIREMENTS 8
5.1 Required Global Data Inputs 8
5.2 Required Global Data Outputs 8
5.3 Specific Include Path present 8
Abbrevations And Acronyms
Abbreviation | Description |
DFD | Design functional diagram |
MDD | Module design Document |
References
This section lists the title & version of all the documents that are referred for development of this document
Sr. No. | Title | Version |
1 | FDD : SF015A_ WhlImbRejctn_Design | See Synergy sub project version |
2 | Software Naming Conventions | 2.0 |
3 | Software Design and Coding Standards | 2.1 |
4 | Integration Manual Template | 1.3 |
Dependencies
SWCs
Module | Required Feature |
None |
Global Functions(Non RTE) to be provided to Integration Project
None
Configuration REQUIREMeNTS
Build Time Config
Modules | Notes | |
None |
Configuration Files to be provided by Integration Project
None
Da Vinci Parameter Configuration Changes
Parameter | Notes | SWC |
None |
DaVinci Interrupt Configuration Changes
ISR Name | VIM # | Priority Dependency | Notes |
None |
Manual Configuration Changes
Constant | Notes | SWC |
None |
Integration DATAFLOW REQUIREMENTS
Required Global Data Inputs
Refer DataDict.m file
Required Global Data Outputs
Refer DataDict.m file
Specific Include Path present
No
Runnable Scheduling
This section specifies the required runnable scheduling.
Init | Scheduling Requirements | Trigger |
WhlImbRejctnInit1 | None | RTE (Init) |
Runnable | Scheduling Requirements | Trigger |
WhlImbRejctnPer1 | None | RTE (2ms) |
WhlImbRejctnPer2 | None | RTE (4ms) |
Memory Map REQUIREMENTS
Mapping
Memory Section | Contents | Notes |
None | ||
* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.
Usage
Feature | RAM | ROM |
None |
Table 1: ARM Cortex R4 Memory Usage
NvM Blocks
Refer .m file
Compiler Settings
Preprocessor MACRO
None.
Optimization Settings
None.
Appendix
None
2 - WhlImbRejctn_MDD
Module Design Document
For
WhlImbRejctn
Version: 7
Oct 13, 2016
Prepared For:
Software Engineering
Nexteer Automotive,
Saginaw, MI, USA
Prepared By:
Matt Leser,
Nexteer Automotive,
Saginaw, MI, USA
Change History
Description | Author | Version | Date |
Initial Version | Sankardu Varadapureddi | 1 | 4-Mar-2016 |
Updated for FDD ver 1.2.0 | Sankardu Varadapureddi | 2 | 21-Mar-2016 |
Updated for FDD ver 1.6.0 | Matt Leser | 3 (Version 4 in Synergy) | 21-Sep-2016 |
Updated version number to match Synergy Database | Matt Leser | 6 | 28-Sep-2016 |
Updated for FDD ver 1.7.0 | Matt Leser | 7 | 13-Oct-2016 |
Table of Contents
2 WhlImbRejctn High-Level Description 6
3 Design details of software module 7
3.1 Graphical representation of WhlImbRejctn 7
4.1 Program (fixed) Constants 9
5 Software Component Implementation 10
5.1.1 Init: WhlImbRejctnInit1 10
5.1.2 Per: WhlImbRejctnPer1 10
5.1.2.2 Store Module Inputs to Local copies 10
5.1.2.3 (Processing of function)……… 10
5.1.2.4 Store Local copy of outputs into Module Outputs 10
5.1.3 Per: WhlImbRejctnPer2 10
5.1.3.2 Store Module Inputs to Local copies 10
5.1.3.3 (Processing of function)……… 10
5.1.3.4 Store Local copy of outputs into Module Outputs 10
5.4 Module Internal (Local) Functions 11
5.5 GLOBAL Function/Macro Definitions 15
6 Known Limitations with Design 16
Appendix A Abbreviations and Acronyms 18
Introduction
Purpose
Scope
WhlImbRejctn High-Level Description
Refer to FDD
Design details of software module
Graphical representation of WhlImbRejctn
Data Flow Diagram
Refer FDD
Component level DFD
Function level DFD
Constant Data Dictionary
Program (fixed) Constants
Embedded Constants
Constant Name | Resolution | Units | Value |
---|---|---|---|
MAXMGNMASK_CNT_U08 | 1 | Cnt | 1 |
QUALMASK_CNT_U08 | 1 | Cnt | 2 |
DCTRENDMASK_CNT_U08 | 1 | Cnt | 4 |
FREQDIAGCMASK_CNT_U08 | 1 | Cnt | 8 |
WHLSPDCORRLNMASK_CNT_U08 | 1 | Cnt | 16 |
MINSTOMILLISEC_ULS_F32 | 1 | Cnt | 60000 |
For other constants, refer .m file.
Local Constants
Software Component Implementation
Sub-Module Functions
Init: WhlImbRejctnInit1
Design Rationale
Refer FDD
Module Outputs
Refer FDD
Per: WhlImbRejctnPer1
Design Rationale
Refer FDD
Store Module Inputs to Local copies
Refer FDD
(Processing of function)………
Refer FDD
Store Local copy of outputs into Module Outputs
Refer FDD
Per: WhlImbRejctnPer2
Design Rationale
Refer FDD
Store Module Inputs to Local copies
Refer FDD
(Processing of function)………
Refer FDD
Store Local copy of outputs into Module Outputs
Refer FDD
Server Runables
None
Interrupt Functions
None
Module Internal (Local) Functions
Local Function #1
Function Name | UGRFilOutp | Type | Min | Max | |
Arguments Passed | Y_Hz_T_f32 | float32 | -8.8 | 376.991118 | |
FreqEst_Hz_T_f32 | float32 | 0.005 | 60 | ||
PoleMag_Uls_T_f32 | float32 | 0 | 1 | ||
* Ugr1_MotRadPerSec_T_f32 | float32 | 0 | 256 | ||
* Ugr2_MotRadPerSec_T_f32 | float32 | 0 | 256 | ||
Return Value | YFild_Hz_T_f32 | float32 | 0 | 127 |
Description
‘UGR’ filter implementation. ‘Ugr1_MotRadPerSec_T_f32’ and ‘Ugr2_MotRadPerSec_T_f32’ corresponds to PIMs used in internal calculations.
Local Function #2
Function Name | DtrmnEnadAmnt | Type | Min | Max | |
Arguments Passed | FreqEstAvg_Hz_T_f32 | float32 | 0.005 | 60 | |
WhlSpdLFilt_MotRadPerSec_T_f32 | float32 | -100 | 100 | ||
WhlSpdRFilt_MotRadPerSec_T_f32 | float32 | -100 | 100 | ||
VehSpd_Kph_T_f32 | float32 | 0 | 511 | ||
VehSpdVld_Cnt_T_logl | boolean | FALSE | TRUE | ||
WhlImbRejctnCustEna_Cnt_T_logl | boolean | FALSE | TRUE | ||
WhlImbRejctnDi_Cnt_T_logl | boolean | FALSE | TRUE | ||
SysSt_Cnt_T_enum | SysSt1 | SYSST_DI | SYSST_WRMININ | ||
*Enable_Uls_T_f32 | float32 | 0 | 1 | ||
Return Value | WhlImbRejctnActv_Cnt_T_logl | boolean | FALSE | TRUE |
Description
"Determine Enabled Amt" block implementation. In determination of ‘DistbnMagEnadPrev’, ‘ScaleL’ and ‘ScaleR’ values, some if-else loops were combined in software for optimization.
*Enable_Uls_T_f32 is an output of this function.
Local Function #3
Function Name | EnaRamp | Type | Min | Max | |
Arguments Passed | EnableFac_Uls_T_f32 | float32 | 0 | 1 | |
SysSt_Cnt_T_enum | SysSt1 | SYSST_DI | SYSST_WRMININ | ||
Return Value | RampEna_Uls_T_f32 | float32 | 0 | 1 |
Description
"Enable Ramp" block implementation.
Local Function #4
Function Name | DistMag | Type | Min | Max | |
Arguments Passed | WhlSpd_MotRadPerSec_T_f32 | float32 | -100 | 100 | |
Freq_Hz_T_f32 | float32 | 0.005 | 60 | ||
* PeakPrev_Uls_T_f32 | float32 | 0 | 127 | ||
* CurrMag_Uls_T_f32 | float32 | 0 | 127 | ||
*LpFilOut_Cnt_T_FilLpRec1 | FilLpRec1 | ||||
Return Value | DistMag_Uls_T_f32 | float32 | 0 | 127 |
Description
"DistMagL/DistMagR" block implementation. ‘PeakPrev_Uls_T_f32’ is a PIM used in the internal implementation.
‘LePeakPrev’ is output of this function.
Local Function #5
Function Name | ActvRejctnCmd | Type | Min | Max | |
Arguments Passed | HwTq_HwNwtMtr_T_f32 | float32 | -10 | 10 | |
Enable_Uls_T_f32 | float32 | 0 | 1 | ||
FreqEst_Hz_T_f32 | float32 | 0.005 | 60 | ||
* WhlImbRejctnAmp_MtrNm_T_f32 | float32 | 0 | 8.8 | ||
Return Value | WhlImbRejctnCmd_MotNwtMtr_T_f32 | float32 | -8.8 | 8.8 |
Description
"Active Rejection Command " block implementation. “WhlImbRejctnAmp_MtrNm_T_f32” is the output of this function.
PIMs ‘StordValLe’ and ‘StordValRi’ directly used in the software for signals ‘FiltWhlSpdLScld’ and ‘FiltWhlSpdRScld’ in the FDD.
Local Function #6
Function Name | AdjSigFil | Type | Min | Max | |
Arguments Passed | In1_MotNwtMtr_T_f32 | float32 | -127 | 127 | |
Zm_Uls_T_f32 | float32 | 0.244742 | 1.0 | ||
Pk_Uls_T_f32 | float32 | 0.244742 | 1.0 | ||
B0_Uls_T_f32 | float32 | 0.249683 | 4.005074 | ||
MagAtFreq_Uls_T_f32 | float32 | 0.414213562 | 2.414213562 | ||
* Coeff1_Uls_T_f32 | float32 | 0 | 127 | ||
* Coeff1_Uls_T_f32 | float32 | 0 | 127 | ||
Return Value | Out_MotNwtMtr_T_f32 | float32 | -127 | 127 |
Description
"Filter1 / Filter2 " block implementation.
Local Function #7
Function Name | SetNTCBlk | Type | Min | Max | |
Arguments Passed | |||||
Return Value | None |
Description
'Set NTC Block' implementation.
Local Function #8
Function Name | MaxMagDiag | Type | Min | Max | |
Arguments Passed | CmdAmp_MotNwtMtr_T_f32 | float32 | -8.8 | 8.8 | |
Return Value | FltStat_Cnt_T_lgc | boolean | FALSE | TRUE |
Description
"MaxMagDiag" block implementation.
Local Function #9
Function Name | DcTrendDiag | Type | Min | Max | |
Arguments Passed | WIRCmd_MtrNwtMtr_T_f32 | float32 | -8.8 | 8.8 | |
Return Value | FltStat_Cnt_T_lgc | boolean | FALSE | TRUE |
Description
" DcTrendDiag" block implementation.
Local Function #10
Function Name | FrequencyDiag | Type | Min | Max | |
Arguments Passed | WIRCmd_MtrNwtMtr_T_f32 | float32 | -8.8 | 8.8 | |
FreqEst_Hz_T_f32 | float32 | 0.005 | 60 | ||
Enable_Uls_T_f32 | float32 | 0 | 1 | ||
CmdAmp_MotNwtMtr_T_f32 | float32 | -8.8 | 8.8 | ||
Return Value | FltStat_Cnt_T_lgc | boolean | FALSE | TRUE |
Description
' FrequencyDiag ' block implementation.
Local Function #11
Function Name | WhlSpdCorrDiag | Type | Min | Max | |
Arguments Passed | WhlRiFrq_Hz_T_f32 | float32 | 0.01 | 60 | |
WhlLeFrq_Hz_T_f32 | float32 | 0.01 | 60 | ||
Return Value | FltStat_Cnt_T_lgc | boolean | FALSE | TRUE |
Description
" WhlSpdCorrDiag" block implementation.
Local Function #12
Function Name | ElpdTi | Type | Min | Max | |
Arguments Passed | FltStsTrue_Cnt_T_lgc | boolean | FALSE | TRUE | |
PrevFltStsTrue_Cnt_T_lgc | boolean | FALSE | TRUE | ||
RefTi_Sec_T_u32 | uint32 | Full range | Full range | ||
Return Value | ElpdTi_MilliSec_T_f32 | float32 | Full range | Full range |
Description
"Elapsed Timer" block implementation.
FltStsTrue_Cnt_T_lgc - Fault condition current status
PrevFltStsTrue_Cnt_T_lgc - Fault condition previous status (PIM)
RefTi_Sec_T_u32 - Reference Timer (PIM)
Local Function #13
Function Name | FltRcvry | Type | Min | Max | |
Arguments Passed | ElpdTi_Sec_T_f32 | float32 | Full range | Full range | |
FltRecDly_Mins_T_f32 | float32 | 0 | 255 | ||
* FltRec_Uls_T_str | PassFailCntrDiagcRec1 | Structure members –full range | Structure members –full range | ||
Return Value | None |
Description
"Flt Recovery" block implementation. Elapsed time is passed as argument
Local Function #14
Function Name | ChkCompPersc | Type | Min | Max | |
Arguments Passed | ActiveBand1Inp_Cnt_T_u32 | uint32 | 0 | 4.294967294e+09 | |
ActiveBand2Inp_Cnt_T_u32 | uint32 | 0 | 4.294967294e+09 | ||
ActiveBand3Inp_Cnt_T_u32 | uint32 | 0 | 4.294967294e+09 | ||
Return Value | Flt_Cnt_T_lgc | boolean | FALSE | TRUE |
Description
“CheckCompPersistence” block implementation.
GLOBAL Function/Macro Definitions
None
Known Limitations with Design
1. The Inter runnable variable 'IniCmpFlt' is written in Init1 and read in Per1. The DD dictionary has a discrepancy where it mentions written in Per2 and read in Per1. The implementation/code has already been updated to the current read write combination. The design needs to be updated for the same. Refer to CR EA4#7979.
2. Constant DURATIONDISABLE_CNT_U16 value needs to be changed to a value less than max of the data type. Implementation is using 18500 to match the EA3 component based on agreement with FDD Owner. Refer to CR EA4#7979
3. The Inter runnable Variable ‘MaxMgnFlt’ is written in Per2 and Read in Per1. The DataDict.m has a discrepancy where it mentions written in Init1 and read in Per1. The implementation/code has already been updated to the current read write combination. The design needs to be updated for the same. Refer to CR EA4#7979.
UNIT TEST CONSIDERATION
None
Abbreviations and Acronyms
Abbreviation or Acronym | Description |
---|---|
Glossary
Note: Terms and definitions from the source “Nexteer Automotive” take precedence over all other definitions of the same term. Terms and definitions from the source “Nexteer Automotive” are formulated from multiple sources, including the following:
ISO 9000
ISO/IEC 12207
ISO/IEC 15504
Automotive SPICE® Process Reference Model (PRM)
Automotive SPICE® Process Assessment Model (PAM)
ISO/IEC 15288
ISO 26262
IEEE Standards
SWEBOK
PMBOK
Existing Nexteer Automotive documentation
Term | Definition | Source |
---|---|---|
MDD | Module Design Document | |
DFD | Data Flow Diagram |
References
Ref. # | Title | Version |
---|---|---|
1 | AUTOSAR Specification of Memory Mapping (Link:AUTOSAR_SWS_MemoryMapping.pdf) | v1.3.0 R4.0 Rev 2 |
2 | MDD Guideline | EA4 01.00.01 |
3 | Software Naming Conventions.doc | 2.0 |
4 | Software Design and Coding Standards.doc | 2.1 |
5 | FDD : SF015A_WhlImbRejctn_Design | See Synergy sub project version |
3 - WhlImbRejctn_Review
Overview
Summary SheetSynergy Project
Source Code
PolySpace
Sheet 1: Summary Sheet

Sheet 2: Synergy Project
Sheet 3: Source Code
Rev 1.2 | 8-Jun-15 | |||||||||||||||||||||||
Peer Review Meeting Log (Source Code Review) | ||||||||||||||||||||||||
Source File Name: | WhlImbRejctn.C | Source File Revision: | 10 | |||||||||||||||||||||
Header File Name: | N/A | Header File Revision: | ||||||||||||||||||||||
MDD Name: | WhlImbRejctn_MDD.docx | Revision: | 7 | |||||||||||||||||||||
FDD/SCIR/DSR/FDR/CM Name: | SF015A_WhlImbRejctn_Design | Revision: | 1.7.0 | |||||||||||||||||||||
Quality Check Items: | ||||||||||||||||||||||||
Rationale is required for all answers of No | ||||||||||||||||||||||||
Working EA4 Software Naming Convention followed: | ||||||||||||||||||||||||
for variable names | Yes | Comments: | ||||||||||||||||||||||
for constant names | N/A | Comments: | ||||||||||||||||||||||
for function names | N/A | Comments: | ||||||||||||||||||||||
for other names (component, memory | N/A | Comments: | ||||||||||||||||||||||
mapping handles, typedefs, etc.) | ||||||||||||||||||||||||
All paths assign a value to outputs, ensuring | N/A | Comments: | ||||||||||||||||||||||
all outputs are initialized prior to being written | ||||||||||||||||||||||||
Requirements Tracability tags in code match the requirements tracability in the FDD | N/A | Comments: | ||||||||||||||||||||||
requirements tracability in the FDD | ||||||||||||||||||||||||
All variables are declared at the function level. | Yes | Comments: | ||||||||||||||||||||||
Synergy version matches change history | Yes | Comments: | ||||||||||||||||||||||
and Version Control version in file comment block | ||||||||||||||||||||||||
Change log contains detailed description of changes | Yes | Comments: | ||||||||||||||||||||||
and Work CR number | ||||||||||||||||||||||||
Code accurately implements FDD (Document or Model) | Yes | Comments: | ||||||||||||||||||||||
Verified no Compiler Errors or Warnings | Yes | Comments: | ||||||||||||||||||||||
Component.h is included | N/A | Comments: | ||||||||||||||||||||||
All other includes are actually needed. (System includes | N/A | Comments: | ||||||||||||||||||||||
only allowed in Nexteer library components) | ||||||||||||||||||||||||
Software Design and Coding Standards followed: | Version: | |||||||||||||||||||||||
Code comments are clear, correct, and adequate | Yes | Comments: | ||||||||||||||||||||||
and have been updated for the change: [N40] and | ||||||||||||||||||||||||
all other rules in the same section as rule [N40], | ||||||||||||||||||||||||
plus [N75], [N12], [N23], [N33], [N37], [N38], | ||||||||||||||||||||||||
[N48], [N54], [N77], [N79], [N72] | ||||||||||||||||||||||||
Source file (.c and .h) comment blocks are per | Yes | Comments: | ||||||||||||||||||||||
standards and contain correct information: [N41], [N42] | ||||||||||||||||||||||||
Function comment blocks are per standards and | Yes | Comments: | ||||||||||||||||||||||
contain correct information: [N43] | ||||||||||||||||||||||||
Code formatting (indentation, placement of | Yes | Comments: | ||||||||||||||||||||||
braces, etc.) is per standards: [N5], [N55], [N56], | ||||||||||||||||||||||||
[N57], [N58], [N59] | ||||||||||||||||||||||||
Embedded constants used per standards; no | N/A | Comments: | ||||||||||||||||||||||
"magic numbers": [N12] | ||||||||||||||||||||||||
Memory mapping for non-RTE code | N/A | Comments: | ||||||||||||||||||||||
is per standard | ||||||||||||||||||||||||
All execution-order-dependent code can be | Yes | Comments: | ||||||||||||||||||||||
recognized by the compiler: [N80] | ||||||||||||||||||||||||
All loops have termination conditions that ensure | N/A | Comments: | ||||||||||||||||||||||
finite loop iterations: [N63] | ||||||||||||||||||||||||
All divides protect against divide by zero | N/A | Comments: | ||||||||||||||||||||||
if needed: [N65] | ||||||||||||||||||||||||
All integer division and modulus operations | N/A | Comments: | ||||||||||||||||||||||
handle negative numbers correctly: [N76] | ||||||||||||||||||||||||
All typecasting and fixed point arithmetic, | N/A | Comments: | ||||||||||||||||||||||
including all use of fixed point macros and | ||||||||||||||||||||||||
timer functions, is correct and has no possibility | ||||||||||||||||||||||||
of unintended overflow or underflow: [N66] | ||||||||||||||||||||||||
All float-to-unsiged conversions ensure the. | N/A | Comments: | ||||||||||||||||||||||
float value is non-negative: [N67] | ||||||||||||||||||||||||
All conversions between signed and unsigned | N/A | Comments: | ||||||||||||||||||||||
types handle msb==1 as intended: [N78] | ||||||||||||||||||||||||
All pointer dereferencing protects against | N/A | Comments: | ||||||||||||||||||||||
null pointer if needed: [N70] | ||||||||||||||||||||||||
Component outputs are limited to the legal range | N/A | Comments: | ||||||||||||||||||||||
defined in the FDD DataDict.m file : [N53] | ||||||||||||||||||||||||
All code is mapped with FDD (all FDD | Yes | Comments: | ||||||||||||||||||||||
subfunctions and/or model blocks identified | ||||||||||||||||||||||||
with code comments; all code corresponds to | ||||||||||||||||||||||||
some FDD subfunction and/or model block): [N40] | ||||||||||||||||||||||||
Review did not identify violations of other | Yes | Comments: | ||||||||||||||||||||||
coding standard rules | ||||||||||||||||||||||||
Anomaly or Design Work CR created | Yes | Comments: List Anomaly or CR numbers | ||||||||||||||||||||||
for any FDD corrections needed | ||||||||||||||||||||||||
General Notes / Comments: | ||||||||||||||||||||||||
Change Owner: | Kathleen Creager | Review Date : | 10/14/16 | |||||||||||||||||||||
Lead Peer Reviewer: | Jared Julien | Approved by Reviewer(s): | Yes | |||||||||||||||||||||
Other Reviewer(s): | ||||||||||||||||||||||||