lib.fifo: fix simulation read/write methods to take only one cycle.

This commit is contained in:
whitequark 2019-01-19 01:37:58 +00:00
parent 45088f7824
commit 3ed519383c

View file

@ -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):