定点函数替换与数据可视化
定点运行时库函数的替换和使用
coder.approximate了解代码生成的函数替换、绘图数据与可视化支持及数据类型设定。
函数
codegen | Generate HDL or High-Level Synthesis (HLS) code from MATLAB code |
coder.config | Create HDL Coder code generation configuration objects |
coder.approximation | Create function replacement configuration object |
coder.float2fixed.skip | Exclude functions from fixed-point conversion (自 R2024b 起) |
类
coder.FixPtConfig | Floating-point to fixed-point conversion configuration object |
主题
函数替换
- Replacing Functions Using Lookup Table Approximations
The Fixed-Point Designer™ MATLAB® Coder™ software provides an option to generate lookup table approximations for continuous and stateless single-input, single-output functions in your original MATLAB code. - Replace a Custom Function with a Lookup Table
With HDL Coder™, you can generate lookup table approximations for functions that do not support fixed-point types, and replace your own functions. - Replace the exp Function with a Lookup Table
With HDL Coder, you can handle functions that are not supported for fixed point and replace your own functions.
绘图数据和可视化
- Enable Plotting Using the Simulation Data Inspector
You can use the 仿真数据检查器 to inspect and compare floating-point and fixed-point logged input and output data. - Visualize Differences Between Floating-Point and Fixed-Point Results
To complete this example, you must install the following products: - Log Data for Histogram
To log data for histograms: - View and Modify Variable Information
View and modify variable information for fixed-point conversion.
