mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
actorlib/fifo: do not duplicate safe write logic
This commit is contained in:
parent
523565be63
commit
91422788ef
1 changed files with 1 additions and 2 deletions
|
@ -14,7 +14,7 @@ class _FIFOActor(Module):
|
||||||
|
|
||||||
self.comb += [
|
self.comb += [
|
||||||
self.sink.ack.eq(self.fifo.writable),
|
self.sink.ack.eq(self.fifo.writable),
|
||||||
self.fifo.we.eq(self.sink.stb & self.sink.ack),
|
self.fifo.we.eq(self.sink.stb),
|
||||||
self.fifo.din.eq(self.sink.payload),
|
self.fifo.din.eq(self.sink.payload),
|
||||||
|
|
||||||
self.source.stb.eq(self.fifo.readable),
|
self.source.stb.eq(self.fifo.readable),
|
||||||
|
@ -22,7 +22,6 @@ class _FIFOActor(Module):
|
||||||
self.fifo.re.eq(self.source.ack)
|
self.fifo.re.eq(self.source.ack)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class SyncFIFO(_FIFOActor):
|
class SyncFIFO(_FIFOActor):
|
||||||
def __init__(self, layout, depth):
|
def __init__(self, layout, depth):
|
||||||
_FIFOActor.__init__(self, fifo.SyncFIFO, layout, depth)
|
_FIFOActor.__init__(self, fifo.SyncFIFO, layout, depth)
|
||||||
|
|
Loading…
Reference in a new issue