From: whitequark Date: Tue, 22 Jan 2019 07:03:46 +0000 (+0000) Subject: lib.fifo: in FIFOInterface.read(), check readable on the right cycle. X-Git-Tag: working~49 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1782b841b27e5d0ec13e8ed9d0825d50fd97e513;p=nmigen.git lib.fifo: in FIFOInterface.read(), check readable on the right cycle. --- diff --git a/nmigen/lib/fifo.py b/nmigen/lib/fifo.py index e26d3d4..6e8e679 100644 --- a/nmigen/lib/fifo.py +++ b/nmigen/lib/fifo.py @@ -72,9 +72,9 @@ class FIFOInterface: def read(self): """Read method for simulation.""" - assert (yield self.readable) yield self.re.eq(1) yield + assert (yield self.readable) value = (yield self.dout) yield self.re.eq(0) return value