eth: Add statistics strings to Ethernet MACs

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2025-04-16 21:35:50 -07:00
parent 031d092513
commit e6cf1f5850
51 changed files with 258 additions and 96 deletions

View File

@@ -43,6 +43,8 @@ export PARAM_STAT_TX_LEVEL := 2
export PARAM_STAT_RX_LEVEL := $(PARAM_STAT_TX_LEVEL)
export PARAM_STAT_ID_BASE := 0
export PARAM_STAT_UPDATE_PERIOD := 1024
export PARAM_STAT_STR_EN := 1
export PARAM_STAT_PREFIX_STR := "\"MAC\""
ifeq ($(SIM), icarus)
PLUSARGS += -fst

View File

@@ -757,6 +757,8 @@ def test_taxi_eth_mac_10g(request, data_w, dic_en, pfc_en):
parameters['STAT_RX_LEVEL'] = parameters['STAT_TX_LEVEL']
parameters['STAT_ID_BASE'] = 0
parameters['STAT_UPDATE_PERIOD'] = 1024
parameters['STAT_STR_EN'] = 1
parameters['STAT_PREFIX_STR'] = "\"MAC\""
extra_env = {f'PARAM_{k}': str(v) for k, v in parameters.items()}

View File

@@ -32,7 +32,9 @@ module test_taxi_eth_mac_10g #
parameter STAT_TX_LEVEL = 1,
parameter STAT_RX_LEVEL = STAT_TX_LEVEL,
parameter STAT_ID_BASE = 0,
parameter STAT_UPDATE_PERIOD = 1024
parameter STAT_UPDATE_PERIOD = 1024,
parameter logic STAT_STR_EN = 1'b1,
parameter logic [8*8-1:0] STAT_PREFIX_STR = "MAC"
/* verilator lint_on WIDTHTRUNC */
)
();
@@ -178,7 +180,9 @@ taxi_eth_mac_10g #(
.STAT_TX_LEVEL(STAT_TX_LEVEL),
.STAT_RX_LEVEL(STAT_RX_LEVEL),
.STAT_ID_BASE(STAT_ID_BASE),
.STAT_UPDATE_PERIOD(STAT_UPDATE_PERIOD)
.STAT_UPDATE_PERIOD(STAT_UPDATE_PERIOD),
.STAT_STR_EN(STAT_STR_EN),
.STAT_PREFIX_STR(STAT_PREFIX_STR)
)
uut (
.rx_clk(rx_clk),