Best Practices to Prepare a System for Conversion

Using the Fixed-Point Tool, you can prepare a model for conversion from a floating-point model or subsystem to an equivalent fixed-point representation. After preparing the model for conversion, use the Fixed-Point Tool to obtain initial fixed-point data types and then refine these data types.

Best Practices

Use a Known Working Model

Before using the Fixed-Point Tool, verify that update diagram succeeds for your model. To update diagram, press Ctrl+D. If update diagram fails, before you start converting your model, fix the failure in your model.

Back Up Your Model

Back up your Simulink® model first.

This practice provides you with a backup in case of error and a baseline for testing and validation.

Convert Subsystems

Convert subsystems within your model, rather than the entire model. This practice saves time and unnecessary conversions.

Specify Short Simulation Run Times

Specifying small simulation run times reduces task processing times. You can change the simulation run time in the Configuration Parameters dialog box. For more information, see Start time (Simulink) and Stop time (Simulink) in the Simulink Reference.

Make Small Changes to Your Model

Make small changes to your model so that you can identify where errors are accidentally introduced.

Use Lock Output Data Type Setting

You can prevent the Fixed-Point Advisor from replacing the current data type. Use the Lock output data type setting against changes by the fixed-point tools parameter available on many blocks. The default setting allows replacement. Use this setting when:

  • You already know the fixed-point data types that you want to use for a particular block.

    For example, the block is modeling a real-world component. Set up the block to allow for known hardware limitations, such as restricting outputs to integer values.

    Specify the output data type of the block explicitly and select Lock output data type setting against changes by the fixed-point tools.

  • You are debugging a model and know that a particular block accepts only certain data types.

    Specify the output data type of upstream blocks explicitly and select Lock output data type setting against changes by the fixed-point tools.

Save Simulink Signal Objects

The Fixed-Point Advisor proposes data types for Simulink signal objects in your model. However, it does not automatically save Simulink signal objects. To preserve changes, before closing the model, save the Simulink signal objects in your workspace and model before closing the model.

Save Restore Point

Before making changes to your model that might cause subsequent update diagram failure, consider saving a restore point.