- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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! dzonaserLink Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. I'm tring to cope with this...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
lpm_divide MegaFunction is installed with Quartus automaticly and always available. It can also be inferred from HDL, but only for integer data type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the trig functions use a Cordic routine. You can typically calculate one bit per clock or build your own for two bits per clock.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page