Skip to content

Commit

Permalink
phy/Ultrascale/1000BaseX: Configure PROGDIV_CFG from linerate.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Feb 7, 2024
1 parent 80ba793 commit b4e2850
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions liteeth/phy/ku_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
p_RX_FABINT_USRCLK_FLOP = 0b0,
p_RX_INT_DATAWIDTH = 0,
p_RX_PMA_POWER_SAVE = 0b0,
p_RX_PROGDIV_CFG = 20.0,
p_RX_PROGDIV_CFG = {1.25e9 : 20.0, 3.125e9 : 10.0}[self.linerate],
p_RX_SAMPLE_PERIOD = 0b111,
p_RX_SIG_VALID_DLY = 11,
p_RX_SUM_DFETAPREP_EN = 0b0,
Expand Down Expand Up @@ -456,7 +456,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
p_TX_PMADATA_OPT = 0b0,
p_TX_PMA_POWER_SAVE = 0b0,
p_TX_PROGCLK_SEL = "CPLL",
p_TX_PROGDIV_CFG = 20.0,
p_TX_PROGDIV_CFG = {1.25e9 : 20.0, 3.125e9 : 10.0}[self.linerate],
p_TX_QPI_STATUS_EN = 0b0,
p_TX_RXDETECT_CFG = 0b00000000110010,
p_TX_RXDETECT_REF = 0b100,
Expand Down
4 changes: 2 additions & 2 deletions liteeth/phy/usp_gth_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
p_RX_INT_DATAWIDTH = 0,
p_RX_PMA_POWER_SAVE = 0b0,
p_RX_PMA_RSV0 = 0b0000000000000000,
p_RX_PROGDIV_CFG = 20.0,
p_RX_PROGDIV_CFG = {1.25e9 : 20.0, 3.125e9 : 10.0}[self.linerate],
p_RX_PROGDIV_RATE = 0b0000000000000001,
p_RX_RESLOAD_CTRL = 0b0000,
p_RX_RESLOAD_OVRD = 0b0,
Expand Down Expand Up @@ -514,7 +514,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
p_TX_PMA_RSV0 = 0b0000000000001000,
p_TX_PREDRV_CTRL = 2,
p_TX_PROGCLK_SEL = "PREPI",
p_TX_PROGDIV_CFG = 20.0,
p_TX_PROGDIV_CFG = {1.25e9 : 20.0, 3.125e9 : 10.0}[self.linerate],
p_TX_PROGDIV_RATE = 0b0000000000000001,
p_TX_QPI_STATUS_EN = 0b0,
p_TX_RXDETECT_CFG = 0b00000000110010,
Expand Down
4 changes: 2 additions & 2 deletions liteeth/phy/usp_gty_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
p_RX_INT_DATAWIDTH = 0,
p_RX_PMA_POWER_SAVE = 0b0,
p_RX_PMA_RSV0 = 0b0000000000101111,
p_RX_PROGDIV_CFG = 20.0,
p_RX_PROGDIV_CFG = {1.25e9 : 20.0, 3.125e9 : 10.0}[self.linerate],
p_RX_PROGDIV_RATE = 0b0000000000000001,
p_RX_RESLOAD_CTRL = 0b0000,
p_RX_RESLOAD_OVRD = 0b0,
Expand Down Expand Up @@ -531,7 +531,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
p_TX_PMA_RSV0 = 0b0000000000000000,
p_TX_PMA_RSV1 = 0b0000000000000000,
p_TX_PROGCLK_SEL = "CPLL",
p_TX_PROGDIV_CFG = 20.0,
p_TX_PROGDIV_CFG = {1.25e9 : 20.0, 3.125e9 : 10.0}[self.linerate],
p_TX_PROGDIV_RATE = 0b0000000000000001,
p_TX_RXDETECT_CFG = 0b00000000110010,
p_TX_RXDETECT_REF = 5,
Expand Down

0 comments on commit b4e2850

Please sign in to comment.