From 6a6bc288698670829d9cff53015026be0defccbc Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 14 Jan 2022 18:02:53 +0100 Subject: [PATCH] frontend/stream: Set sink.ready when udp_port or ip_address are invalid. --- liteeth/frontend/stream.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/liteeth/frontend/stream.py b/liteeth/frontend/stream.py index 1271ead..dd3c23e 100644 --- a/liteeth/frontend/stream.py +++ b/liteeth/frontend/stream.py @@ -82,14 +82,16 @@ class LiteEthUDP2StreamRX(Module): # Data-Path / Buffering (Optional). if fifo_depth is None: self.comb += [ - sink.connect(source, keep={"last", "ready", "data"}), + sink.connect(source, keep={"last", "data"}), source.valid.eq(sink.valid & valid), + sink.ready.eq(source.ready | ~valid) ] else: self.submodules.fifo = fifo = stream.SyncFIFO([("data", 8)], fifo_depth) self.comb += [ - sink.connect(fifo.sink, keep={"last", "ready", "data"}), + sink.connect(fifo.sink, keep={"last", "data"}), fifo.sink.valid.eq(sink.valid & valid), + sink.ready.eq(fifo.sink.ready | ~valid), fifo.source.connect(source) ]