Reference Protected Models from Third Parties

To deliver a model without revealing its intellectual property, third parties can protect the model before delivery. A protected model is a referenced model that does not support editing. The protected model author chooses whether to enable read-only view, simulation, code generation, and password protection. When an operation is password protected, the AES-256 encryption technology protects the supporting file contents. Creating a protected model requires a Simulink® Coder™ license.

To locate protected models, look for:

  • Files in the MATLAB® Folder Browser with a badge icon.

  • Model blocks with a badge icon in the lower left corner.

  • Files with an .slxp extension.

Note

Protected models do not appear in the model hierarchy in the Model Explorer.

Reference a Protected Model

To reference a protected model, complete this workflow:

  1. If the author signed the protected model, verify the digital signature. In the MATLAB Folder Browser, click the protected model. In the Details pane, the Signed by field indicates the publisher that signed the model and whether the signature is verified by a trusted certificate authority. Verification fails in the following cases:

    • The protected model was changed after it was signed.

    • The protected model was not signed.

    • The protected model was signed with an expired certificate.

    • The protected model was self-signed with a certificate issued by the author.

    • The protected model was signed with a missing or invalid certificate.

    • The certificate of the CA is missing in your system or is invalid.

    To verify the signature on protected models by default, in the Simulink Preferences dialog box, select Verify digital signature of protected model before opening.

  2. Check whether the protected model supports the desired functionality.

    For example, check that the protected model supports simulation. If available, the protected model report shows the supported functionality. To open the report, right-click the protected-model badge icon and select Display Report.

  3. Check that the Simulink release you are using supports the protected model.

    If available, the protected model report shows the release versions used to create the protected model. Use the same Simulink release that was used to create the protected model unless the protected model also supports later releases, as described by this table.

    Use Models Protected in Previous Releases

    Modeling RequirementCross-Release Protected Model Support
    Read-only view

    Supported with limitations — R2019a and later releases

    • Protected model must have been created in R2018b or a later release.

    Simulation in normal mode

    Supported with limitations — R2019a and later releases

    • Protected model must have been created in R2018b or a later release.

    Simulation in accelerator mode

    Supported with limitations — R2020a and later releases

    • Protected model must have been created in R2018b or a later release.

    • You must directly simulate the parent of the protected model. Simulating a model hierarchy that contains the parent model as a referenced model is not supported. To interactively simulate the parent model, you must open it as the top model in its own window. For more information, see Navigate Model Hierarchies.

    • The protected model must use Just-in-Time acceleration and must not require C-code generation. For more information on acceleration modes, see How Acceleration Modes Work.

    Simulation in SIL or PIL mode

    Supported with limitations — R2020a and later releases

    • Protected model contains AUTOSAR code generated in R2018b or a later release, with a Top model code interface. You can run Model block SIL and PIL simulations that reference the protected model.

      If the AUTOSAR code in the protected model requires shared utility code, use sharedCodeUpdate to copy the required code to an existing shared utility code folder. For more information, see Cross-Release Shared Utility Code Reuse (Embedded Coder).

    Simulation in rapid accelerator modeNot supported
    Code generationNot supported

  4. If you plan to simulate the protected model, use the same platform used to create the protected model. The software stores the protected model as a compiled MEX binary.

  5. If you received a protected model package, unpack files according to accompanying directions.

  6. Ensure that the protected model is on the MATLAB path.

  7. If you received a harness model, copy the Model block from the harness model into your model. Otherwise, reference the protected model in a Model block. Open the block parameters dialog box and enter the name of the protected model in the Model name field.

    When you set a Model block to reference a protected model, the Simulation mode of the block becomes Accelerator. You cannot change this mode or use this Model block in External mode.

  8. If the protected model is password protected, right-click the protected model badge icon and select Authorize. In the Model view box, enter the password, then click OK.

  9. Connect signal lines to the Model block that match its input and output port requirements. See Model Reference Interface and Boundary.

    Note that the protected model cannot use noninlined S-functions directly or indirectly.

  10. Provide any needed model argument values. See Parameterize a Referenced Model.

Protected Model Supporting Files

Protected models can require supporting files. If you received a MAT-file, load the MAT-file containing workspace definitions. You can configure a callback function, such as LoadFcn, to load the MAT-file automatically. See Callbacks for Customized Model Behavior.

View Protected Model Contents

Web view allows you to view this protected model information:

  • System contents

  • Block parameters

  • Signal properties

To access the read-only view, you must have access to the licenses used in the protected model. If available, the protected model report shows the required licenses.

To open the read-only view, you can double-click the Model block referencing the protected model or the .slxp file in the Current Folder browser. If the read-only view is password protected, right-click the protected-model badge icon and select Authorize. In the Model view box, enter the password, then click OK.

You can navigate the model hierarchy by double-clicking Model or Subsystem blocks. Alternatively, you can navigate to the View All tab and select the system that you want to view. You cannot view the content of protected referenced models in the protected model.

To view block parameters and signal properties, select a block or signal line respectively.

To search in Web view, click the search button then enter the name or value that you want to search in the box that appears. The elements of the model that the search returns appear highlighted. The search results include the name and parent of each returned element.

See Also

|

Related Topics