genlib/fifo/AsyncFIFO: fix data corruption bug
authorDavid Carne <davidcarne@gmail.com>
Wed, 17 Jul 2013 10:10:08 +0000 (12:10 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 17 Jul 2013 10:10:39 +0000 (12:10 +0200)
migen/genlib/fifo.py

index d3958e87f173c92ee509e67417d6a68970042bbc..12b8033df3c5888a6c5578f3f6e3ece2a42fa6ba 100644 (file)
@@ -126,7 +126,7 @@ class AsyncFIFO(Module, _FIFOInterface):
                rdport = storage.get_port(clock_domain="read")
                self.specials += rdport
                self.comb += [
-                       rdport.adr.eq(consume.q_binary[:-1]),
+                       rdport.adr.eq(consume.q_next_binary[:-1]),
                        self.dout_bits.eq(rdport.dat_r)
                ]