Main Content

Verify New Settings

After applying proposed data types to your model as described in Convert Data Types, simulate the model using the applied fixed-point data types, and compare the fixed-point behavior of the system with the floating-point behavior.

Simulate Using Embedded Types

View of the Fixed-Point Tool after applying data types. The Simulate with Embedded Types button is highlighted.

In the Verify section of the toolstrip, click the Simulate with Embedded Types button. The Fixed-Point Tool simulates the model using the new fixed-point data types. It logs minimum and maximum values, overflow data for all objects in the system under design. The tool stores the run information in a new run named EmbeddedRun. To edit the default name for the embedded run, under the Simulate with Embedded Types menu, type a new name in the Run name field.

If you specified multiple simulation scenarios using a Simulink.SimulationInput object, the tool simulates the model using the fixed-point data types for each simulation scenario.

Examine Visualization

View of the Fixed-Point Tool after simulating with embedded types. The Visualization of Simulation Data pane is highlighted.

After simulating with embedded types, the Visualization of Simulation Data pane displays the new run data. Examine the histogram visualization to view the dynamic range of the objects in your model using the newly applied fixed-point data types.

Using the Explore tab of the Fixed-Point Tool, you can also sort and filter the results according to different criteria.

Compare Results

The Workflow Browser indicates whether the embedded run meets the specified signal tolerances compared to the range collection run. If there were multiple simulation scenarios, the tool indicates whether each scenario met the required tolerances.

The Workflow Browser displays one of the following.

IconStatusDescription

Pass

All signals with a specified tolerance are within the specified tolerances in all embedded runs.

Warn

One of the following conditions occurred:

  • No signals logged or no tolerances set in the model.

  • Unable to compare the signals because the signals don't exist in both the range collection and the verification runs.

  • The range collection run is no longer available.

  • The range collection run used for data type proposals is two merged simulations.

Fail

One or more signals with a specified tolerance are not within the specified tolerances in any of the embedded runs.

To compare the ideal results stored in BaselineRun with the fixed-point results, select the embedded run from the Run to compare in SDI drop down menu. Then click Compare Results to open the Simulation Data Inspector. Alternatively, you can right-click the embedded run name in the Workflow Browser and select Open SDI.

View of the Fixed-Point Tool after simulating with embedded types. The Run to compare in SDI menu is expanded, showing EmbeddedRun, EmbeddedRun_Scenario_1, etc available for comparison in SDI.

The Simulation Data Inspector displays the comparison plots for the logged signals.

View of the Simulation Data Inspector showing the comparison between BaselineRun and EmbeddedRun for logged signals, including specified tolerance bands.

Note

This step requires that you run a simulation during the Collect Ranges phase of the conversion. If you use range analysis to collect ideal ranges for your system under design and do not run a simulation, you will not have a baseline run to compare to at this step.

If the behavior of the converted system does not meet your requirements, you can propose new data types after applying new proposal settings. For more information, see Explore Additional Data Types.

Related Topics