FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6359 Discussions

How to design acos, atan, and a division blocks in Dsp Builder

Altera_Forum
Honored Contributor II
1,441 Views

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
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
433 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
433 Views

Thanks for your reply. I'm tring to cope with this...

0 Kudos
Altera_Forum
Honored Contributor II
433 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
433 Views

lpm_divide MegaFunction is installed with Quartus automaticly and always available. It can also be inferred from HDL, but only for integer data type.

0 Kudos
Altera_Forum
Honored Contributor II
433 Views

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.

0 Kudos
Reply