This is the multi-page printable view of this section. Click here to print.
Metrics
1 - Data Dictionary
Overview
Change LogVariable Dictionary
Calibration Dictionary
Global Constants
Template
Help
Sheet 1: Change Log
Metrics - Rev 2 | <- Global Program / Module Name | ||||||
Revision | Author | Date | Change Description | Data Dictionary Type: | Component | ||
1 | JJW | 1-Feb-12 | Initial version | ||||
2 | BWL | 1-Jul-12 | Modified variables changed with PMU integration, and filled out existing information. | ||||
Sheet 2: Variable Dictionary
Sheet 3: Calibration Dictionary
Sheet 4: Global Constants
Metrics - Rev 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Variable Information (Global Variables Only) | Achieved in Software Design | Used in Module List | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Layer 2 | Layer 3 | Layer 4 | Layer 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Constant Name | Description | Uints | Type | Engineering Value | ADC | ADC Diagnostics | Data Memory Verification | DC Link Power Control | DSP Computational Integrity | DSP SPI driver | Event Manager Driver | External Memory Driver | Flash Programming Exec | GPIO | Illegal OpCode Handler | Interrupt Handler | Motor Current Driver | Motor Driver Diagnostics | Motor Position Driver | Phase Feedback Capture | Powerdown Control | Primary Shutdown Control | Program Flow | Program Memory Diagnostic | PWM Duty Cycle | Redundant Memory Check | Redundant Rapid Shutdown | Scheduler | Stack Monitor | State Dependent Task List | System Boot & Startup | System Control | Temperature Sensor Diagnostic | Unused Interrupt Handler | Utilization Monitor | Watchdog Dirver | Smith | Battery Voltage | Battery Voltage Diagnostics | Diagnostic CTC Manager | Diagnostic Manager | Diagnostics Application Services | EOL TorqueTest | Flash Boot Loader | Flight Recorder | Handwheel Position | Handwheel Torque | Motor Control Output Conversion | Motor Position Diagnostics | Motor Position Initialization | Motor Velocity | Motor Velocity Tachometer | Serial Communications I/O | Serial Communications Services | States and Modes | Tuning Select | Vehicle Power Mode | Vehicle Speed | Controller Polarity | Current Estimation | Handwheel Velocity | Inverse Motor Model | Motor Temperature Estimation | Motor Torque Limit | Output Reasonableness Dianostic | Parameter Estimation | Quadrant and rate Detection | Active Pull Compensation | Assist | Damping | Duty Cycle | Kinematic Integrity Diagnostic | Long Term Vehicle Speed Diagnostic | Max Assist Limit | Return | State Output Control | Torque Output |
Sheet 5: Template
2.2a | Data File: | |||||
Header: | extern <TYPE><TAB><NAME>; | |||||
Source: | #pragma DATA_SECTION(<ROOTNAME>, "<SEGMENT>"); <TYPE> <NAME>; | |||||
EOL Constants: | ||||||
Header: | extern <TYPE><TAB><NAME>; | |||||
Source: | #pragma DATA_SECTION(<ROOTNAME>, "<SEGMENT>"); <TYPE> <NAME>; | |||||
Global (Embedded) Constants: | ||||||
Header: | #define <NAME><COL40><VALUE> | |||||
A2L Name | ||||||
Measurement: | rte_<SWC>_<NAME> | |||||
Calibration Constants: | ||||||
Tuning ID: | ||||||
Tuning: | N | Index Range: | ||||
Header: | extern CONST(<AUTOSAR_TYPE>, CAL_CONST) <NAME>; | |||||
Source: | #pragma DATA_SECTION(<ROOTNAME>, ".<SEGMENT>"); CONST(<AUTOSAR_TYPE>, CAL_CONST) <NAME> = <VALUE>; | |||||
eCal: | <NAME> | |||||
Tuning: | Y | Index Range: | ||||
Header: | <NONCRITICAL> #define <ROOTNAME><TAB>k_N_CalNC_Cnt_Str.<ROOTNAME> <NONCRITICAL> <SAFETYCRITICAL> #define <ROOTNAME><TAB>k_S_CalSC_Cnt_Str.<ROOTNAME> <SAFETYCRITICAL> | |||||
Source: | ||||||
eCal: | <NONCRITICAL> k_N_CalNC_Cnt_Str.<ROOTNAME> <NONCRITICAL> <SAFETYCRITICAL> k_S_CalSC_Cnt_Str.<ROOTNAME> <SAFETYCRITICAL> | |||||
Tuning: | P | Index Range: | ||||
Header: | <NONCRITICAL> #define <ROOTNAME><TAB>k_N_CalNC_Cnt_Str.Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME> <NONCRITICAL> <SAFETYCRITICAL> #define <ROOTNAME><TAB>k_S_CalSC_Cnt_Str.SC_Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME> <SAFETYCRITICAL> | |||||
Source: | ||||||
eCal: | <NONCRITICAL> k_N_CalNC_Cnt_Str.Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME> <NONCRITICAL> <SAFETYCRITICAL> k_S_CalSC_Cnt_Str.SC_Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME> <SAFETYCRITICAL> | |||||
Sheet 6: Help
Short cut | Macro | Sescription |
Ctrl-q | ClearDataDictFilter | Will clear all autofilters on the Global Data Dictionary |
DFD_Create | Creates a Series of Data Flow Worksheet Pages from the information in the data dictionary. If Data Flow Worksheet pages already exist, they will be deleted first. | |
DFD_Delete | Will clear all Data Flow Diagram pages from the Data Dictionary. This will make the file smaller for archiving. | |
DFD_Print | Formate and prepares to print the Data Flow Worksheet pages. |
2 - Metrics_Integration_Manual
Contents
Dependencies
Module | Required Feature |
---|---|
Rte | Rte_Task_Dispatch() hooks VFB Trace hooks |
Dio | Dio_WriteChannel() |
Port | Port_SetPinDirection() |
NxtrLib | DtrmnElapsedTime_uS_u32() GetSystemTime_uS_u32() |
Os | osdNumberOfAllTasks constant value osGetStackUsage oskTcbStackTop oskTcbStackBottom |
Configuration
Build Time Config
Constant | Notes | SWC |
---|---|---|
BC_METRICS_TASKCPUUSEMASK | STD_ON enables build of the task use masking functionality to excluded a user defined set of task CPU use times from the CPU use calculation. | |
BC_METRICS_STACKUSE | STD_ON enables build of the Stack Use monitoring | Metrics |
BC_METRICS_CPUUSEDIO | STD_ON enables build of the CPU Use digital output based monitoring | Metrics |
BC_METRICS_CPUUSETMR | STD_ON enables build of the CPU Use timer based monitoring | Metrics |
ENABLE_CPUUSE_DIO | If defined then CPU usage is output via a DIO where the DIO is high while the CPU is not in the background task. | Metrics |
RTE_VFB_TRACE=1 | Enable Rte’s VFB trace functionality to support Rte_Task_Dispatch() hooks | Rte |
Rte_Task_Dispatch | Enable Rte’s Rte_Task_Dispatch() hooks | Rte |
Generator Config
Constant | Notes | SWC |
---|---|---|
Dio Channel Name: “Metrics” | Required when ENABLE_CPUUSE_DIO is defined | Dio |
RTE VFB Trace Hooks |
Caveats:
| |
MPU Global Read Access | GetSystemTime and Dio_WriteChannel Metrics Channel accessed registers must be readable across all application and ISR contexts. | Os |
MPU Global Read/Write Access | Metrics data structures must be R/W across all application and ISR contexts. ATTENTION! The metrics data structures are very large, so ensure that adequate memory is allocated to the Global Shared region | OS |
Integration Project Changes
Modify the required BSW Irq source functions to place the Metrics_TaskStart and Metrics_TaskEnd hooks around the ISR’s. The recommended practice is to make a copy of the delivered source file renamed to *_NxtrMetrics.c and conditionaly build the altered file in place of the delivered file for Metrics builds.
Modify SchM.c to place the Metrics_TaskStart hook and Metrics_TaskEnd calls appropriately at around the tasks. Note that it might be necessary to place the hooks at a point in the task that will be overwritten when the SchM.c is generated. Diligence will need to used after generation to ensure that the hooks are not inadvertently removed.
Modify ApplCallbacks.c to place Metrics_TaskStart and Metrics_TaskEnd calls appropriately around tasks. Dilligence will be required to ensure the hooks are not removed.
Memory Mapping
Mapping
Constant | Notes |
---|---|
METRICS_START_SEC_VAR_CLEARED_UNSPECIFIED | Writable across all applications |
* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.
Usage
Feature | RAM | ROM |
---|---|---|
Software task time stamping of task execution | ||
Stack usage monitoring |
Item # | Rev # | Change Description | Date | Author Initials |
---|---|---|---|---|
1 |
3 - Metrics_MDD
Module --
(Above name of the module is a “Field” that can be updated. It should be set by going to File Properties – Custom and then modifying the Document name, this name will be the same one used for the filename also, refer design guidelines document, Once name modified, do a select all – and update entire document, so that this field will be updated everywhere it is used in the template, Remove this comment in the actual document)
High-Level Description
(Description must be within 8-10 lines.)
Figures
Diagram – Function Data Sharing
This diagram shows all data that is shared between functions within the module.
(Note – If no data is shared between functions, the Text “No Shared Data” can be used in place of a graphic. Also note that init functions need not be shown unless they compute non-zero data to be used by other functions in the module).
Diagram – Function (Name)
This diagram describes the functional characteristics and data flow of a given function.
(Note – This is not mandatory, only used where a graphical representation helps explain the function. It is left to the author’s discretion. New headers of this level (Level 3) should be created for each function.
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.
(Note: Full variable names required in table.)
(Note: All global variables including End Of Line data used should be shown here)
Module Inputs | Module Outputs | |
---|---|---|
<VarName_Units_Type> | <VarName_Units_Type> | |
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 Name | Resolution | Legal Range (min) | Legal Range (max) | Software Segment |
---|---|---|---|---|
<None> | ||||
User defined typedef definition/declaration
This section documents any user types uniquely used for the module.
Typedef Name | Element Name | User Defined Type | Legal Range (min) | Legal Range (max) |
---|---|---|---|---|
(Name given for the user defined typdef of type struct/union) (Variable name qualified similar to all other variables) | (Variable name qualified similar to all other variables) | as other variables | ||
(Variable name qualified similar to all other variables) |
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 |
---|
<None> |
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 Name | Resolution | Units | Value |
---|---|---|---|
<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 |
---|
<None> |
Module specific Lookup Tables Constants
(This is for lookup tables (arrays) with fixed values, same name as other tables)
Constant Name | Resolution | Value | Software 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,
<None>
Data Hiding Functions
<None>
Global Functions/Macros Defined by this Module
Global Function #1
Function Name | (Exact name used) | Type | Min | Max | UTP Tol. |
---|---|---|---|---|---|
Arguments Passed | (if none, write None) | ||||
(Insert more rows for additional passed arguments) | |||||
Return Value | (if no value returned, write N/A) |
Description
(Place flowchart/design for local function)
Local Functions/Macros Used by this MDD only
Local Function #1
Function Name | (Exact name used) | Type | Min | Max | UTP Tol. |
---|---|---|---|---|---|
Arguments Passed | (if none, write None) | ||||
(Insert more rows for additional passed arguments) | |||||
Return Value | (if no value returned, write N/A) |
Description
(Place flowchart/design for local function)
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.
Data | Value |
---|---|
<None> |
Initialization Functions
(Note: For multiple init functions, insert new headers at the “Header 2” level – subset of “5.1 Initialization Functions” and follow the same sub-section design shown below)
Init: _L_Init(n)
Design Rationale
(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)
Module Outputs
(Initialize all module outputs in this section)
Module Internal
(Initialize all module internal variables in this section)
Periodic Functions
(Note: For multiple periodic functions, insert new headers at the “Header 2” level – subset of “5.2 Periodic Functions” and follow the same sub-section design shown below)
Per: _L_Per(n)
Design Rationale
(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)
Program Flow Start
(If program flow is required by the module, the function to store the unique identifier to a temporary variable is done here – start of the function)
Store Module Inputs to Local copies
(If not required based on design, insert text “None”)
(Processing of function)………
(Breakdown the function into smaller sections to add clarity to the design).
Store Local copy of outputs into Module Outputs
(If not required based on design, insert text “None”)
Program Flow End
(If program flow is required by the module, the function to add the temporary variable to the global accumulator is done here)
Fault Recovery Functions
(Note: For multiple functions, insert new headers at the “Header 2” level – subset of “5.3 Fault Recovery Functions” and follow the same sub-section design shown below)
FaultRec: _L_FaultRec(n)
Design Rationale
(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)
Program Flow Start
(If program flow is required by the module, the function to store the unique identifier to a temporary variable is done here – start of the function)
Store Module Inputs to Local copies
(If not required based on design, insert text “None”)
(Processing of function)………
(Breakdown the function into smaller sections to add clarity to the design).
Store Local copy of outputs into Module Outputs
(If not required based on design, insert text “None”)
Program Flow End
(If program flow is required by the module, the function to add the temporary variable to the global accumulator is done here)
Shutdown Functions
(Note: For multiple functions, insert new headers at the “Header 2” level – subset of “5.4 Shutdown Functions” and follow the same sub-section design shown below)
Shtdn: _L_Shtdn(n)
Design Rationale
(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)
Program Flow Start
(If program flow is required by the module, the function to store the unique identifier to a temporary variable is done here – start of the function)
Store Module Inputs to Local copies
(If not required based on design, insert text “None”)
(Processing of function)………
(Breakdown the function into smaller sections to add clarity to the design).
Store Local copy of outputs into Module Outputs
(If not required based on design, insert text “None”)
Program Flow End
(If program flow is required by the module, the function to add the temporary variable to the global accumulator is done here)
Interrupt Functions
(Note: For multiple functions, insert new headers at the “Header 2” level – subset of “5.5 Interrupt Functions” and follow the same sub-section design shown below)
Isr: _L_Isr(n)
Design Rationale
(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)
(Processing of the ISR function)…..
(Note: Multiple headings can be used to break apart the functionality)
Serial Communication Functions
(Note: For multiple functions, insert new headers at the “Header 2” level – subset of “5.6 Serial Communication Functions” and follow the same sub-section design shown below)
SComm: _L_SComm(n)
Design Rationale
(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)
Program Flow Start
(If program flow is required by the module, the function to store the unique identifier to a temporary variable is done here – start of the function)
Store Module Inputs to Local copies
(If not required based on design, insert text “None”)
(Processing of function)………
(Breakdown the function into smaller sections to add clarity to the design).
Store Local copy of outputs into Module Outputs
(If not required based on design, insert text “None”)
Program Flow End
(If program flow is required by the module, the function to add the temporary variable to the global accumulator is done here)
Execution Requirements
Execution Sequence of the Module
(Describe in words relevant details about the execution sequence of the different sub modules.)
Execution Rates for sub-modules called by the Scheduler
This table serves as reference for the Scheduler design
Function Name | Calling Frequency | System State(s) in which the function is called |
---|---|---|
<None> |
Execution Requirements for Serial Communication Functions
Function Name | Sub-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 Module | Software Segment |
---|---|
Local Functions
This table identifies the software segments for local functions identified in this module.
Name of Sub Module | Software Segment |
---|---|
Known Issues / Limitations With Design
(Item #1)
Revision Control Log
Item # | Rev # | Change Description | Date | Author Initials |
---|---|---|---|---|
1 |