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),