06-19-2008 08:59 AM
Hi,I have big problems in my design. So I NEED YOUR HELP. Have you ever had in Dsp Builder to design some block as - Arccos (y =acos(x)) - Atan (y=atan(x)) - Divider blocks? (y/x). There is a block whis gives for A/B the quotient Q and the remainder R. So as A=Q*B+R, wher Q and R are integers. I just want to have a signed fractional result directly. Anyway How can I do to afford this. Thanks for reply! dzonaser
06-20-2008 05:39 AM
I doubt, if DSPBuilder has particular means to help with trigonometric functions, cause it's not involved with signal processing generally.Usual methods are either LUTs or iterative algorithms, mostly the latter for higher precision, e. g. with numeric processors. LUT can operate directly or use linear interpolation. Key parameters to select a suitable method are speed, precision and numeric range. The standard (parallel) divider Megafuntion is suited also for remainder only calculation, you can expect a reduction of LE requirement compared to the full utilzed divider. If you don't run short of resources, the parallel divider is a simple solution. Serial dividers may be used for different speed and resource tradeoff. Special algorithms for calculating the remainder probably exist, cause they play an important role in NP mathematics.
06-25-2008 05:22 PM
Hi!I have had encouraging results using LUTs for implementing Acos and asin function in Dsp Builder. I'm still using DSP Builder 6.0 on Matlab/Simulink 7.0.1 without problem. How to find the divider block suitable for me. The one which for an n-bits signed-fractional numerator and an m-bits signed-fractional denomintor could gives me a direct signed-fractional result. Could you tell me more about the standard (parallel) megafunction. Is it the one we have in Altera Dsp Builder library which computes the quotient and the remaninder? Is It the so called lpm divider megafunction? I've even installed the CD with megacore functions. Any divider block available. Hope to year from you soon. Dzonaser