This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to convolve arrays of fixed-point values using fixed-point math?

I would like to convolve two arrays of fixed-point values together.  I'd like to do this using fixed-point operations (not floating-point emulation).  Any advice will be appreciated.

  • Philip,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages. Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics.

    This C67x Single Core Forum is an excellent place to share information and get answers to questions about the DSP devices that you are using. The Code Composer Forum is a good place to ask questions about how to use the software tools that TI provides. The C/C++ Compiler Forum is the place to ask questions about the features of the C compiler and related tools, such as the optimizer.

    We are not setup to teach you how to write a DSP algorithm, so our assumption is that you know how to write a convolution equation in C.

    To implement that algorithm with floating point operations, use the 'float' type for your data variables. Not the counters and points, of course, just the data variables.

    To implement that algorithm with fixed point operations, use the 'int' type for your data variables. Care will need to be taken for where the binary-point is in your fixed point data, but that is part of the writing that you will do.

    Regards,
    RandyP

  • It is claimed that this DSP can perform 40-bit fixed-point arithmetic, but the maximum bit width of an integer in C/C++ is 32 bits.  So, it is unclear how one would use the 40-bit fixed-point arithmetic.  I'm guessing that the 40 bits are divided between two 32-bit words.  It would be great if TI provided some documentation to explain how this works, and perhaps even a couple of examples.

  • Phillip,

    Of which DSP do you inquire?

    Please refer to the C Compiler User Guide for your specific DSP device/family, and look through the available data types for your DSP.

    Although the 40-bit data type is supported by the 'long' keyword on some C6000 DSPs, it is not always the best choice to use for some of those DSPs.

    Regards,
    RandyP