From b4e28506238c5340f2ade7899c2223424cabd410 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 7 Feb 2024 11:34:01 +0100 Subject: [PATCH] phy/Ultrascale/1000BaseX: Configure PROGDIV_CFG from linerate. --- liteeth/phy/ku_1000basex.py | 4 ++-- liteeth/phy/usp_gth_1000basex.py | 4 ++-- liteeth/phy/usp_gty_1000basex.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/liteeth/phy/ku_1000basex.py b/liteeth/phy/ku_1000basex.py index 142d913..e5034bb 100644 --- a/liteeth/phy/ku_1000basex.py +++ b/liteeth/phy/ku_1000basex.py @@ -357,7 +357,7 @@ class KU_1000BASEX(LiteXModule): 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, @@ -456,7 +456,7 @@ class KU_1000BASEX(LiteXModule): 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, diff --git a/liteeth/phy/usp_gth_1000basex.py b/liteeth/phy/usp_gth_1000basex.py index a443f64..6b51daf 100644 --- a/liteeth/phy/usp_gth_1000basex.py +++ b/liteeth/phy/usp_gth_1000basex.py @@ -401,7 +401,7 @@ class USP_GTH_1000BASEX(LiteXModule): 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, @@ -514,7 +514,7 @@ class USP_GTH_1000BASEX(LiteXModule): 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, diff --git a/liteeth/phy/usp_gty_1000basex.py b/liteeth/phy/usp_gty_1000basex.py index c088691..342df11 100644 --- a/liteeth/phy/usp_gty_1000basex.py +++ b/liteeth/phy/usp_gty_1000basex.py @@ -419,7 +419,7 @@ class USP_GTY_1000BASEX(LiteXModule): 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, @@ -531,7 +531,7 @@ class USP_GTY_1000BASEX(LiteXModule): 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,