Fixed-Point Designer provides analysis tools for efficiently converting a design from floating-point to fixed-point representation. The tools let you record minimum and maximum data values and pinpoint when overflows occur during fixed-point operations. The data type override feature lets you analyze a fixed-point algorithm by switching the data types between fixed point and floating point. With this analysis, you can observe the dynamic range of variables involved in your design and ensure that the algorithm behaves consistently in floating-point and fixed-point representations.
In MATLAB, you can instrument your code for logging to collect minimum and maximum values from the simulation and get proposed data types. Instrumentation functions can generate
log2 histograms. A histogram is generated for each named and intermediate variable and for each expression in your code. You can use this histogram to determine the word and fraction lengths for your fixed-point values.
For Simulink models, you can automatically convert a floating-point design built in Simulink, Stateflow, and system toolboxes including Communications System Toolbox™ and DSP System Toolbox™ into a fixed-point design using the Fixed-Point Tool.
Floating-Point to Fixed-Point Conversion
Explore fixed-point models and use automated logging and scaling tools to refine the fixed-point data types for more optimized results.
Fixed-Point Designer provides debugging capabilities that let you switch to a floating-point representation of your model to perform benchmarking of the design, identify modeling errors, and determine ideal minimum and maximum values.