eth: Testbench pipeline delay handling cleanup

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2026-07-23 17:40:21 -07:00
parent 62a97ae2d5
commit b06321186a
6 changed files with 36 additions and 36 deletions

View File

@@ -223,9 +223,9 @@ async def run_test_regs(dut):
async def run_test_rx(dut, port=0, payload_lengths=None, payload_data=None, ifg=12):
if dut.COMBINED_MAC_PCS.value:
pipe_delay = 3
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
else:
pipe_delay = 3
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
tb = TB(dut)
@@ -294,9 +294,9 @@ async def run_test_rx(dut, port=0, payload_lengths=None, payload_data=None, ifg=
async def run_test_tx(dut, port=0, payload_lengths=None, payload_data=None, ifg=12):
if dut.COMBINED_MAC_PCS.value:
pipe_delay = 4
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 0 + 1
else:
pipe_delay = 4
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 0 + 1
tb = TB(dut)

View File

@@ -234,14 +234,14 @@ async def run_test_rx(dut, port=0, payload_lengths=None, payload_data=None, ifg=
if dut.DATA_W.value == 64:
if dut.COMBINED_MAC_PCS.value:
pipe_delay = 3
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
else:
pipe_delay = 4
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 2 + 1
else:
if dut.COMBINED_MAC_PCS.value:
pipe_delay = 4
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 5
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 3 + 1
tb = TB(dut)
@@ -311,14 +311,14 @@ async def run_test_tx(dut, port=0, payload_lengths=None, payload_data=None, ifg=
if dut.DATA_W.value == 64:
if dut.COMBINED_MAC_PCS.value:
pipe_delay = 6
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 6
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
if dut.COMBINED_MAC_PCS.value:
pipe_delay = 6
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 8
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 4 + 1
tb = TB(dut)
@@ -384,14 +384,14 @@ async def run_test_tx_alignment(dut, port=0, payload_data=None, ifg=12):
if dut.DATA_W.value == 64:
if dut.COMBINED_MAC_PCS.value:
pipe_delay = 6
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 6
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
if dut.COMBINED_MAC_PCS.value:
pipe_delay = 7
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 8
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 4 + 1
tb = TB(dut)

View File

@@ -185,9 +185,9 @@ class TB:
async def run_test_rx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 64:
pipe_delay = 4
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
else:
pipe_delay = 5
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 2 + 1
tb = TB(dut, gbx_cfg)
@@ -253,9 +253,9 @@ async def run_test_rx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None
async def run_test_tx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 64:
pipe_delay = 5
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 5
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
tb = TB(dut, gbx_cfg)
@@ -316,9 +316,9 @@ async def run_test_tx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None
async def run_test_tx_alignment(dut, gbx_cfg=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 64:
pipe_delay = 5
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 6
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
dic_en = int(cocotb.top.DIC_EN.value)

View File

@@ -153,9 +153,9 @@ class TB:
async def run_test_rx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 64:
pipe_delay = 4
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
else:
pipe_delay = 5
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 2 + 1
tb = TB(dut, gbx_cfg)
@@ -217,9 +217,9 @@ async def run_test_rx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None
async def run_test_tx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 64:
pipe_delay = 5
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 5
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
tb = TB(dut, gbx_cfg)
@@ -275,9 +275,9 @@ async def run_test_tx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None
async def run_test_tx_alignment(dut, gbx_cfg=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 64:
pipe_delay = 5
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
else:
pipe_delay = 6
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
dic_en = int(cocotb.top.DIC_EN.value)

View File

@@ -184,9 +184,9 @@ class TB:
async def run_test_rx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 16:
pipe_delay = 4
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
else:
pipe_delay = 4
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
tb = TB(dut, gbx_cfg)
@@ -252,9 +252,9 @@ async def run_test_rx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None
async def run_test_tx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 16:
pipe_delay = 3
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 0 + 1
else:
pipe_delay = 3
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 0 + 1
tb = TB(dut, gbx_cfg)

View File

@@ -152,9 +152,9 @@ class TB:
async def run_test_rx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 64:
pipe_delay = 4
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
else:
pipe_delay = 4
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
tb = TB(dut, gbx_cfg)
@@ -216,9 +216,9 @@ async def run_test_rx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None
async def run_test_tx(dut, gbx_cfg=None, payload_lengths=None, payload_data=None, ifg=12):
if len(dut.serdes_tx_data) == 16:
pipe_delay = 3
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 0 + 1
else:
pipe_delay = 3
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 0 + 1
tb = TB(dut, gbx_cfg)