Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

CORDIC-ARCTAN

Status
Not open for further replies.

gary36

Full Member level 4
Joined
Mar 31, 2018
Messages
208
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
1,806
I am looking for a verilog Code for arc tan function. I am recieving DC sine/cosine from 16 bit ADC. INput ranges for ADC are 0 to +/-5V. I need 16 bit fixed point implemetation.
Could anybody provide pointers ( btw: required for all 4 quadrants and to be implemented in FPGA)
 

I am looking for a verilog Code for arc tan function. I am recieving DC sine/cosine from 16 bit ADC. INput ranges for ADC are 0 to +/-5V. I need 16 bit fixed point implemetation.
Could anybody provide pointers ( btw: required for all 4 quadrants and to be implemented in FPGA)
Hello,
there is one implementation in SystemVerilog on Opencores.org:

https://opencores.org/projects/cordic_atan_iq

Regards
 

I tried to check with the C code and then tranlsating to verilog. Below is one. Why does this code not work?
 

Attachments

  • cordic_fixed_point.txt
    1 KB · Views: 89

In the code , you may notice that test angle is 30 deg ( sine theta =0.5,cos theta= 0.866). I get 43 deg instead.
 

Could locate the error. It is in the Tan table. Now scaled all values to Q15 and now works very well.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top