The Fixed-Point Tool automates the task of specifying fixed-point data types in a Simulink® model. This process is also known as autoscaling. The tool collects range data for model objects, either from design minimum and maximum values that objects specify explicitly, from logged minimum and maximum values that occur during simulation, or from minimum and maximum values derived using range analysis. Based on these values, the tool proposes fixed-point data types that maximize precision and cover the range. The tool allows you to review the data type proposals and then apply them selectively to objects in your model.
You can use the Fixed-Point Tool to select data types automatically for your model using the following methods.
|Automatic Data Typing Method||Advantages||Disadvantages|
Using simulation minimum and maximum values
Using design minimum and maximum values
You can use this method if the model contains blocks that range analysis does not support. However, if possible, use simulation data to propose data types.
Using derived minimum and maximum values
You do not have to simulate multiple times to ensure that simulation data covers the full intended operating range.
|Workflow Feature||Conversion Using Simulation Data||Conversion Using Range Analysis|
|Iterative workflow||Merge ranges of multiple simulations. This iterative process allows you to collect ranges from multiple input cases.||Results will not change from one derivation to the next unless you manually change design ranges in the model.|
|Range coverage||Proposed data types are based on simulation ranges. The proposals provided by the Fixed-Point Tool are as good as the test bench provided.||Range analysis typically delivers a more conservative data type proposal.|
|Input to system||Comprehensive set of input signals that exercise the full range of your design are required for data type proposals.||Ranges reported from derivation based upon provided design ranges|
|Design ranges||Simulation ranges are verified against design range specification and violations are reported in the Diagnostic Viewer.||Design ranges must be specified on the model.|
|Supported Features||All model objects are supported for instrumentation and range collection||Range analysis supports a subset of model objects. For more information, see Unsupported Simulink Software Features.|
|Modeling constructs||Ranges always converge during simulation.||Some modeling constructs, such as feedback loops, may require more design range information before converging.|
|Tunable parameters with known ranges||You must exercise tunable range as an input||Design ranges of tunable parameters are reported.|
|Data type proposals||Data type proposals based on collected minimum and maximum values.|
|Simulation mode||Instrumentation data is only collected during Normal mode. No instrumentation data is collected while a model is running in accelerator or rapid accelerator mode. If you know that simulation will take a long time, you may want to derive ranges for your model.||Simulation mode has no affect on range analysis.|