R2017a

New Features

AUTOSAR arxml File Import: Flexibly model imported periodic, asynchronous, and initialization runnables

The AUTOSAR arxml importer now supports AUTOSAR modeling styles for which Simulink® modeling support was added in R2016b. For example, you can

To import an AUTOSAR software component with multiple runnable entities into a Simulink model, you use the arxml importer method createComponentAsModel. As part of improved runnable modeling, the createComponentAsModel method now provides the property ModelPeriodicRunnablesAs, which replaces the property CreateInternalBehavior. At model creation time, set ModelPeriodicRunnablesAs to one of these values:

  • AtomicSubsystem (default) — Import AUTOSAR periodic runnables found in arxml files. Model periodic runnables as atomic subsystems with periodic rates in a rate-based model. If conditions prevent use of atomic subsystems, the importer throws an error.

  • FunctionCallSubsystem — Model periodic runnables as function-call subsystems with periodic rates.

  • Auto — Attempt to model periodic runnables as atomic subsystems. If conditions prevent use of atomic subsystems, model periodic runnables as function-call subsystems.

Set ModelPeriodicRunnablesAs to AtomicSubsystem unless your design requires use of function-call subsystems. The following call directs the importer to import a multirunnable AUTOSAR software component and map it into a new rate-based model.

obj = arxml.importer('mySWC.arxml')
createComponentAsModel(obj,'/pkg/swc/ASWC','ModelPeriodicRunnablesAs','AtomicSubsystem')

For more information, see Import AUTOSAR Software Component (Embedded Coder) and Model AUTOSAR Software Components (Embedded Coder).

AUTOSAR DESC elements populate Simulink Description fields

Importing AUTOSAR DESC information associated with an AUTOSAR identifiable element now populates the Description property in the corresponding Simulink element or data object. Correspondingly, exporting a Simulink element or data object Description property now populates the DESC information in the corresponding AUTOSAR element. Previously, Embedded Coder® preserved AUTOSAR DESC information across arxml round-trips but did not leverage the information to add a readable text description to the Simulink model.

For example, suppose that you open the example model rtwdemo_autosar_swc_slfcns and add a description to the Simulink Function block read_data. Use the block properties dialog.

When you export arxml for the model, the generated runnable description contains the Simulink description text.

<RUNNABLE-ENTITY UUID="...">
    <SHORT-NAME>Runnable_readData</SHORT-NAME>
    <DESC>
        <L-2 L="FOR-ALL">Read data function for ASWC</L-2>
    </DESC>
...
    <SYMBOL>readData</SYMBOL>
</RUNNABLE-ENTITY>

Note

This support is available to R2015b, R2016a, and R2016b Embedded Coder customers by installing the latest AUTOSAR support package for your release:

  • R2015b Embedded Coder Support Package for AUTOSAR Standard, Version 15.2.8 or later

  • R2016a Embedded Coder Support Package for AUTOSAR Standard, Version 16.1.5 or later

  • R2016b Embedded Coder Support Package for AUTOSAR Standard, Version 16.2.2 or later

Name change for AUTOSAR local temporary variables

Previously, for an AUTOSAR model, the name for local temporary variables in the generated code was tmp. In R2017a, the name is tmp plus an identifier associated with the data access mode of the variable, such as IRead or IWrite. For example, in R2017a, the name of a local temporary variable with an ImplicitReceive data access mode is tmpIRead.

Release notes and workflow overview documentation added to AUTOSAR support package

R2017a adds release notes and workflow overview documentation to the Embedded Coder Support Package for AUTOSAR Standard. The release notes describe AUTOSAR support changes from the current release back through R2014b. Other help topics provide an overview of AUTOSAR workflows, with links to the main AUTOSAR (Embedded Coder) help.

After you install the support package, restart MATLAB®, open help (for example, with the MATLAB doc command), and go to the Hardware Support section. To access release notes and other help topics, click the link Embedded Coder Support Package for AUTOSAR Standard.

Increased automation for AUTOSAR model updates from arxml files

The arxml importer function updateModel updates an AUTOSAR model with changes specified in arxml files. The updateModel function automatically adds Simulink blocks and signal lines to represent AUTOSAR elements, modifies AUTOSAR properties, and updates Simulink-to-AUTOSAR mapping. For more information, see Import AUTOSAR Software Component Updates (Embedded Coder).

In Version 17.1.1, the updateModel function now automates insertion and mapping of the following elements:

  • Inter-runnable variable (IRV) lines for AUTOSAR IRVs

  • Constant blocks for AUTOSAR parameters

  • Data store memory (DSM) blocks for AUTOSAR per-instance memory (PIM) blocks

Previously, these elements required manual additions to the model.

Model updates also now resize added Function Caller, Constant, and DSM blocks so that block text is readable.

Navigate AUTOSAR Update Report using search bar

In Version 17.1.3, the update report generated by importer function updateModel now provides a search bar. You can quickly navigate to specific elements or other strings of interest.

Import BITFIELD_TEXTTABLE CompuMethods

AUTOSAR CompuMethods of category BITFIELD_TEXTTABLE allow you to access bit values within an application data type of category VALUE. You can group bit values, assign labels to them, and define masks for accessing values within bytes of data.

In Version 17.1.3, you can import BITFIELD_TEXTTABLE CompuMethods from arxml files. After you import the CompuMethods, you can create Simulink enumerated types to represent bit groups and masks for accessing the bitfields, and reference them in Simulink bitwise and relational operator and constant blocks.

You can use the AUTOSAR properties function createEnumeration to create Simulink enumerated types for a bitfield CompuMethod. For example:

arProps = autosar.api.getAUTOSARProperties(modelName);
createEnumeration(arProps,'/Company/Module/CompuMethods/MyBitfieldCompuMethod');

AUTOSAR Basic Software: Use array and bus data types with NvMServiceCaller operations

In Version 17.1.3, when using the Basic Software block NvMServiceCaller to call ReadBlock, RestoreBlockDefaults, or WriteBlock operations, you now can specify array and bus data types. Use the block parameter Argument specification.

AUTOSAR arxml importer enhancements

Version 17.1.1 provides the following arxml importer enhancements:

  • The importer now correctly creates function-call subsystems with large subsystems (for example, greater than 800 ports). Previously, the importer generated the following error:

    Error using autosar.mm.mm2sl.SLModelBuilder/setIdealBlockPosition (line 110)
    At least one value is out of range for defining rectangle or position. All values must
    be less than or equal to 32767.
  • The importer now correctly imports a configuration in which multiple InitValues have ValueSpecifications with the same short label name. Previously, when ValueSpecification short labels had the same name, the importer could import incorrect initial values.

  • The importer now correctly imports InvalidValues with a UnitReference. Previously, the importer displayed an error similar to the following:

    Error using Simulink.metamodel.arplatform.ArxmlImporter/read
    Assertion failed: MetaClass Simulink.metamodel.types.LiteralReal does not have
    property Unit at
    b:\matlab\src\arxml_util\arxml\arxmlreadtransformer4p0.cpp:10444
  • The importer now supports import of NumericalValueSpecifications with Value NaN. Previously, the importer generated an error message.

  • The importer now supports import of ImplementationDataTypes of category TYPE_REFERENCE that do not specify a CompuMethod. Previously, the importer required that both the parent and the referenced ImplementationDataType specify a CompuMethod.

Version 17.1.2 provides the following arxml importer enhancement:

When an arxml file contains INSTANTIATION-DATA-DEF-PROPS, the importer now creates a Simulink.LookupTable object that references appropriate axis data. Previously, the importer generated a Simulink.LookupTable object with the breakpoint Field name set to BP1.

Version 17.1.3 provides the following arxml importer enhancement:

The importer now correctly sets the implementation data type name for types of category TYPE_REFERENCE.

AUTOSAR arxml export enhancements

Version 17.1.1 provides the following arxml export enhancements:

  • Export now correctly generates arxml descriptions for imported ApplicationRecordTypes that have missing type references. Previously, export generated the following error:

    Error using autosar.mm.arxml.Exporter/write
        Cannot create reference to element [unnamed].
  • Export now supports round-tripping an AutosarVariableRef that does not specify a DataPrototype. Previously, export generated an error message.

Version 17.1.3 provides the following arxml export enhancements.

  • Export now correctly places an AUTOSAR data type package inside the modelname_datatype.arxml file, even if the package does not match XML option specifications. Previously, interface and datatype packages could be incorrectly placed in the modelname_component.arxml file.

  • Export now correctly exports any AUTOSAR interface with the isService attribute set to true to stub/modelname_external_interface.arxml, rather than to a top-level ARXML file such as modelname.arxml or modelname_interface.arxml. Previously, setting the isService attribute caused only C-S interfaces to be exported to the external interfaces ARXML stub file. Other interfaces with isService set, such as S-R or M-S, were incorrectly exported to a top-level ARXML file.

  • Export performance is improved when the Configure AUTOSAR Interface dialog box is open. Previously, export took much longer when the dialog box was open.

  • Export now generates a Category subelement when describing AUTOSAR VariationPointProxy elements. Previously, VariationPointProxy elements did not include a Category subelement.