integration/soc: add_ethernet: honor self.map["ethmac"], if present
authorGabriel Somlo <gsomlo@gmail.com>
Tue, 10 Mar 2020 23:45:45 +0000 (19:45 -0400)
committerGabriel Somlo <gsomlo@gmail.com>
Tue, 10 Mar 2020 23:49:34 +0000 (19:49 -0400)
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
litex/soc/integration/soc.py

index c8abc75af0a0ef31187fbd3254ad0f6112606ece..aade79dbb2bfd36f99d61d12073738aeacc881ef 100644 (file)
@@ -1044,7 +1044,8 @@ class LiteXSoC(SoC):
             dw         = 32,
             interface  = "wishbone",
             endianness = self.cpu.endianness)
-        ethmac_region = SoCRegion(size=0x2000, cached=False)
+        ethmac_region = SoCRegion(origin=self.mem_map.get("ethmac", None),
+                                  size=0x2000, cached=False)
         self.bus.add_slave(name="ethmac", slave=self.ethmac.bus, region=ethmac_region)
         self.add_csr("ethmac")
         self.add_interrupt("ethmac")