Assist_Firewall_MDD

Module --

High-Level Description

This module limits the output from the Assist module according to safety requirements.

Figures

Component Diagram


Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

Module InputsModule Outputs
BaseAssistCmd_MtrNm_f32AsstFirewallActive_Uls_f32
HighFreqAssist_MtrNm_f32CombinedAssist_MtrNm_f32
HwTorque_HwNm_f32
HysteresisComp_MtrNm_f32
VehicleSpeed_Kph_f32
Defeat_AsstTbl_Service_Cnt_lgc
MEC_Counter_Cnt_enum

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
UprBoundKSV_M_strASSISTFIREWALL_START_SEC_VAR_CLEARED_UNSPECIFIED
LwrBoundKSV_M_strASSISTFIREWALL_START_SEC_VAR_CLEARED_UNSPECIFIED
HiFreqKSV_M_strASSISTFIREWALL_START_SEC_VAR_CLEARED_UNSPECIFIED
ActiveKSV_M_strASSISTFIREWALL_START_SEC_VAR_CLEARED_UNSPECIFIED
ActiveRawAcc_Cnt_M_u161FULLFULLASSISTFIREWALL_START_SEC_VAR_CLEARED_16
PNCountStatus_Cnt_M_lgcn/aFALSETRUEASSISTFIREWALL_START_SEC_VAR_CLEARED_ BOOLEAN
AsstFWUprBound_MtrNm_D_f32Single Precision Floating Point-8.88.8ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
AsstFWLwrBound_MtrNm_D_f32Single Precision Floating Point-8.88.8ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
AsstFWSumInput_MtrNm_D_f32Single Precision Floating Point-26.426.4ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
AsstFWLowFreqInput_MtrNm_D_f32Single Precision Floating Point-26.426.4ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
AsstFWLowFreqLimited_MtrNm_D_f32Single Precision Floating Point-8.88.8ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
AsstFWActiveRaw_Uls_D_f32Single Precision Floating Point01ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
AsstFWUprBoundFilt_MtrNm_D_f32Single Precision Floating Point-8.88.8ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
AsstFWLwrBoundFilt_MtrNm_D_f32Single Precision Floating Point-8.88.8ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
CombAsstSV_MtrNm_M_f32Single Precision Floating Point-8.88.8ASSISTFIREWALL_START_SEC_VAR_CLEARED_32
AsstFWOverBound_Cnt_D_lgcn/aFALSETRUEASSISTFIREWALL_START_SEC_VAR_CLEARED_BOOLEAN
AsstReducedPerfSV_Cnt_M_lgcn/aFALSETRUEASSISTFIREWALL_START_SEC_VAR_CLEARED_ BOOLEAN

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

None

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
k_AsstFWInpLimitHysComp_MtrNm_f32
k_AsstFWInpLimitHFA_MtrNm_f32
k_AsstFWInpLimitBaseAsst_MtrNm_f32
k_AsstFWFiltKn_Hz_f32
k_AsstFWFWActiveLPF_Hz_f32
t_AsstFWVehSpd_Kph_u9p7[12]
t2_AsstFWUprBoundX_HwNm_s4p11[12][11]
t2_AsstFWUprBoundY_MtrNm_s4p11[12][11]
k_AsstFWPstep_Cnt_u16
k_AsstFWNstep_Cnt_u16
t_AsstFWPstepNstepThresh_Cnt_u16[2]
t_AsstFWDefltAssistX_HwNm_u8p8[20]
t_AsstFWDefltAssistY_MtrNm_s4p11[20]
k_RestoreThresh_MtrNm_f32

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
None

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
D_ONE_ULS_F32
D_ZERO_ULS_F32
D_2MS_SEC_F32
BC_ASSISTFIREWALL_FAULTINJECTIONPOINT
STD_ON
FLTINJ_ASSTFIREWALL
D_MTRTRQCMDLOLMT_MTRNM_F32
D_MTRTRQCMDHILMT_MTRNM_F32
D_NEGONE_CNT_S16
D_FALSE_CNT_LGC

Module specific Lookup Tables Constants

Constant NameResolutionValueSoftware Segment
None


Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library and functions / Macros that are called by the various sub modules are identified below,

  1. LPF_KUpdate_f32_m

  2. LPF_OpUpdate_f32_m

  3. HPF_KUpdate_f32_m

  4. HPF_OpUpdate_f32_m

  5. BilinearXMYM_s16_s16XMs16YM_Cnt

  6. TableSize_m

  7. FPM_FloatToFixed_m

  8. FPM_FixedToFloat_m

  9. DiagPStep_m

  10. DiagNStep_m

  11. Rte_Call_NxtrDiagMgr_SetNTCStatus

Data Hiding Functions

  1. None

Global Functions/Macros Defined by this Module

None

Local Functions/Macros Used by this MDD only

None

Software Module Implementation

Runtime Environment (RTE) Initial Values

This section lists the initial values of data written by this module but controlled by the RTE. After RTE initialization, the data in this table will contain these values.

DataValue
Rte_InitValue_AsstFirewallActive_Uls_f320
Rte_InitValue_BaseAssistCmd_MtrNm_f320
Rte_InitValue_CombinedAssist_MtrNm_f320
Rte_InitValue_HighFreqAssist_MtrNm_f320
Rte_InitValue_HwTorque_HwNm_f320
Rte_InitValue_HysteresisComp_MtrNm_f320
Rte_InitValue_VehicleSpeed_Kph_f320

Initialization Functions

Init: _Init1

Design Rationale

An initialization function is required to initialize K for each of the filters.

Module Outputs

None

Module Internal

None

Initialize Filters


Periodic Functions

Per: _Per1

Design Rationale

None

Program Flow Start

Rte_Call_AssistFirewall_Per1_CP0_CheckpointReached()Store Module Inputs to Local copies

BaseAssistCmd_MtrNm_T_f32 = Rte_IRead_AssistFirewall_Per1_BaseAssistCmd_MtrNm_f32()

HighFreqAssist_MtrNm_T_f32 = Rte_IRead_AssistFirewall_Per1_HighFreqAssist_MtrNm_f32()

HwTorque_HwNm_T_f32 = Rte_IRead_AssistFirewall_Per1_HwTorque_HwNm_f32()

HysteresisComp_MtrNm_T_f32 = Rte_IRead_AssistFirewall_Per1_HysteresisComp_MtrNm_f32()

VehicleSpeed_Kph_T_f32 = Rte_IRead_AssistFirewall_Per1_VehicleSpeed_Kph_f32()

AsstFWPstepNstep_Cnt_T_str.PStep = k_AsstFWPstep_Cnt_u16

AsstFWPstepNstep_Cnt_T_str.NStep = k_AsstFWNstep_Cnt_u16

AsstFWPstepNstep_Cnt_T_str.Threshold = t_AsstFWPstepNstepThresh_Cnt_u16[1]

AbsHwTrq_HwNm_T_u8p8 = FPM_FloatToFixed_m(Abs_f32_m(HwTorque_HwNm_T_f32), u8p8_T)

DefeatAsstTblSvc_Cnt_T_lgc = Rte_IRead_AssistFirewall_Per1_Defeat_AsstTbl_Service_Cnt_lgc()

MECCounter_Cnt_T_enum = Rte_IRead_AssistFirewall_Per1_MEC_Counter_Cnt_enum()

Sum and Filter Inputs

Determine Saturation Bounds and Perform Limiting

Determine Active State and Output

Store Local copy of outputs into Module Outputs

AsstFWUprBound_MtrNm_D_f32 = UprBound_MtrNm_T_f32

AsstFWLwrBound_MtrNm_D_f32 = LwrBound_MtrNm_T_f32

AsstFWUprBoundFilt_MtrNm_D_f32 = UprBoundFilt_MtrNm_T_f32

AsstFWLwrBoundFilt_MtrNm_D_f32 = LwrBoundFilt_MtrNm_T_f32

AsstFWSumInput_MtrNm_D_f32 = SumInput_MtrNm_T_f32

AsstFWLowFreqInput_MtrNm_D_f32 = LowFreqInput_MtrNm_T_f32

AsstFWLowFreqLimited_MtrNm_D_f32 = LowFreqLimited_MtrNm_T_f32

AsstFWActiveRaw_Uls_D_f32 = AsstFWActiveRaw_Uls_T_f32

Rte_IWrite_AssistFirewall_Per1_CombinedAssist_MtrNm_f32(CombAsstSV_MtrNm_M_f32)

Rte_IWrite_AssistFirewall_Per1_AsstFirewallActive_Uls_f32(AsstFWActive_Uls_T_f32)

Program Flow End

Rte_Call_AssistFirewall_Per1_CP1_CheckpointReached()


Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions


Execution Requirements

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called
AssistFirewall_Init1On EventOn Init
AssistFirewall_Per12 msALL

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
<None>


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
AssistFirewall_Init1RTE_START_SEC_AP_ASSISTFIREWALL_APPL_CODE
AssistFirewall_Per1RTE_START_SEC_AP_ASSISTFIREWALL_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment


Known Issues / Limitations With Design

  1. INLINE functions in GlobalMacro.h are not unit tested.


Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Initial Version24-Apr-12OT
22.0Fixed conflicting calibration names10-May-12OT
33.0Added fault injection point18-May-12OT
44.0Updated to SF-34 v002, fixed conflicting display variable names31-May-12OT
55.0Updated to SF-34 v00308-Jun-12OT
66.0Fixed threshold assignment anomaly11-Jun-12OT
77.0Updated to SF-34 v00420-Jun-12OT
88.0Updated to SF-34 Ver 005 and Ver 0061-Aug-12NRAR
99.0Inserted safe watchdog checkpoints15-Sept-12BWL
1010.0Corrected Unspecified variable name to “Boolean”18 –Sep-12SSK
1111.0Updates to meet SF-34 v00701-Feb-13VK
1212.0MDD/ Src mismatch updates22-Feb-13VK
1313.0Updates to meet SF-34 v00815-May-13SP
Last modified October 12, 2025: Initial commit (0347a62)