[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: OT: Opencores CORDIC - bugs?



On Fri, 2007-03-09 at 20:55 -0800, Darrell Harmon wrote:

> I have written my own CORDIC rotator in Verilog, and accepted the
> different results with positive and negative numbers. It does create
> some distortion, but it is minimal. I am using mine as a mixer in 
> a digital down converter at 125 MS/s, and am getting, -120 dBFS
> distortion with 20 bit data and phase and 16 rotate stages.
> Carrying more bit than needed helps greatly with the distortion
> since is is mostly due to roundoff.

I think the Opencores one has 15 pipeline stages of width 16 bits. It
uses 20 bits for the angle computation though. Which variables tend to
suffer from roundoff?

> How fast does this need to run? Your workaround will add a very large
> propagation delay (and more gates). You may need additional pipeline
> stages. 

Actually, not that fast. The sinewave output will be at most a few tens
of Hz. What I still need to get a handle on is matching pipeline
propagation delays with the control signals between my pre / post
processor. As my college (who has been working on the hardware / VHDL so
far) tells me the FPGA is getting pretty full, it might even be better
for me to use a serialised cordic - but as I've been coding VHDL for
only 2 days only now, I might have to think a little before starting
that task. At least I have a working reference to compare outputs with
if I do decide to write a serial cordic.

> I assume you are just wanting cosine? If so, your last idea should
> work nicely with minimal additional gates.

As I'm actually trying to reproduce a more complex waveform, I need both
the sine and cosine (derivative), which will then drive another cordic
stage after suitable scaling. First step in the battle was to get a
cordic which produces a result -180 to 180, with no missing input codes
in a 16 bit value... makes the phase wrapping much easier for the signal
I'll be feeding in.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user