Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

CORDIC vs. Matlab results

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

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- 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