frontend/stream: Set sink.ready when udp_port or ip_address are invalid.
This commit is contained in:
parent
8faba46517
commit
6a6bc28869
|
@ -82,14 +82,16 @@ class LiteEthUDP2StreamRX(Module):
|
||||||
# Data-Path / Buffering (Optional).
|
# Data-Path / Buffering (Optional).
|
||||||
if fifo_depth is None:
|
if fifo_depth is None:
|
||||||
self.comb += [
|
self.comb += [
|
||||||
sink.connect(source, keep={"last", "ready", "data"}),
|
sink.connect(source, keep={"last", "data"}),
|
||||||
source.valid.eq(sink.valid & valid),
|
source.valid.eq(sink.valid & valid),
|
||||||
|
sink.ready.eq(source.ready | ~valid)
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
self.submodules.fifo = fifo = stream.SyncFIFO([("data", 8)], fifo_depth)
|
self.submodules.fifo = fifo = stream.SyncFIFO([("data", 8)], fifo_depth)
|
||||||
self.comb += [
|
self.comb += [
|
||||||
sink.connect(fifo.sink, keep={"last", "ready", "data"}),
|
sink.connect(fifo.sink, keep={"last", "data"}),
|
||||||
fifo.sink.valid.eq(sink.valid & valid),
|
fifo.sink.valid.eq(sink.valid & valid),
|
||||||
|
sink.ready.eq(fifo.sink.ready | ~valid),
|
||||||
fifo.source.connect(source)
|
fifo.source.connect(source)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue