Set Up the Model

Before using the Fixed-Point Tool to generate data type proposals for your model, set up your model in Simulink®.

  1. If you are using design minimum and maximum range information, add this information to the blocks. To autoscale using derived data, you must specify design minimum and maximum values on at least the model inputs. The range analysis tries to narrow the derived range by using all the specified design ranges in the model. The more design range information you specify, the more likely the range analysis is to succeed. As the analysis is performed, it derives new range information for the model and then attempts to use this new information together with the specified ranges to derive ranges for the remaining objects in the model. For this reason, the analysis results might depend on block priorities because these priorities determine the order in which the software analyzes the blocks.

    You specify a design range for model objects using parameters such as Output minimum and Output maximum. For a list of blocks in which you can specify these values, see Blocks That Allow Signal Range Specification (Simulink).

  2. Enable signal logging.

    To view simulation results using the Simulation Data Inspector, you must enable signal logging for the system you want to convert to fixed point. You can choose to plot results using the Simulation Data Inspector only for signals that have signal logging enabled.

    1. In the Simulink Editor, select one or more signals.

    2. Click the Simulation Data Inspector button arrow and select Log Selected Signals.

  3. You can choose to lock some blocks against automatic data typing by selecting the block's Lock output data type setting against changes by the fixed-point tools parameter. If you select this parameter, the tool does not propose data types for the block.

  4. Update the diagram to perform parameter range checking for all blocks in the model.

    If updating the diagram fails, use the error messages to fix the errors in your model. After fixing the errors, update the diagram again. If you cannot fix the errors, restore your backup model.

To learn about the next step in the conversion process, see Prepare System for Conversion.

Related Topics