Skip to content

Commit

Permalink
phy/rmii: Cosmetic cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Sep 23, 2024
1 parent f252eed commit 1d19de0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions liteeth/phy/rmii.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def __init__(self, clock_pads, pads, refclk_cd,

# # #

# RX/TX clocks

# RX/TX clocks.
# -------------
self.cd_eth_rx = ClockDomain()
self.cd_eth_tx = ClockDomain()

Expand All @@ -129,7 +129,8 @@ def __init__(self, clock_pads, pads, refclk_cd,
else:
self.comb += clock_pads.ref_clk.eq(~clk_signal) # CHEKCME: Keep Invert?

# Reset
# Reset.
# ------
self.reset = reset = Signal()
if with_hw_init_reset:
self.hw_reset = LiteEthPHYHWReset()
Expand All @@ -153,13 +154,21 @@ class LiteEthPHYRMII(LiteXModule):
def __init__(self, clock_pads, pads, refclk_cd="eth",
with_hw_init_reset = True,
with_refclk_ddr_output = True):

# CRG.
# ----
self.crg = LiteEthPHYRMIICRG(clock_pads, pads, refclk_cd,
with_hw_init_reset = with_hw_init_reset,
with_refclk_ddr_output = with_refclk_ddr_output,
)

# TX/RX.
# ------
self.tx = ClockDomainsRenamer("eth_tx")(LiteEthPHYRMIITX(pads))
self.rx = ClockDomainsRenamer("eth_rx")(LiteEthPHYRMIIRX(pads))
self.sink, self.source = self.tx.sink, self.rx.source

# MDIO.
# -----
if hasattr(pads, "mdc"):
self.mdio = LiteEthPHYMDIO(pads)

0 comments on commit 1d19de0

Please sign in to comment.