From a0d59dd264792d92f00845d99e7081c2b3dbb49b Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 11 Apr 2024 10:47:02 +0200 Subject: [PATCH] frontend/stream/LiteEthStream2UDPTX: Condition source.last_be to source.last. --- liteeth/frontend/stream.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/liteeth/frontend/stream.py b/liteeth/frontend/stream.py index c052c85..cd6a368 100644 --- a/liteeth/frontend/stream.py +++ b/liteeth/frontend/stream.py @@ -63,11 +63,12 @@ class LiteEthStream2UDPTX(LiteXModule): source.ip_address.eq(_ip_address), source.length.eq(level * (data_width//8)), source.data.eq(fifo.source.data), - source.last_be.eq({ - 32 : 0b1000, - 16 : 0b10, - 8 : 0b1}[data_width] - ), + If(source.last, + source.last_be.eq({ + 32 : 0b1000, + 16 : 0b10, + 8 : 0b1 + }[data_width])), If(source.ready, fifo.source.ready.eq(1), NextValue(counter, counter + 1),