From 209a71c4feebdbd5dfccf90b5e97b04814969296 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 22 Jan 2019 07:03:46 +0000 Subject: [PATCH] lib.fifo: in FIFOInterface.read(), check readable on the right cycle. --- nmigen/lib/fifo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2