From a9e3d3cae8b4ac69057f9499f897c6710cfe20e7 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Sat, 23 Sep 2023 14:52:48 -0700 Subject: [PATCH] Wait longer to ensure PTP CDC module has fully stabilized in MAC testbenches Signed-off-by: Alex Forencich --- tb/eth_mac_10g_fifo/test_eth_mac_10g_fifo.py | 6 ++++++ tb/eth_mac_phy_10g_fifo/test_eth_mac_phy_10g_fifo.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tb/eth_mac_10g_fifo/test_eth_mac_10g_fifo.py b/tb/eth_mac_10g_fifo/test_eth_mac_10g_fifo.py index fe98b8de3..3ba0a2655 100644 --- a/tb/eth_mac_10g_fifo/test_eth_mac_10g_fifo.py +++ b/tb/eth_mac_10g_fifo/test_eth_mac_10g_fifo.py @@ -110,6 +110,8 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12): tb.log.info("Wait for PTP CDC lock") while not dut.rx_ptp.rx_ptp_cdc.locked.value.integer: await RisingEdge(dut.rx_clk) + for k in range(1000): + await RisingEdge(dut.rx_clk) test_frames = [payload_data(x) for x in payload_lengths()] tx_frames = [] @@ -159,6 +161,8 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12): tb.log.info("Wait for PTP CDC lock") while not dut.tx_ptp.tx_ptp_cdc.locked.value.integer: await RisingEdge(dut.tx_clk) + for k in range(1000): + await RisingEdge(dut.tx_clk) test_frames = [payload_data(x) for x in payload_lengths()] @@ -209,6 +213,8 @@ async def run_test_tx_alignment(dut, payload_data=None, ifg=12): tb.log.info("Wait for PTP CDC lock") while not dut.tx_ptp.tx_ptp_cdc.locked.value.integer: await RisingEdge(dut.tx_clk) + for k in range(1000): + await RisingEdge(dut.tx_clk) for length in range(60, 92): diff --git a/tb/eth_mac_phy_10g_fifo/test_eth_mac_phy_10g_fifo.py b/tb/eth_mac_phy_10g_fifo/test_eth_mac_phy_10g_fifo.py index 6382e822a..43a6269b7 100644 --- a/tb/eth_mac_phy_10g_fifo/test_eth_mac_phy_10g_fifo.py +++ b/tb/eth_mac_phy_10g_fifo/test_eth_mac_phy_10g_fifo.py @@ -127,6 +127,8 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12): tb.log.info("Wait for PTP CDC lock") while not dut.rx_ptp.rx_ptp_cdc.locked.value.integer: await RisingEdge(dut.rx_clk) + for k in range(1000): + await RisingEdge(dut.rx_clk) # clear out sink buffer tb.axis_sink.clear() @@ -179,6 +181,8 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12): tb.log.info("Wait for PTP CDC lock") while not dut.tx_ptp.tx_ptp_cdc.locked.value.integer: await RisingEdge(dut.tx_clk) + for k in range(1000): + await RisingEdge(dut.tx_clk) test_frames = [payload_data(x) for x in payload_lengths()] @@ -229,6 +233,8 @@ async def run_test_tx_alignment(dut, payload_data=None, ifg=12): tb.log.info("Wait for PTP CDC lock") while not dut.tx_ptp.tx_ptp_cdc.locked.value.integer: await RisingEdge(dut.tx_clk) + for k in range(1000): + await RisingEdge(dut.tx_clk) for length in range(60, 92):