From 41f5db08b5c96c367fe0bbc39395aa86fae40f0f Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 19 Jan 2019 01:37:58 +0000 Subject: [PATCH] lib.fifo: fix simulation read/write methods to take only one cycle. --- nmigen/lib/fifo.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nmigen/lib/fifo.py b/nmigen/lib/fifo.py index d52c144..9bf927f 100644 --- a/nmigen/lib/fifo.py +++ b/nmigen/lib/fifo.py @@ -63,11 +63,10 @@ class FIFOInterface: def read(self): """Read method for simulation.""" assert (yield self.readable) - value = (yield self.dout) yield self.re.eq(1) yield + value = (yield self.dout) yield self.re.eq(0) - yield return value def write(self, data): @@ -77,7 +76,6 @@ class FIFOInterface: yield self.we.eq(1) yield yield self.we.eq(0) - yield def _incr(signal, modulo): -- 2.30.2