Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Discussion Groups

Discussion Groups | TMS320C54x | Fractional Divison operation

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

Fractional Divison operation - sach...@gmail.com - Jun 23 21:27:30 2006



Hello:
I would like to perform the following operation on C54xx
 x/y*abs(x).
Where y is constant and always greater than x.
X and Y are in Q15 notation.
Though TI documents on how to perform division, but in those scenarios x is always greater than
y. I am not sure how to tackle this scenario.  Probably by applying some sort of scaling to x
before the division.
Also, in order to reduce quantization errors, I suppose the operation x/y should be performed
before it is multiplied by abs(x).
Any suggestions would be of great help.
Thanks,
Sachin



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: Fractional Divison operation - Sachin Lal - Jun 24 1:23:18 2006

Just a correction to what I worte earlier.
To reduce quantization error, x*abs(x) should be performed before the
product is divided by y.  That sounds correct now :-)
Thanks,

On 6/23/06, s...@gmail.com <s...@gmail.com> wrote:
>
> Hello:
> I would like to perform the following operation on C54xx
> x/y*abs(x).
> Where y is constant and always greater than x.
> X and Y are in Q15 notation.
> Though TI documents on how to perform division, but in those scenarios x
> is always greater than y. I am not sure how to tackle this
> scenario.  Probably by applying some sort of scaling to x before the
> division.
> Also, in order to reduce quantization errors, I suppose the operation x/y
> should be performed before it is multiplied by abs(x).
> Any suggestions would be of great help.
> Thanks,
> Sachin



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: Fractional Divison operation - Jeff Brower - Jun 24 11:12:22 2006

Sachin-

>  Just a correction to what I worte earlier.
> To reduce quantization error, x*abs(x) should be performed before

> the product is divided by y.  That sounds correct now :-)

Attached is a 54xx .asm file that has both integer and fractional divide routines.
The integer divide allows the numerator to be larger than the denominator, but both
have to be 16-bit.  Maybe this can give you some clue for doing it with 32-bit
numerator.

Please keep the copyrights in place if you use this code, thanks.

-Jeff

> On 6/23/06, s...@gmail.com <s...@gmail.com> wrote:
>
>       Hello:
>      I would like to perform the following operation on C54xx
>      x/y*abs(x).
>      Where y is constant and always greater than x.
>      X and Y are in Q15 notation.
>      Though TI documents on how to perform division, but in those scenarios x
>      is always greater than y. I am not sure how to tackle this scenario.
>      Probably by applying some sort of scaling to x before the division.
>      Also, in order to reduce quantization errors, I suppose the operation x/y
>      should be performed before it is multiplied by abs(x).
>      Any suggestions would be of great help.
>      Thanks,
>      Sachin
>



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )