core/arp/LiteEthARPTX: Simplify last_be generation.

This commit is contained in:
Florent Kermarrec 2024-04-04 13:35:57 +02:00
parent d5ba0d21ef
commit c18cfb8bc0
1 changed files with 1 additions and 3 deletions

View File

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