Decide Between Fixed-Point Conversion Workflows
Choosing a Conversion Workflow
Fixed-Point Designer™ provides a number of solutions for fixed-point conversion in MATLAB®. Which conversion method you use depends on your end goal and your level of fixed-point expertise.
| Goal | Conversion Method | Example |
|---|---|---|
Use generated fixed-point MATLAB code for simulation purposes. | If you are new to fixed-point modeling, use
| |
If you are familiar with fixed-point modeling, and want to quickly explore design tradeoffs, convert your code manually. | ||
Generate fixed-point C code (requires MATLAB Coder™) | Automated conversion using the | Convert MATLAB Code to Fixed-Point C Code (MATLAB Coder) |
Generate HDL code (requires HDL Coder™) | HDL Coder Workflow Advisor | Floating-Point to Fixed-Point Conversion (HDL Coder) |
Integrate fixed-point MATLAB code in larger applications for system-level simulation. | Generate a MEX function from the fixed-point algorithm and call the MEX function instead of the original MATLAB function. | Propose Data Types Based on Simulation Ranges Using the fiaccel Function and Propose Data Types Based on Derived Ranges Using the fiaccel Function |
Automated Workflow
If you are new to fixed-point modeling and you are looking for a direct path from floating-point MATLAB to fixed-point MATLAB code, use the automated workflow.
Using the automated workflow, you can obtain data type proposals based on simulation ranges, static ranges, or both. However, this workflow provides less control over your data types.
For more information, see Automated Fixed-Point Conversion.
Manual Workflow
If you have a baseline understanding of fixed-point implementation details and an interest in exploring design tradeoffs to achieve optimized results, use the manual workflow.
Using the manual workflow provides readable, portable fixed-point code that you can easily integrate into other projects. For more information, see Manual Fixed-Point Conversion Workflow.
| Manual Workflow | Automated Workflow | |
|---|---|---|
| Fully automated conversion | ✓ | |
| Less fixed-point expertise required | ✓ | |
| Quick turnaround time | ✓ | |
| Simulation range analysis | ✓ | ✓ |
| Static range analysis | ✓ | |
| Iterative workflow | ✓ | ✓ |
| Portable design | ✓ | ✓ |
| Greatest control and optimization of data types | ✓ | |
| Data type proposal | ✓ | ✓ |
| Histogram logging | ✓ |