mirror of
https://github.com/fpganinja/taxi.git
synced 2026-08-16 12:21:18 -07:00
eth: Update testbenches
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
@@ -44,7 +44,7 @@ export PARAM_QPLL0_EXT_CTRL := 0
|
||||
export PARAM_QPLL1_EXT_CTRL := 0
|
||||
export PARAM_COMBINED_MAC_PCS := 1
|
||||
export PARAM_DATA_W := 64
|
||||
export PARAM_USXGMII_EN := 0
|
||||
export PARAM_USXGMII_EN := $(PARAM_COMBINED_MAC_PCS)
|
||||
export PARAM_DIC_EN := 1
|
||||
export PARAM_PTP_TS_EN := 1
|
||||
export PARAM_PTP_TD_EN := $(PARAM_PTP_TS_EN)
|
||||
|
||||
@@ -234,14 +234,17 @@ 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 = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 0 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 2 + 1
|
||||
pipe_delay = 2 + 1
|
||||
if dut.USXGMII_EN.value:
|
||||
pipe_delay += 1
|
||||
else:
|
||||
if dut.COMBINED_MAC_PCS.value:
|
||||
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 2 + 1
|
||||
pipe_delay = 2 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 3 + 1
|
||||
pipe_delay = 3 + 1
|
||||
pipe_delay += int(dut.RX_SERDES_PIPELINE.value)
|
||||
|
||||
tb = TB(dut)
|
||||
|
||||
@@ -311,14 +314,15 @@ 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 = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
|
||||
pipe_delay = 2 + 1
|
||||
else:
|
||||
if dut.COMBINED_MAC_PCS.value:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 4 + 1
|
||||
pipe_delay = 4 + 1
|
||||
pipe_delay += int(dut.TX_SERDES_PIPELINE.value)
|
||||
|
||||
tb = TB(dut)
|
||||
|
||||
@@ -384,14 +388,15 @@ 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 = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 2 + 1
|
||||
pipe_delay = 2 + 1
|
||||
else:
|
||||
if dut.COMBINED_MAC_PCS.value:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 4 + 1
|
||||
pipe_delay = 4 + 1
|
||||
pipe_delay += int(dut.TX_SERDES_PIPELINE.value)
|
||||
|
||||
tb = TB(dut)
|
||||
|
||||
@@ -1220,7 +1225,7 @@ def test_taxi_eth_mac_25g_us(request, data_w, combined_mac_pcs, low_latency, dic
|
||||
parameters['QPLL1_EXT_CTRL'] = 0
|
||||
parameters['COMBINED_MAC_PCS'] = combined_mac_pcs
|
||||
parameters['DATA_W'] = data_w
|
||||
parameters['USXGMII_EN'] = int(combined_mac_pcs and data_w == 32)
|
||||
parameters['USXGMII_EN'] = int(combined_mac_pcs)
|
||||
parameters['DIC_EN'] = dic_en
|
||||
parameters['PTP_TS_EN'] = 1
|
||||
parameters['PTP_TD_EN'] = parameters['PTP_TS_EN']
|
||||
|
||||
@@ -36,7 +36,7 @@ export PARAM_DATA_W := 64
|
||||
export PARAM_HDR_W := 2
|
||||
export PARAM_TX_GBX_IF_EN := 1
|
||||
export PARAM_RX_GBX_IF_EN := $(PARAM_TX_GBX_IF_EN)
|
||||
export PARAM_USXGMII_EN := 0
|
||||
export PARAM_USXGMII_EN := 1
|
||||
export PARAM_DIC_EN := 1
|
||||
export PARAM_PTP_TS_EN := 1
|
||||
export PARAM_PTP_TD_EN := $(PARAM_PTP_TS_EN)
|
||||
|
||||
@@ -184,10 +184,13 @@ 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 = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
|
||||
if len(dut.serdes_rx_data) == 64:
|
||||
pipe_delay = 0 + 1
|
||||
if dut.USXGMII_EN.value:
|
||||
pipe_delay += 1
|
||||
else:
|
||||
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 2 + 1
|
||||
pipe_delay = 2 + 1
|
||||
pipe_delay += int(dut.RX_SERDES_PIPELINE.value)
|
||||
|
||||
tb = TB(dut, gbx_cfg)
|
||||
|
||||
@@ -253,9 +256,10 @@ 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 = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
pipe_delay += int(dut.TX_SERDES_PIPELINE.value)
|
||||
|
||||
tb = TB(dut, gbx_cfg)
|
||||
|
||||
@@ -316,9 +320,10 @@ 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 = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
pipe_delay += int(dut.TX_SERDES_PIPELINE.value)
|
||||
|
||||
dic_en = int(cocotb.top.DIC_EN.value)
|
||||
|
||||
@@ -1109,7 +1114,7 @@ def test_taxi_eth_mac_phy_10g(request, data_w, ptp_td_en, gbx_en, dic_en, pfc_en
|
||||
parameters['HDR_W'] = 2
|
||||
parameters['TX_GBX_IF_EN'] = gbx_en
|
||||
parameters['RX_GBX_IF_EN'] = parameters['TX_GBX_IF_EN']
|
||||
parameters['USXGMII_EN'] = int(data_w == 32)
|
||||
parameters['USXGMII_EN'] = 1
|
||||
parameters['DIC_EN'] = dic_en
|
||||
parameters['PTP_TS_EN'] = 1
|
||||
parameters['PTP_TD_EN'] = ptp_td_en
|
||||
|
||||
@@ -36,7 +36,7 @@ export PARAM_DATA_W := 64
|
||||
export PARAM_HDR_W := 2
|
||||
export PARAM_TX_GBX_IF_EN := 1
|
||||
export PARAM_RX_GBX_IF_EN := $(PARAM_TX_GBX_IF_EN)
|
||||
export PARAM_USXGMII_EN := 0
|
||||
export PARAM_USXGMII_EN := 1
|
||||
export PARAM_AXIS_DATA_W := $(PARAM_DATA_W)
|
||||
export PARAM_DIC_EN := 1
|
||||
export PARAM_PTP_TS_EN := 1
|
||||
|
||||
@@ -152,10 +152,13 @@ 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 = int(dut.RX_SERDES_PIPELINE.value) + 1 + 1
|
||||
if len(dut.serdes_rx_data) == 64:
|
||||
pipe_delay = 0 + 1
|
||||
if dut.USXGMII_EN.value:
|
||||
pipe_delay += 1
|
||||
else:
|
||||
pipe_delay = int(dut.RX_SERDES_PIPELINE.value) + 2 + 1
|
||||
pipe_delay = 2 + 1
|
||||
pipe_delay += int(dut.RX_SERDES_PIPELINE.value)
|
||||
|
||||
tb = TB(dut, gbx_cfg)
|
||||
|
||||
@@ -217,9 +220,10 @@ 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 = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 0 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
pipe_delay += int(dut.TX_SERDES_PIPELINE.value)
|
||||
|
||||
tb = TB(dut, gbx_cfg)
|
||||
|
||||
@@ -275,9 +279,10 @@ 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 = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
else:
|
||||
pipe_delay = int(dut.TX_SERDES_PIPELINE.value) + 1 + 1
|
||||
pipe_delay = 1 + 1
|
||||
pipe_delay += int(dut.TX_SERDES_PIPELINE.value)
|
||||
|
||||
dic_en = int(cocotb.top.DIC_EN.value)
|
||||
|
||||
@@ -649,7 +654,7 @@ def test_taxi_eth_mac_phy_10g_fifo(request, data_w, gbx_en, dic_en):
|
||||
parameters['HDR_W'] = 2
|
||||
parameters['TX_GBX_IF_EN'] = gbx_en
|
||||
parameters['RX_GBX_IF_EN'] = parameters['TX_GBX_IF_EN']
|
||||
parameters['USXGMII_EN'] = int(data_w == 32)
|
||||
parameters['USXGMII_EN'] = 1
|
||||
parameters['AXIS_DATA_W'] = parameters['DATA_W']
|
||||
parameters['DIC_EN'] = dic_en
|
||||
parameters['PTP_TS_EN'] = 1
|
||||
|
||||
Reference in New Issue
Block a user