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
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.
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.
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.
All signals with a specified tolerance are within the specified tolerances in all embedded runs.
One of the following conditions occurred:
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
The Simulation Data Inspector displays the comparison plots for the logged signals.
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.