mirror of
https://github.com/saymrwulf/litex-boards.git
synced 2026-11-18 09:41:45 +00:00
targets: simplify Ethernet/Etherbone integration on targets with both.
This commit is contained in:
parent
2e1a816d1f
commit
76df4e39c8
3 changed files with 18 additions and 33 deletions
|
|
@ -79,21 +79,16 @@ class BaseSoC(SoCCore):
|
||||||
l2_cache_reverse = True
|
l2_cache_reverse = True
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
if with_ethernet:
|
if with_ethernet or with_etherbone:
|
||||||
self.submodules.ethphy = LiteEthPHYMII(
|
self.submodules.ethphy = LiteEthPHYMII(
|
||||||
clock_pads = self.platform.request("eth_clocks"),
|
clock_pads = self.platform.request("eth_clocks"),
|
||||||
pads = self.platform.request("eth"))
|
pads = self.platform.request("eth"))
|
||||||
self.add_csr("ethphy")
|
self.add_csr("ethphy")
|
||||||
self.add_ethernet(phy=self.ethphy)
|
if with_ethernet:
|
||||||
|
self.add_ethernet(phy=self.ethphy)
|
||||||
# Etherbone --------------------------------------------------------------------------------
|
if with_etherbone:
|
||||||
if with_etherbone:
|
self.add_etherbone(phy=self.ethphy)
|
||||||
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 -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
self.submodules.leds = LedChaser(
|
self.submodules.leds = LedChaser(
|
||||||
|
|
|
||||||
|
|
@ -118,21 +118,16 @@ class BaseSoC(SoCCore):
|
||||||
l2_cache_reverse = True
|
l2_cache_reverse = True
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
if with_ethernet:
|
if with_ethernet or with_etherbone:
|
||||||
self.submodules.ethphy = LiteEthPHYRGMII(
|
self.submodules.ethphy = LiteEthPHYRGMII(
|
||||||
clock_pads = self.platform.request("eth_clocks"),
|
clock_pads = self.platform.request("eth_clocks"),
|
||||||
pads = self.platform.request("eth"))
|
pads = self.platform.request("eth"))
|
||||||
self.add_csr("ethphy")
|
self.add_csr("ethphy")
|
||||||
self.add_ethernet(phy=self.ethphy)
|
if with_ethernet:
|
||||||
|
self.add_ethernet(phy=self.ethphy)
|
||||||
# Etherbone --------------------------------------------------------------------------------
|
if with_etherbone:
|
||||||
if with_etherbone:
|
self.add_etherbone(phy=self.ethphy)
|
||||||
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 --------------------------------------------------------------------------------------------
|
# Build --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,21 +70,16 @@ class BaseSoC(SoCCore):
|
||||||
l2_cache_reverse = True
|
l2_cache_reverse = True
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
if with_ethernet:
|
if with_ethernet or with_etherbone:
|
||||||
self.submodules.ethphy = LiteEthPHYRGMII(
|
self.submodules.ethphy = LiteEthPHYRGMII(
|
||||||
clock_pads = self.platform.request("eth_clocks"),
|
clock_pads = self.platform.request("eth_clocks"),
|
||||||
pads = self.platform.request("eth"))
|
pads = self.platform.request("eth"))
|
||||||
self.add_csr("ethphy")
|
self.add_csr("ethphy")
|
||||||
self.add_ethernet(phy=self.ethphy)
|
if with_ethernet:
|
||||||
|
self.add_ethernet(phy=self.ethphy)
|
||||||
# Etherbone --------------------------------------------------------------------------------
|
if with_etherbone:
|
||||||
if with_etherbone:
|
self.add_etherbone(phy=self.ethphy)
|
||||||
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 -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
self.submodules.leds = LedChaser(
|
self.submodules.leds = LedChaser(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue