We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for
Did you mean:
Highlighted
Observer
112 Views
Registered: ‎10-14-2017

CORDIC 5.0 vector translation phase out incorrect (has an offset)

Hi,

I've created a design where I've got samples from FFT core (8.0) coming into CORDIC 5.0 core which is configured for vector translation. In other words, I've got FFT complex number results which I want to convert into magnitude and phase. I've generated the bit files and done the simulation. In both cases magnitude calculation by CORDIC seems to be correct. However, the phase results are not. I should have a phase value of PI on one of the bins (42) and zeros on all the rest. But what I got is weird offset of approx. one on all the bins except the one which should have value of PI and some weird stuff right before that.

I've sampled the values going into CORDIC core doing the vector translation and verifyed that they are correct with matlab. Below are Matlab plots. The upper ones are of FFT output (input into vector translation CORDIC core) data converted into magnitude and phase vectors using Matlab built in functions. The bottom ones are plots of output data from the CORDIC core. It can be seen that magnitude is corretc, but phase vector has somethign weird going on.

To make sure that it's not some error with binary to decimal conversion in Matlab, I also inspected ISim trace. Below is a picture of that which shows that when input into CORDIC core is zero (both real and imaginary) it outputs magnitude value (CORDIC_OUTPUT 7 downto 0) of zero, but a phase value (CORDIC_OUTPUT 15 downto 8) of non-zero, although atan of zero should be zero.

Can somebody please explain to me what might be the issue and how to solve this?

1 Solution

Accepted Solutions
Observer
95 Views
Registered: ‎10-14-2017

Re: CORDIC 5.0 vector translation phase out incorrect (has an offset)

Okay, I think I found the answer to my question. I just now read from the datasheet that "The phase angle of a zero length vector, (0,0), is indeterminate and the output phase angle generated by the core is unpredictable."

I guess that is the reason why I'm seeing this weird stuff with phase out.

2 Replies
Observer
96 Views
Registered: ‎10-14-2017

Re: CORDIC 5.0 vector translation phase out incorrect (has an offset)

Okay, I think I found the answer to my question. I just now read from the datasheet that "The phase angle of a zero length vector, (0,0), is indeterminate and the output phase angle generated by the core is unpredictable."

I guess that is the reason why I'm seeing this weird stuff with phase out.

Explorer
70 Views
Registered: ‎05-21-2015