Skip to content

Commit

Permalink
liteeth_gen/A7_1000BASEX: Add support for 156.25MHz refclk_freq and f…
Browse files Browse the repository at this point in the history
…ix 200MHz to 125MHz.
  • Loading branch information
enjoy-digital committed Jan 19, 2024
1 parent c05de19 commit 9508144
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/udp_a7_gtp_sgmii.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ vendor : xilinx
toolchain : vivado

# Core ---------------------------------------------------------------------
refclk_freq : 200e6
refclk_freq : 156.25e6
clk_freq : 25e6
core : udp
data_width : 32
Expand Down
4 changes: 2 additions & 2 deletions liteeth/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ def __init__(self, platform, core_config):
ethphy_pads = platform.request("sgmii")
# Artix7.
if phy in [liteeth_phys.A7_1000BASEX]:
assert core_config.get("refclk_freq", 0) == 200e6
assert core_config.get("refclk_freq", 0) in [125e6, 156.25e6]
from liteeth.phy.a7_gtp import QPLLSettings, QPLL
qpll_settings = QPLLSettings(
refclksel = 0b001,
fbdiv = 4,
fbdiv_45 = 5,
fbdiv_45 = {125e6:5, 156.25e6:4},
refclk_div = 1
)
qpll = QPLL(ethphy_pads.refclk, qpll_settings)
Expand Down

0 comments on commit 9508144

Please sign in to comment.