Skip to Main Content Skip to Search
Home |   Select Country  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
Products & Services Solutions Academia Support User Community Company
spacer spacer spacer spacer spacer spacer

 

Simulink Fixed Point 6.2

Float- to Fixed-Point Conversion Using Fixed-Point Advisor

Learn how to explore fixed-point models and use automated logging and scaling tools to refine the fixed-point data types for more optimized results.


View the entire video.

 

Contents

Demo Overview

The video shows how to apply float- to fixed-point conversions on models created using:
  • Simulink®
  • Stateflow®
  • Embedded MATLAB™ functionality
Apply designs for:
  • On-target rapid-prototyping
  • Embedded systems
  • Mass production
Generate code in:
  • C
  • C++
Target hardware for:
  • Microcontrollers
  • Digital Signal Processors

Exploring the Model

The Fixed-Point Advisor helps to reduce your development time by automating many of the manual steps needed for conversion and initial scaling. We’ll use, as an example, a floating-point model of a fault-tolerant fuel control system created using Simulink blocks and Stateflow charts. We expect some error between the floating- and fixed-point results after the initial scaling. In the follow-up recording, we will show how to optimize the fixed-point scaling using a companion tool called the Fixed-Point Tool.


See how we explore the model.

Preparing Model for Conversion

The first set of checks validates model-wide settings and creates the floating-point reference data that will be used to compare the fixed-point results. We highlight one check that finds blocks that do not support fixed-point data types and gives advice on correcting this issue.


See how we check for blocks that do not support fixed-point data types.

Preparing for Data Typing and Scaling

In the second set of checks, we remove data type inheritance so we can specify individual scaling for all blocks later. We also explicitly set the design min and max that are used as an input for the tool to propose the initial scaling.


See how we set the design min and max values.

Performing Data Typing and Scaling

In the third set of checks, we propose and set initial scaling for individual blocks and resolve any scaling conflicts that may occur. We also plot the difference plots for the golden reference floating-point results against the initially scaled fixed-point results.


See how we set initial scaling and view fixed-point conversion results graphically.

Preparing for Code Generation

In the last set of checks, the tool helps to identify settings that may lead to non-optimal generated code. We highlight one check that finds blocks with questionable settings such as the unevenly spaced look-up tables that lead to additional code and increased ROM consumption.


See how we find blocks with questionable settings.

Additional Resources


Advanced Fixed Point Tips Document and Models

Technical Evaluation Kit

Related Video Demos

Related Demos

Products Used in this Demo

  • MATLAB®
  • Simulink
  • Stateflow
  • Simulink Fixed Point
  • Real-Time Workshop
  • Real-Time Workshop Embedded Coder
  • Stateflow Coder™
Contact sales
Trial software
E-mail this page

Get Pricing and
Licensing Options