FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5884 Discussions

CORDIC vs. Matlab results

Altera_Forum
Honored Contributor II
1,567 Views

Hello, 

I am using Altera CORDIC for ATan2 and SinCos functions. I am applying the same test vectors to the CORDIC ATan2 and SinCos functions testbench and to the ATan2 and SinCos Matlab Models. I see about 10% of samples don’t match between CORDIC functions and Matlab outputs. For both Matlab and CORDIC I use the same S18,17 inputs for ATan2; S11,8 output for ATan2; S11,8 input for SinCos; S10,8 output for SinCos. 

Any idea why it happens? 

Thanks, 

Mike
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
129 Views

cordic gives approximate result and its accuracy depends on number of internal iterations(rotations).

Altera_Forum
Honored Contributor II
129 Views

 

--- Quote Start ---  

cordic gives approximate result and its accuracy depends on number of internal iterations(rotations). 

--- Quote End ---  

 

Kaz, 

Thanks! 

Could you please recommend application notes or/and user manuals I could learn more how to increase CORDIC accuracy?
Altera_Forum
Honored Contributor II
129 Views

 

--- Quote Start ---  

Kaz, 

Thanks! 

Could you please recommend application notes or/and user manuals I could learn more how to increase CORDIC accuracy? 

--- Quote End ---  

 

 

I understand you are using Altera's cordic but can't find any link to its manual.  

 

Xilinx has cordic ip and its manual at: 

 

http://www.xilinx.com/support/documentation/ip_documentation/cordic/v6_0/pg105-cordic.pdf 

 

This should give you some idea about available settings. 

 

there is also a cordic ip at opencores. It is not difficult to write your own targeting specific trigonometric function.  

 

The following pdf provides a good basis: 

 

http://www.ee.ic.ac.uk/pcheung/teaching/ee3_dsd/crdcsrvy.pdf
Reply