Merge pull request #84 from lschuermann/dev/core-arp-tx-last_be

core/arp: assert last_be only on the last data word
This commit is contained in:
enjoy-digital 2021-10-23 18:38:01 +02:00 committed by GitHub
commit 9149524623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -51,7 +51,11 @@ class LiteEthARPTX(Module):
) )
self.comb += [ self.comb += [
packetizer.sink.last.eq(counter == (packet_words - 1)), packetizer.sink.last.eq(counter == (packet_words - 1)),
packetizer.sink.last_be.eq(1 if len(packetizer.sink.last_be) == 1 else 2**(packet_length%(dw//8)-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.hwtype.eq(arp_hwtype_ethernet), packetizer.sink.hwtype.eq(arp_hwtype_ethernet),
packetizer.sink.proto.eq(arp_proto_ip), packetizer.sink.proto.eq(arp_proto_ip),
packetizer.sink.hwsize.eq(6), packetizer.sink.hwsize.eq(6),