Simulink 中的数据类型优化
高效设计的定点数据类型优化
数据类型优化是一种自动化的数据类型转换工作流,它自动循环访问各种定点配置以选择最佳异构数据类型,同时满足对系统数值行为的容差约束。优化力图最小化目标函数,如总位宽或总运算符计数,以期通过定点数据类型来实现高效设计。
您可以在命令行中使用 fxpopt 函数或在定点工具中使用优化的定点转换工作流来优化数据类型。
工具
| 定点工具 | 将浮点模型转换为定点模型 |
函数
fxpopt | 优化系统的数据类型 |
类
fxpOptimizationOptions | 指定数据类型优化的选项 |
OptimizationSolution | Optimized fixed-point implementation of system |
OptimizationResult | Result after optimizing fixed-point system |
主题
定点转换工作流概述
- Data Type Conversion Overview
Choose between different Fixed-Point Tool workflows for converting your model to fixed point. - Best Practices for Fixed-Point Conversion Workflow
Use best practices when converting a model to fixed point. - Command-Line Interface for the Fixed-Point Tool
Compare capabilities of the Fixed-Point Tool to the command-line interfaces for the iterative and optimized fixed-point conversion workflows. - 指定行为约束
使用信号容差和 Model Verification 模块来验证定点实现的行为。
命令行界面
- Optimize Fixed-Point Data Types for a System
Optimize data types in a system based on specified tolerances. - Optimize Data Types Using Multiple Simulation Scenarios
Define multiple simulation scenarios for range collection and verification. - Perform Data Type Optimization with Custom Behavioral Constraints
Use Model Verification blocks to specify custom behavioral constraints for data type optimization withfxpopt.
定点工具中优化的定点转换
- Optimize the Fixed-Point Data Types of a System Using the Fixed-Point Tool
Use the Fixed-Point Tool to optimize the data types of a system using multiple simulation scenarios. - Use Custom Cost Functions for Optimized Fixed-Point Conversion
Customize objective function for optimized fixed-point conversion.
疑难解答
Follow best practices and avoid unsupported MATLAB Function block features.
Blocks That Do Not Support Fixed-Point Data Types
Troubleshoot blocks that are not supported for fixed-point conversion.
Model Configuration Changes Made During Data Type Optimization
Changes made to model configuration parameters during data type optimization with
fxpopt.
Data Type Optimization Not Successful
Troubleshoot errors thrown during data type optimization using the
fxpopt function.



