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.

C64x+ DSPLIB DSP_fir_sym() Documentation Error

The programmer's reference for the C64x+ DSPLIB, http://www.ti.com/litv/pdf/sprueb8b, lists the "benchmarks" for the DSP_fir_sym() function as "3/4 * nr + 33 cycles." 

Well, that can't be right. Sure the number of cycles depends on the number of coefficients (nh) as well as the number of input samples (nr)?

 

--Randy

 

  • Randy,

    We are aware of this issue and will work on fixing this up in the documentation in the future. In the meantime, if you need to estimate the cycle count for this function, you can use the test bench we provide in the C64x+ DSPLIB on an cycle accurate simultor in CCS to find out the cycle count consumed. I ran this for you and here are some cycle count results for the DSP_fir_sym.

    For NR=8 NH=8 Cycle count :139; For NR = 8 NH = 12 Cycle count: 153 ; For NR = 8 NH = 16 Cycle count: 167;

    For NR = 12 NH = 8 Cycle count: 185;For NR = 12 NH = 12 Cycle count: 206; For  NR = 12 NH = 16 Cycle count: 227

    For NR = 16 NH = 8 Cycle count: 231; For NR = 16 NH = 12 Cycle count: 259; For NR = 16 NH = 16 Cycle count: 287 

    Regards,

    Rahul

  • Rahul,

    Thanks for responding, but these numbers don't look right either. Is this for 16-bit integers or floats? I thought the libraries in C64x+ DSPLIB were integer, and I would think that on this machine a length-8 integer filter running over 8 samples would be something on the order of 64 cycles. 

    --Randy

  • Randy,

    This is a function in which filtering is performed on 16-bit data with 16-bit coefficients. If you are looking for floating point implementation, you should look at C67x DSPLIB or C674x DSPLIB based on the device you are using.

    You are correct, the benchmarks didn`t look right as they were compiled accidently in the debug mode. I have updated these numbers so it should make more sense now. Apart from the multiplies and adds the code also performs overflow checks, truncation and rounding due to which you see the additional cycles.

    Regards,

    Rahul

  • Thanks Rahul - there are as I was expecting. 

    --Randy