Skip to content

Commit

Permalink
liteeth_gen: Add TX/RX polarity support to SGMII/1000BASEX PHYs.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Jan 23, 2024
1 parent 3b10143 commit a00c9a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions examples/udp_a7_gtp_sgmii.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
# SPDX-License-Identifier: BSD-2-Clause

# PHY ----------------------------------------------------------------------
phy : A7_1000BASEX
vendor : xilinx
toolchain : vivado
phy : A7_1000BASEX
phy_tx_polarity : 0
phy_rx_polarity : 0
vendor : xilinx
toolchain : vivado

# Core ---------------------------------------------------------------------
refclk_freq : 156.25e6
Expand Down
8 changes: 4 additions & 4 deletions liteeth/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ def __init__(self, platform, core_config):
data_pads = ethphy_pads,
sys_clk_freq = self.clk_freq,
with_csr = False,
rx_polarity = 0, # Add support to liteeth_gen if useful.
tx_polarity = 0, # Add support to liteeth_gen if useful.
rx_polarity = core_config.get("phy_rx_polarity", 0),
tx_polarity = core_config.get("phy_tx_polarity", 0),
)
# Other 7-Series/Ultrascale(+).
else:
Expand All @@ -313,8 +313,8 @@ def __init__(self, platform, core_config):
sys_clk_freq = self.clk_freq,
refclk_freq = core_config.get("refclk_freq", 200e6),
with_csr = False,
rx_polarity = 0, # Add support to liteeth_gen if useful.
tx_polarity = 0, # Add support to liteeth_gen if useful.
rx_polarity = core_config.get("phy_rx_polarity", 0),
tx_polarity = core_config.get("phy_tx_polarity", 0),
)
self.comb += [
ethphy.reset.eq(ethphy_pads.rst),
Expand Down

0 comments on commit a00c9a3

Please sign in to comment.