After collecting ranges as described in Collect Ranges, propose and apply data types for objects in your model based on the collected ideal ranges stored in the baseline run. The Fixed-Point Tool proposes a data type for all objects in the system under design whose Lock output data type setting against changes by the fixed-point tools parameter is cleared.
In the Convert section of the toolstrip, under the Settings menu, configure the settings that the Fixed-Point Tool uses to generate data type proposals for objects in your system under design.
Select whether to propose fraction lengths or word lengths for objects in the system under design.
|Propose signedness||Select whether to use the collected range information to propose signedness.|
|Safety margin for simulation min/max (%)||Specify a safety margin to apply to collected simulation ranges. The Fixed-Point Tool will add the specified amount to the collected ranges and base proposals on this larger range. The default value for this setting is two percent.|
|Convert to Fixed Point||Convert double/single types||Select whether to generate proposals for results that currently specify a double or single data type.|
|Convert inherited types||Select whether to generate data type proposals for results that currently specify an inherited data type.|
|Default word length||Select the default word length to use for proposals. This setting is enabled
only when the Propose setting is set to |
|Default fraction length||Select the default fraction length to use for proposals. This setting is
enabled only when the Propose setting is set to
When proposing data types, the Fixed-Point Tool uses the following types of range data:
Design minimum or maximum values — You specify a design range for model objects using parameters such as Output minimum and Output maximum. For a list of blocks for which you can specify these values, see Blocks That Allow Signal Range Specification (Simulink).
Simulation minimum or maximum values — When simulating a system with instrumentation enabled, the Fixed-Point Tool logs the minimum and maximum values generated by model objects. For more information about instrumentation settings, see Fixed-Point Instrumentation and Data Type Override.
If you specified multiple simulation scenarios through a
Simulink.SimulationInput object, the Fixed-Point Tool proposes data
types based on the merged ranges of all simulations.
Derived minimum or maximum values — When deriving minimum and maximum values for a selected system, the Fixed-Point Tool uses the design minimum and maximum values that you specify on the blocks to derive range information for signals in your model. For more information, see How Range Analysis Works.
The Fixed-Point Tool uses all available range data to calculate data type proposals.
To generate proposals, click the Propose data types button .
After reviewing the data type proposals, apply the proposed data types to your model.
The Fixed-Point Tool allows you to apply data type proposals selectively to objects in your model. In the spreadsheet, use the Accept check box to specify the proposals that you want to assign to model objects.
The Fixed-Point Tool applies the proposed data type to this object. By default, the tool selects the Accept check box when a proposal differs from the current data type of the object.
The Fixed-Point Tool ignores the proposed data type and leaves the current data type intact for this object.
No proposal exists for this object, for example, the object is locked against automatic data typing.
Examine each result. For more information about a particular result, select the result and examine the Result Details pane.
This pane also describes potential issues or errors and suggests methods for resolving them. Results for which the data type proposal may cause issues, are marked with a warning () or an error () icon. For more detail on the information contained in the Result Details pane, see Examine Results to Resolve Conflicts.
If you do not want to accept the proposal for a result, on the spreadsheet, clear the Accept check box for that result.
Before applying proposals to your model, you can customize them. In the spreadsheet, click a ProposedDT cell and edit the data type expression. Some results belong to a data type group in which they must all share the same data type. In these cases, the Fixed-Point Tool will report an error unless all results in the data type group share the same data type.
To write the proposed data types to the model, click the Apply Data Types button .
To complete the next step in the conversion process, see Verify New Settings.