I am building a project on Virtex 2, where I need to translate cartesian coordinates to polar with amplitude and phase.
That for I generated a Cordic V3.0 via Coregen.
Configuration: Parallel with maximum pipelining
Phase format: Radians
Sync.Enable: No Override
Optional Pins: ACLR,CE,RDZ,Xout,PhaseOut
Round Mode: Round Pos Neg Inf
Coarse rotation: yes
No Scale Compensation
Actually I am facing a problem with small Y_In values. The problem was already discussed in AR#19055 (see here)
The solution there did not work with small width of the cordic. With a width of 45bit and 9 zero bits it worked, but needed too much space. When I am clearing the 5 lowest of the used 19 input bits it does not have the same result like on 45bit with the lowest 9 cleared.
I even switched to "round Pos Neg Inf", like described here.
The resulting phase output is jumping around for small Y_In. See in the picture below:
First line shows the X_in, second is Y_in. In the following lines are the amplitude and lastly the phase is shown.
with the triangular signal in second line the phase output is perfect. In the case before the phase jums around. Mathematically the problem should be known but I did not find any solution in literature.
Are there any wrong settings I could have missed? Is there a newer version that solves the problem? Any other suggestions?