Skip to content

Commit

Permalink
lib.fifo: in FIFOInterface.read(), check readable on the right cycle.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Jan 22, 2019
1 parent eeb023a commit 1782b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nmigen/lib/fifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def __init__(self, width, depth, fwft):

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
Expand Down

0 comments on commit 1782b84

Please sign in to comment.