sim: add HW_PREAMBLE_CRC for ethernet

This fixes the behavior of `ethernet_phy_model` `"sim"`. As the preamble
is automatically attached by the tap, there is no need to add it from
the BIOS. To let the BIOS know, `HW_PREAMBLE_CRC` needs to be set.

Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
This commit is contained in:
Matthias Breithaupt 2024-09-12 08:22:00 +02:00
parent dc8b74cc58
commit 2fd8c2cd61
1 changed files with 1 additions and 0 deletions

View File

@ -237,6 +237,7 @@ class SimSoC(SoCCore):
if with_ethernet or with_etherbone:
if ethernet_phy_model == "sim":
self.ethphy = LiteEthPHYModel(self.platform.request("eth", 0))
self.add_constant("HW_PREAMBLE_CRC");
elif ethernet_phy_model == "xgmii":
self.ethphy = LiteEthPHYXGMII(None, self.platform.request("xgmii_eth", 0), model=True)
elif ethernet_phy_model == "gmii":