FPGARelated.com
Forums

Altera's altsyncram MAXIMUM_DEPTH

Started by Peter Sommerfeld November 17, 2003
Hi Manfred,
    There is no real need to restrict it. There have been several requests
to relax this condition and we will get to it in a future release.

- Subroto Datta
Altera Corp.

"Manfred M&#4294967295;cke" <manfred.getmuecke@ridgmxof.thisat> wrote in message
news:oprzq27uthgdoir8@news.inode.at...
> Hi Subroto, > > I would like to renew my question: Why do you restrict FIFO depths to > powers of two? I can't see the need for that. > > Regards, Manfred >
Hi Manfred,

> I would like to renew my question: Why do you restrict FIFO depths to > powers of two? I can't see the need for that.
The dual-clock FIFO internally uses a Gray counter, which is fairly trivial to write for a power of two, plus the fact that counter rollover happens with a single-bit transition as well. The Gray counter greatly reduces the risk of the Other Side (the one in in the different clock domain) seeing inaccurate counter values: the count is either the same, or only one bit has changed. For a normal counter, due to variations in the delay path between the various counter bits, part of the logic in the other clock domain might see a number of counter bits still having the old value, and a number that has the new value, resulting in a nonsense value. When there's a large difference between reader and writer clock frequencies, there may be not a single bit transition, but at least the number of transitions is minimized over time. I haven't studied Gray counters deeply enough to see whether it's feasible, or even possible to write a Gray counter generator algorithm that can _efficiently_ do single-bit-transition counter rollover on an arbitrary (though pre-computed) value. If this is possible without going into long combinatorial chains (which would reduce operating frequency) it should definitely be feasible to remove this power-of-two restriction. For the single-clock version - hey, why not? Just my $.02 Ben Twijnstra