tools/litex_sim: Fix --with-etherbone --with-ethernet case (thanks @g2gps).

This commit is contained in:
Florent Kermarrec 2023-03-01 14:49:08 +01:00
parent b5fe30d694
commit ea2171d32b

View file

@ -272,9 +272,9 @@ class SimSoC(SoCCore):
hw_mac = etherbone_mac_address)
# SoftCPU
ethmac_region_size = (ethmac.rx_slots.constant + ethmac.tx_slots.constant)*ethmac.slot_size.constant
ethmac_region_size = (self.ethmac.rx_slots.constant + self.ethmac.tx_slots.constant)*self.ethmac.slot_size.constant
ethmac_region = SoCRegion(origin=self.mem_map.get("ethmac", None), size=ethmac_region_size, cached=False)
self.bus.add_slave(name="ethmac", slave=ethmac.bus, region=ethmac_region)
self.bus.add_slave(name="ethmac", slave=self.ethmac.bus, region=ethmac_region)
if self.irq.enabled:
self.irq.add("ethmac", use_loc_if_exists=True)
# HW ethernet