Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6036359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:54:45+00:00 2026-05-23T05:54:45+00:00

I’ve got a question about coding an algorithm for a Texas Instruments TMS320C64xx DSP

  • 0

I’ve got a question about coding an algorithm for a Texas Instruments TMS320C64xx DSP in MATLAB:

I’ve got a working sloppy implementation of my filter in MATLAB. My goal is to use MATLAB Embedded Coder to convert this algorithm to C which I can then import to Code Composer Studio and load onto the DSP.

To do this, I know there are certain things I need to do to my MATLAB code. For example, I need to pre-allocate space for matrices so it knows what size to make them (unless I want to fuss around with variable sized data). All that massaging of MATLAB code into C’ish code so that MATLAB coder can convert it I more or less understand. However, I have no idea how to make sure that my data types (for example the coefficients of my filter) are fixed point rather than floating point so that MATLAB Embedded Coder will convert my code to C which only involves fixed point data types.

So I guess my overall questions are:

1) If the C64xx is specified as a 32-bit Fixed Point DSP, that means a compiler for it will throw an error if I try to use the float data type?

2) Is there a way to ensure that MATLAB Embedded Coder does not create float data types?

3) Do I need to use the MATLAB Fixed Point Toolbox?

Thank you all, let me know if there is anymore information necessary to answer my question.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:54:46+00:00Added an answer on May 23, 2026 at 5:54 am
    1. You can use floating point data types but, as the previous answer points out, the DSP will be emulating floats and the execution will be much slower. This type of execution is OK for certain numerical operations where
      a) you need the precision of floats
      b) and/or conversion to fixed-point is typically a pain (e.g. square roots) or not feasible always,
      c) and/or these operations don’t occur that often in your program to hog most of the CPU cycles.

    2. Yes. There’s a checkbox in the MATLAB Coder configuration setting dialog, under Interface pane, that says “Support only purely-integer numbers”. Checking this will ensure that you don’t get any floating point data types in the generated code. However, you first need to make sure you use only integer/fixed-point data types in your code. This option just ensures there are not floats generated – it doesn’t automatically generate a fixed-point or integer only version of the code from your floating point MATLAB Code.

    3. To truly create a fixed-point C-code, you’d first have to convert your floating point MATLAB code to a fixed-point one. You would need the Fixed-Point Toolbox that let’s you specify your variables as a FI object, and define the fixed-point rules of operations using the FIMATH setting. Once you define a 16/32 bit fixed-point data types for all your variables and operations, you can simulate it, analyze the results, and iterate upon it to tweak your settings to minimize your overflows and rounding errors. Then you can generate a truly integer only C code that will behave just as (or very close to) your fixed-point MATLAB behavior. Any differences you may see between your fixed-point MATLAB code and fixed-point C code will primarily be due to those introduced by your target compiler.

    The following link to a recorded webinar on this topic should provide a good introduction to this process of using the Fixed-Point Toolbox:
    http://www.mathworks.com/wbnr38838

    HTH.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i got an object with contents of html markup in it, for example: string
I've got a string that has curly quotes in it. I'd like to replace
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a JSP page retrieving data and when single or double quotes are
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.