Skip to content

Commit

Permalink
genlib/fifo: fix data output changing while not reading when fifo is …
Browse files Browse the repository at this point in the history
…full in non-fwft mode
nakengelhardt authored and sbourdeauducq committed Dec 4, 2017
1 parent 13ee25b commit e63093b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions migen/genlib/fifo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from migen.fhdl.structure import *
from migen.fhdl.module import Module
from migen.fhdl.specials import Memory
from migen.fhdl.specials import Memory, READ_FIRST
from migen.fhdl.bitcontainer import log2_int
from migen.fhdl.decorators import ClockDomainsRenamer
from migen.genlib.cdc import MultiReg, GrayCounter
@@ -89,7 +89,7 @@ def __init__(self, width, depth, fwft=True):
storage = Memory(self.width, depth)
self.specials += storage

wrport = storage.get_port(write_capable=True)
wrport = storage.get_port(write_capable=True, mode=READ_FIRST)
self.specials += wrport
self.comb += [
If(self.replace,
@@ -106,7 +106,7 @@ def __init__(self, width, depth, fwft=True):
do_read = Signal()
self.comb += do_read.eq(self.readable & self.re)

rdport = storage.get_port(async_read=fwft, has_re=not fwft)
rdport = storage.get_port(async_read=fwft, has_re=not fwft, mode=READ_FIRST)
self.specials += rdport
self.comb += [
rdport.adr.eq(consume),

0 comments on commit e63093b

Please sign in to comment.