Main Content

Configure Parameters and Signals for AUTOSAR Calibration and Measurement

Configure Simulink® model workspace parameters and signals for AUTOSAR run-time calibration and measurement.

Map Model Workspace Parameters to AUTOSAR Parameters

Open the example modelautosar_swc_counter.slx.

open_system('autosar_swc_counter')

From theAppstab, open the AUTOSAR Component Designer app. Open the Code Mappings editor and select theParameterstab. Expand the list of available model parameters and selectINC. In theMapped Todrop-down list, selectConstantMemory.

To view and modify AUTOSAR attributes for the constant memory, click theicon. For more information about parameter code and calibration attributes, seeMap Model Workspace Parameters to AUTOSAR Component Parameters.

If you have Simulink Coder and Embedded Coder software, you can generate algorithmic C code and AUTOSAR XML (ARXML) component descriptions. You can test the generated code in Simulink or integrate the code and descriptions into an AUTOSAR run-time environment.

When you generate code:

  • 出口ARXML文件包含CONSTANT-MEMORYSdescriptions for parameters that you configured asConstantMemory. In the AUTOSAR run-time environment, calibration tools can access AUTOSARConstantMemoryblocks for calibration and measurement.

  • Generated C code declares and references the constant memory parameters.

Map Simulink Signals and States to AUTOSAR Variables

Open the example modelautosar_swc_counter.slx, if it is not already open.

From theAppstab, open the AUTOSAR Component Designer app. Open the Code Mappings editor and select theSignals/Statestab. Expand the list of available signals and selectequal_to_count. Selecting a signal highlights the signal in the model diagram. In theMapped Todrop-down list, selectStaticMemory.

To view and modify AUTOSAR attributes for the static memory, click theicon. For more information about signal code and calibration attributes, seeMap Block Signals and States to AUTOSAR Variables.

If you have Simulink Coder and Embedded Coder software, you can generate algorithmic C code and AUTOSAR XML (ARXML) component descriptions. You can test the generated code in Simulink or integrate the code and descriptions into an AUTOSAR run-time environment.

When you generate code:

  • 出口ARXML文件包含STATIC-MEMORYSdescriptions for signals and states that you configured asStaticMemory. In the AUTOSAR run-time environment, calibration tools can access AUTOSARStaticMemoryblocks for calibration and measurement.

  • Generated C code declares and references the static memory variables.

Related Links