From 35b475727cadff2c9c0cbedc69ef8a455e1f6a50 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 3 Feb 2022 15:16:20 +0100 Subject: [PATCH] frontend/stream/LiteEthStream2UDPTX: Fix length computation (depends on data_width). --- liteeth/frontend/stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liteeth/frontend/stream.py b/liteeth/frontend/stream.py index b9a1216..39a549b 100644 --- a/liteeth/frontend/stream.py +++ b/liteeth/frontend/stream.py @@ -25,7 +25,7 @@ class LiteEthStream2UDPTX(Module): source.src_port.eq(udp_port), source.dst_port.eq(udp_port), source.ip_address.eq(ip_address), - source.length.eq(1) + source.length.eq(data_width//8) ] else: level = Signal(max=fifo_depth+1) @@ -48,7 +48,7 @@ class LiteEthStream2UDPTX(Module): source.src_port.eq(udp_port), source.dst_port.eq(udp_port), source.ip_address.eq(ip_address), - source.length.eq(level), + source.length.eq(level * (data_width//8)), source.data.eq(fifo.source.data), If(source.ready, fifo.source.ready.eq(1),