targets: simplify Ethernet/Etherbone integration on targets with both.
This commit is contained in:
parent
2e1a816d1f
commit
76df4e39c8
|
@ -79,20 +79,15 @@ class BaseSoC(SoCCore):
|
|||
l2_cache_reverse = True
|
||||
)
|
||||
|
||||
# Ethernet ---------------------------------------------------------------------------------
|
||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||
if with_ethernet or with_etherbone:
|
||||
self.submodules.ethphy = LiteEthPHYMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
if with_ethernet:
|
||||
self.submodules.ethphy = LiteEthPHYMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
self.add_ethernet(phy=self.ethphy)
|
||||
|
||||
# Etherbone --------------------------------------------------------------------------------
|
||||
if with_etherbone:
|
||||
self.submodules.ethphy = LiteEthPHYMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
self.add_etherbone(phy=self.ethphy)
|
||||
|
||||
# Leds -------------------------------------------------------------------------------------
|
||||
|
|
|
@ -118,20 +118,15 @@ class BaseSoC(SoCCore):
|
|||
l2_cache_reverse = True
|
||||
)
|
||||
|
||||
# Ethernet ---------------------------------------------------------------------------------
|
||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||
if with_ethernet or with_etherbone:
|
||||
self.submodules.ethphy = LiteEthPHYRGMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
if with_ethernet:
|
||||
self.submodules.ethphy = LiteEthPHYRGMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
self.add_ethernet(phy=self.ethphy)
|
||||
|
||||
# Etherbone --------------------------------------------------------------------------------
|
||||
if with_etherbone:
|
||||
self.submodules.ethphy = LiteEthPHYRGMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
self.add_etherbone(phy=self.ethphy)
|
||||
|
||||
# Build --------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -70,20 +70,15 @@ class BaseSoC(SoCCore):
|
|||
l2_cache_reverse = True
|
||||
)
|
||||
|
||||
# Ethernet ---------------------------------------------------------------------------------
|
||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||
if with_ethernet or with_etherbone:
|
||||
self.submodules.ethphy = LiteEthPHYRGMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
if with_ethernet:
|
||||
self.submodules.ethphy = LiteEthPHYRGMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
self.add_ethernet(phy=self.ethphy)
|
||||
|
||||
# Etherbone --------------------------------------------------------------------------------
|
||||
if with_etherbone:
|
||||
self.submodules.ethphy = LiteEthPHYRGMII(
|
||||
clock_pads = self.platform.request("eth_clocks"),
|
||||
pads = self.platform.request("eth"))
|
||||
self.add_csr("ethphy")
|
||||
self.add_etherbone(phy=self.ethphy)
|
||||
|
||||
# Leds -------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue