FPGARelated.com
Forums

how to speed up my accumulator ??

Started by Moti Cohen December 5, 2004
Moti,

Another trick for NCO's that will double the speed, assuming you are careful
about how you update the tuning word (phase increment) is to use two
accumulators running clock enabled on every other clock.  One is initialized
with 0, the other is initialized with the phase increment value, and then both
are incremented by 2x the phase increment on every other clock.  This allows
two clock periods for the accumulator carry to propagate, and you get the
current and next phase out at the same time on every other clock.  A 2:1 mux
switching at the clock rate selects the output from the two accumulators on
alternate clocks.

I've used this trick also for cases where the mixer it is driving can't run at
the full clock rate (I usually use a CORDIC rotator there, see my XCELL
article about that).  In that case, you use duplicate copies of the mixer, one
for even samples and the other for odd samples.  The phase for both is
incremented by 2x the sample phase increment, with one offset by 1x the phase
increment.

I don't think you'll have to resort to this to get to 200MHz with a
Spartan3,however.  I'm pretty sure careful floorplanning combined with making
sure you have just one level of LUT logic in the critical path (new addend
through carry chain to accumulator register) will get you 200MHz with a very
comfortable margin at 32 bits.
--
--Ray Andraka, P.E.
President, the Andraka Consulting Group, Inc.
401/884-7930     Fax 401/884-7950
email ray@andraka.com
http://www.andraka.com

 "They that give up essential liberty to obtain a little
  temporary safety deserve neither liberty nor safety."
                                          -Benjamin Franklin, 1759