"Raji" <
[email protected]> wrote in message
news:
[email protected] lkaboutprogramming.com...
> Hi,
>
> Can anybody tell me how to create a FIFO in verilog, in which I can read
> and write in the same clock cycle. If the stack is initially empty and I
> have read and write high, then data_out of should be equal to data_in.
>
> Thanks,
> Raji
>
I understand what your describing, but
1. You left out what kind of input/output you expect (in terms of flags, how
many of what type of buses...).
2. It doesn't seem possible because whatever block it's feeding would not
know data is ready unless the fifo told it that it contained data. You
could build a mux outside the fifo, and if the fifo is empty, take the
data
directly from the fifo's input. But only your level of a need for that
function
and results from synthesis could determine whether such a solution is
merited.
3. I have plenty of fifo models that work good, if the block your fifo is
feeding doesn't mind waiting 1 clock cycle.
BB