peter.m
Newbie level 4
Hi,
in FIFO First-Word Fall-Through, when I check if it is not empty (empty = 0) and then in this case set '1' on read_enable together with assigning data output to some signal ( at the same time), I should get correct value? And if I check in the next step that FIFO is still not empty and do the same, I should get next value?
I ask because my FIFO release twice the first value. I sent to it bytes like [1 2 3 4 5] and I get [1 1 2 3 4]. What can be wrong?
I use Spartan 3 and FIFO from IP cores with read mode FWFT.
Here is part of my code:
In both states I get on LED the same (here is led only in second state). When it is then in similar STATE3 I get there that what I'd like to get in STATE2.
in FIFO First-Word Fall-Through, when I check if it is not empty (empty = 0) and then in this case set '1' on read_enable together with assigning data output to some signal ( at the same time), I should get correct value? And if I check in the next step that FIFO is still not empty and do the same, I should get next value?
I ask because my FIFO release twice the first value. I sent to it bytes like [1 2 3 4 5] and I get [1 1 2 3 4]. What can be wrong?
I use Spartan 3 and FIFO from IP cores with read mode FWFT.
Here is part of my code:
Code:
when STATE1 =>
if (rx_fifo_rdempty = '0') then
address (31 downto 24) <= rx_fifo_q;
rx_fifo_rdreq <= '1';
state <= STATE2;
end if;
when STATE2 =>
if (rx_fifo_rdempty = '0') then
address (23 downto 16) <= rx_fifo_q;
rx_fifo_rdreq <= '1';
state <= STATE3;
LED <= rx_fifo_q;
end if;
In both states I get on LED the same (here is led only in second state). When it is then in similar STATE3 I get there that what I'd like to get in STATE2.