4.0

4.0 | 1 rating Rate this file 53 downloads (last 30 days) File Size: 1.5 MB File ID: #19835

Tips for Fixed-Point Modeling and Code Generation for Simulink 7 (R2008a)

by Bill Chou

 

06 May 2008 (Updated 07 May 2008)

Code covered by BSD License  

Tips on fixed-point modeling and code generation for R2008a. Includes referenced model files.

Download Now | Watch this File

File Information
Description

There are challenges to face when programming in fixed-point code manually. Similarly, care is required in automatically generating fixed-point code. The developer must pay attention to design tradeoffs, namely: accuracy, efficiency, ROM, RAM, execution time, and readability.

The MathWorks tools allow you to find and understand proven remedies to these difficulties, using the "General Solutions" in this white paper. But the heart of this document is the rich collection of Tips it provides. The tips are the result of the combined expertise of MathWorks developers and experienced customers. The systematic application of these tips will produce optimum code.

Note that this document is a major update to the previous two versions based on Simulink® 5, written by Siva Nadarajah, and Simulink 6, written by Vinod Reddy.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Tips for Fixed-Point Modeling and Code Generation, Tips for Fixed-Point Modeling and Code Generation for Simulink 6

Required Products Fixed-Point Toolbox
Real-Time Workshop
Real-Time Workshop Embedded Coder
Simulink
Simulink Fixed Point
Stateflow
Stateflow Coder
MATLAB release MATLAB 7.6 (R2008a)
Zip File Content  
Other Files
fixpt_tips_R2008a/FixPtTipsR2008a.pdf,
fixpt_tips_R2008a/Models/BackPropagation.mdl,
fixpt_tips_R2008a/Models/fuelsys_fixpt_PolySpace.mdl,
fixpt_tips_R2008a/Models/BaseDataTypes16.mdl,
fixpt_tips_R2008a/Models/BaseDataTypes32.mdl,
fixpt_tips_R2008a/Models/base_data_types_RAM.mdl,
fixpt_tips_R2008a/Models/context_sensitive.mdl,
fixpt_tips_R2008a/Models/EliminatingIO_Struct.mdl,
fixpt_tips_R2008a/Models/EliminatingIO_StructSigName.mdl,
fixpt_tips_R2008a/Models/ExpressionFolding.mdl,
fixpt_tips_R2008a/Models/ExpressionFoldingSigName.mdl,
fixpt_tips_R2008a/Models/FixedPtBus_model.mdl,
fixpt_tips_R2008a/Models/InternalRule.mdl,
fixpt_tips_R2008a/Models/internal_conv_issues.mdl,
fixpt_tips_R2008a/Models/Lookup.mdl,
fixpt_tips_R2008a/Models/LookupEvenBinSearch.mdl,
fixpt_tips_R2008a/Models/mismatched_bias.mdl,
fixpt_tips_R2008a/Models/mismatched_scaling.mdl,
fixpt_tips_R2008a/Models/mismatched_types.mdl,
fixpt_tips_R2008a/Models/multiple_mul_div.mdl,
fixpt_tips_R2008a/Models/non_context_sensitive.mdl,
fixpt_tips_R2008a/Models/numeric_types.mdl,
fixpt_tips_R2008a/Models/order_mul_div.mdl,
fixpt_tips_R2008a/Models/OverflowRounding.mdl,
fixpt_tips_R2008a/Models/ReusableSubsystem.mdl,
fixpt_tips_R2008a/Models/SfColonEqual.mdl,
fixpt_tips_R2008a/Models/SfContextC.mdl,
fixpt_tips_R2008a/Models/shared_utils.mdl,
fixpt_tips_R2008a/Models/lct_fixpt_signals.mdl,
fixpt_tips_R2008a/Models/hw_input_slope_bias_scaling.mdl,
fixpt_tips_R2008a/Models/BackPropagationSF.mdl,
fixpt_tips_R2008a/Models/times_S16S16.c,
fixpt_tips_R2008a/Models/FixedPtBus_data.mat,
fixpt_tips_R2008a/Models/ramprate_legacy_code.h,
fixpt_tips_R2008a/Models/ramprate_legacy_code.c,
fixpt_tips_R2008a/Models/times_S16S16.h,
fixpt_tips_R2008a/Models/numeric_types_ML_variables.mdl,
fixpt_tips_R2008a/Models/lct_data.mat,
fixpt_tips_R2008a/Models/lct_fixpt_signals_script.m,
fixpt_tips_R2008a/Models/lct_fixpt_signals_sfun_times_S16S16.c,
fixpt_tips_R2008a/Models/lct_fixpt_signals_sfun_times_S16S16.mexw32,
fixpt_tips_R2008a/Models/numeric_types_external_typedef.mdl
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
07 Oct 2008 nagaraju boya

I have been working on fixed poing modelling for the one year. Lot of thinks were unclear now after reading this i clarified lot of my doubts

16 Mar 2009 Shi vera

i have to say this one is amazing !Good one!

16 Mar 2009 Shi vera

I can't rate because this web page is sth wrong. five stars!!!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
realtime workshop Bill Chou 22 Oct 2008 10:00:15
embedded code Bill Chou 22 Oct 2008 10:00:15
verification Bill Chou 22 Oct 2008 10:00:15
fixedpoint Bill Chou 22 Oct 2008 10:00:15
tips Bill Chou 22 Oct 2008 10:00:15
embedded Bill Chou 22 Oct 2008 10:00:15
code Bill Chou 22 Oct 2008 10:00:15
generation Bill Chou 22 Oct 2008 10:00:15
production Bill Chou 22 Oct 2008 10:00:15
eml Bill Chou 22 Oct 2008 10:00:15
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com