From 540ad8c9dc6a4f84008eaddd74cb5a7b5c93c915 Mon Sep 17 00:00:00 2001 From: Leon Schuermann Date: Wed, 13 Oct 2021 17:47:28 +0200 Subject: [PATCH 1/2] liteeth/mac: use native dw for LiteEthMACWishboneInterface This is required to support 64-bit wide data paths using the automatic Wishbone bus width conversion as discussed in enjoy-digital/liteeth#75. Otherwise, if the MAC data width deviates from the 32-bit default set previously, received and transmitted packets will be broken. Signed-off-by: Leon Schuermann --- liteeth/mac/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liteeth/mac/__init__.py b/liteeth/mac/__init__.py index 86da1bb..548d882 100644 --- a/liteeth/mac/__init__.py +++ b/liteeth/mac/__init__.py @@ -50,7 +50,7 @@ class LiteEthMAC(Module, AutoCSR): self.tx_slots = CSRConstant(ntxslots) self.slot_size = CSRConstant(2**bits_for(eth_mtu)) wishbone_interface = LiteEthMACWishboneInterface( - dw = 32, + dw = dw, nrxslots = nrxslots, ntxslots = ntxslots, endianness = endianness, From 359b024103f6749f52134d6459ff73c359436518 Mon Sep 17 00:00:00 2001 From: Leon Schuermann Date: Wed, 13 Oct 2021 17:51:23 +0200 Subject: [PATCH 2/2] liteeth/mac: remove assertion of 32-bit dw for wishbone interface Signed-off-by: Leon Schuermann --- liteeth/mac/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/liteeth/mac/__init__.py b/liteeth/mac/__init__.py index 548d882..5658955 100644 --- a/liteeth/mac/__init__.py +++ b/liteeth/mac/__init__.py @@ -74,7 +74,6 @@ class LiteEthMAC(Module, AutoCSR): self.submodules.crossbar = LiteEthMACCrossbar(dw) self.submodules.mac_crossbar = LiteEthMACCoreCrossbar(self.core, self.crossbar, self.interface, dw, hw_mac) else: - assert dw == 32 self.comb += self.interface.source.connect(self.core.sink) self.comb += self.core.source.connect(self.interface.sink)