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
Fractional Divison operation
Started by ●June 23, 2006
Reply by ●June 24, 20062006-06-24
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 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
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 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
Reply by ●June 24, 20062006-06-24
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 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
>
> 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 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
>