From c18cfb8bc03271b9345a18791c75ede742621513 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 4 Apr 2024 13:35:57 +0200 Subject: [PATCH] core/arp/LiteEthARPTX: Simplify last_be generation. --- liteeth/core/arp.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/liteeth/core/arp.py b/liteeth/core/arp.py index e1fd892..7e95a51 100644 --- a/liteeth/core/arp.py +++ b/liteeth/core/arp.py @@ -53,9 +53,7 @@ class LiteEthARPTX(LiteXModule): self.comb += [ packetizer.sink.last.eq(counter == (packet_words - 1)), If(packetizer.sink.last, - packetizer.sink.last_be.eq(1 if len(packetizer.sink.last_be) == 1 else - 2**(packet_length % (dw // 8) - 1) - ), + packetizer.sink.last_be.eq(max(1, 2**(packet_length % (dw // 8) - 1))), ), packetizer.sink.hwtype.eq(arp_hwtype_ethernet), packetizer.sink.proto.eq(arp_proto_ip),