Skip to content

Commit

Permalink
phy/xgmii: Add Clk/Data Pads definition to avoid duplication in PHYs.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Sep 16, 2024
1 parent 78513c2 commit b573e12
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion liteeth/phy/xgmii.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
XGMII_START = Constant(0xFB, bits_sign=8)
XGMII_END = Constant(0xFD, bits_sign=8)

# Pads/Interfaces ----------------------------------------------------------------------------------

class LiteEthPHYXGMIIClkPads:
rx = Signal()
tx = Signal()

class LiteEthPHYXGMIIPads:
rx_ctl = Signal(8)
rx_data = Signal(64)
tx_ctl = Signal(8)
tx_data = Signal(64)

# LiteEth PHY XGMII TX -----------------------------------------------------------------------------

class LiteEthPHYXGMIITX(LiteXModule):
Expand Down Expand Up @@ -649,7 +661,7 @@ def __init__(self, clock_pads, model=False):
else:
self.comb += [
self.cd_eth_rx.clk.eq(clock_pads.rx),
self.cd_eth_tx.clk.eq(clock_pads.tx)
self.cd_eth_tx.clk.eq(clock_pads.tx),
]

# LiteEth PHY XGMII --------------------------------------------------------------------------------
Expand Down

0 comments on commit b573e12

Please sign in to comment.