Simulink에서의 반복적인 고정소수점 변환
고정소수점 툴은 Simulink® 모델에서 고정소수점 데이터형 지정 작업을 자동화하는 사용자 인터페이스입니다. 이 툴은 시뮬레이션 범위나 도출된 범위 또는 설계 범위를 기반으로 모델 객체에 대한 범위 데이터를 수집합니다. 반복적인 고정소수점 변환
워크플로에서 이 툴은 정밀도를 최대화하고 범위를 포괄하는 고정소수점 데이터형을 제안합니다. 그러면 데이터형 제안을 검토한 다음 모델의 객체에 선택적으로 적용할 수 있습니다. 설계 요구 사항이 충족되지 않으면 데이터형 제안 설정을 조정하고 그 영향을 시각화하고, 요구 사항이 충족될 때까지 이를 반복할 수 있습니다.
모델을 고정소수점으로 변환하려면 Iterative Fixed-Point Conversion Using the Fixed-Point Tool 항목에 나와 있는 단계를 따르십시오. 전체 변환 과정의 예제는 Convert Floating-Point Model to Fixed Point 항목을 참조하십시오.
DataTypeWorkflow.Converter
객체와 이와 연관된 객체 함수는 고정소수점 툴의 반복적인 고정소수점 변환
대신 명령줄에서 사용할 수 있는 방법입니다.
툴
고정소수점 툴 | Convert a floating-point model to a fixed-point model |
함수
fxptdlg | Open the Fixed-Point Tool |
클래스
DataTypeWorkflow.Converter | Create fixed-point converter object |
DataTypeWorkflow.findDecoupledSubsystems | Get a list of subsystems to replace with an approximation |
DataTypeWorkflow.ProposalSettings | Proposal settings object for data type proposals |
DataTypeWorkflow.Result | Object containing run result information |
DataTypeWorkflow.VerificationResult | Verification results after converting a system to fixed point |
도움말 항목
반복적인 고정소수점 변환 워크플로 개요
- Data Type Conversion Overview
Convert data types in your model to fixed point in one of three ways. - Best Practices for Fixed-Point Conversion Workflow
Use best practices when converting a model to fixed point. - Iterative Fixed-Point Conversion Using the Fixed-Point Tool
Use the Fixed-Point Tool to convert a system from floating point to fixed point.
- 단계 1: Prepare System for Conversion
- 단계 2: Collect Ranges
- 단계 3: Convert Data Types
- 단계 4: Verify New Settings
- 단계 5: Explore Additional Data Types
- Convert Floating-Point Model to Fixed Point
Use the Fixed-Point Tool to convert a floating-point model to fixed point. - The Command-Line Interface for the Fixed-Point Tool
Learn the differences between the command-line interface workflow and the Fixed-Point Tool workflow.
시스템 변환 준비
- Use the Fixed-Point Tool to Prepare a System for Conversion
Use the Fixed-Point Tool to check the system under design for compatibility with the conversion process. - 동작 제약 조건 지정하기
신호 허용오차 및 Model Verification 블록을 사용하여 고정소수점 구현의 동작을 검증합니다.
범위 수집
- 고정소수점 계측 및 데이터형 재정의
모델의 범위 정보를 수집하기 위한 고정소수점 계측 및 데이터형 재정의 설정. - Choosing a Range Collection Method
Choose from three methods for collecting ranges on which to base data type proposals. - How Range Analysis Works
Learn how the static analysis derives range information.
- Prevent the Fixed-Point Tool from Overriding Integer Data Types
Maintain integer data types in your model when using data type override.
데이터형 제안
- How the Fixed-Point Tool Proposes Data Types
Learn how the Fixed-Point Tool proposes data types based on collected ranges and proposal settings. - Propose Data Types for Merged Simulation Ranges
Use the Fixed-Point Tool to merge results from multiple simulations, and propose data types based on the merged results. - How Hardware Implementation Settings Affect Data Type Proposals
Use the Fixed-Point Tool to propose word lengths for a model that implements a simple moving average algorithm.
데이터형 변환
- Convert a Referenced Model to Fixed Point
Use the Fixed-Point Tool to log simulation minimum and maximum values for referenced models and propose data types based on a union of the collected ranges. - Bus Objects in the Fixed-Point Workflow
Learn how data type override behaves with bus objects, and how data types are determined for bus objects. - Autoscaling Data Objects Using the Fixed-Point Tool
Use the Fixed-Point Tool to convert a model that uses data objects for data type specification to fixed point. - Convert MATLAB Function Block to Fixed Point
Use the Fixed-Point Tool to convert a MATLAB® Function block to fixed-point.
결과 검증
- Control Views in the Fixed-Point Tool
Information filtering, sorting, and analysis in the Fixed-Point Tool. - View Simulation Results
Use the Simulation Data Inspector to view simulation results and compare runs to verify your fixed-point design. - Explore Multiple Floating-Point to Fixed-Point Conversions
Iteratively explore different proposal settings to find the best floating point to fixed-point conversion. - Model Multiple Data Type Behaviors Using a Data Dictionary
Example showing how to use referenced data dictionaries to store multiple sets of data types for a model.
문제 해결
Blocks That Do Not Support Fixed-Point Data Types
Troubleshoot blocks that are not supported for fixed-point conversion.
Follow best practices and avoid unsupported MATLAB Function block features.
Best Practices for Working with Stateflow Charts in Automated Fixed-Point Conversion Workflows
Follow best practices for Stateflow® charts to avoid unexpected results.
Models That Might Cause Data Type Propagation Errors
Know which modeling practices could cause data type propagation errors after autoscaling.
Troubleshoot range analysis issues.
Avoid specifying conflicting design minimum and maximum values in your model.
Insufficient Design Range Information
Troubleshoot errors caused by insufficient design range information by providing additional input design minimum and maximum values.
Provide More Design Range Information
Troubleshoot insufficient design range information that prevents successful derived range analysis.
Troubleshoot Range Analysis of System Objects
Reconfigure a System object™, if necessary, so that ranges can be derived for the model.
The Fixed-Point Tool Did Not Propose Data Types
Troubleshoot when the Fixed-Point Tool does not propose data types.
Data Type Mismatch and Structure Initial Conditions
Example showing how to replace a structure initial condition with a
Simulink.Parameter
object.
Data Type Propagation Errors After Applying Proposed Data Types
Troubleshoot when the Fixed-Point Tool proposes data types that are not compatible with the model.