FixedPoint Designer 

FixedPoint Designer enables you to specify all the fixedpoint properties of your MATLAB code, Simulink models, and Stateflow charts. It provides full control of signedness, word length, and scaling. It supports applicationspecific word lengths from 1 bit to at least 128 bits. Binarypoint scaling and arbitrary slope and bias scaling needed by sensors and actuators are also supported. You can control the details of the math, such as how to deal with rounding and overflow.
FixedPoint Designer provides a large number of functions such as math and bitwise operations, array and matrix operators, CORDIC implementations, and trigonometric functions to support fixedpoint computation.
The designer lets you control the fixedpoint arithmetic. The fixedpoint variables can either share a single set of arithmetic attributes or have their own attached arithmetic attributes.
FixedPoint Designer provides bittrue agreement across a workflow that uses ModelBased Design. The response of a fixedpoint algorithm is bittrue for all forms of simulation and code generation, including acceleration and softwareintheloop. Analysis and verification of a fixedpoint algorithm are based on bittrue representations. Bittrue agreement maximizes the benefits of ModelBased Design, such as the ability to discover issues early in the workflow, when they are easier and less costly to fix.
For Simulink models, once a model has been configured with fixedpoint data types, you can simulate its performance to explore implementation tradeoffs between limited range and precision for fixedpoint embedded systems.
Using the tools in FixedPoint Designer, you can access these values and change the data types of signals, optimizing precision while ensuring that their range is covered. You can specify data type ranges using design minimums and maximums, simulation results, or derived minimum and maximum results. You can lock output data types to prevent them from being changed.
FixedPoint Designer provides analysis tools for efficiently converting a design from floatingpoint to fixedpoint representation. The tools let you record minimum and maximum data values and pinpoint when overflows occur during fixedpoint operations. The data type override feature lets you analyze a fixedpoint 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 floatingpoint and fixedpoint 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 fixedpoint values.
For Simulink models, you can automatically convert a floatingpoint design built in Simulink, Stateflow, and system toolboxes including Communications System Toolbox™ and DSP System Toolbox™ into a fixedpoint design using the FixedPoint Tool.
FloatingPoint to FixedPoint Conversion
7:57
Explore fixedpoint models and use automated logging and scaling tools to refine the fixedpoint data types for more optimized results.
FixedPoint Designer provides debugging capabilities that let you switch to a floatingpoint representation of your model to perform benchmarking of the design, identify modeling errors, and determine ideal minimum and maximum values.
FixedPoint Optimization Using FixedPoint Tool
6:32
Convert a floatingpoint model into a fixedpoint model and obtain an initial scaling for the fixedpoint data types.
FixedPoint Designer lets you accelerate fixedpoint algorithms through MEXfile generation. It does this by providing the fiaccel
function to convert your MATLAB code to a MEXfunction, which can accelerate the execution speed of your fixedpoint algorithms.
Using FixedPoint Designer with MATLAB Coder™ or Embedded Coder^{®}, you can generate pure integer C code from your fixedpoint MATLAB code.
Using FixedPoint Designer with Simulink Coder™ or Embedded Coder, you can generate pure integer C code from your fixedpoint Simulink models and Stateflow charts.
The generated code is in bittrue agreement with your model, enabling your design to perform as it did in simulation. The generated code automatically handles all the details of implementing fixedpoint designs, such as scaling adjustment, rounding, and advanced fixedpoint math. You can generate code for signals and parameters with word sizes from 1 to 128 bits. You can use the generated code for a variety of applications, including accelerated simulation, rapid prototyping, and production deployment.
Using FixedPoint Designer with HDL Coder™, you can generate bittrue synthesizable Verilog^{®} and VHDL^{®} code from your fixedpoint MATLAB code, Simulink models, and Stateflow charts.