From 4ff390481e6b7a93561670c09cc3abf95ea85cc6 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Mon, 22 Mar 2021 15:51:07 -0700 Subject: [PATCH] Extract parameter values from cocotb.top --- tests/axi/test_axi.py | 2 +- tests/axis/test_axis.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/axi/test_axi.py b/tests/axi/test_axi.py index 49ec553..52a52ce 100644 --- a/tests/axi/test_axi.py +++ b/tests/axi/test_axi.py @@ -287,7 +287,7 @@ def cycle_pause(): if cocotb.SIM_NAME: - data_width = int(os.getenv("PARAM_DATA_WIDTH")) + data_width = len(cocotb.top.axi_wdata) byte_width = data_width // 8 max_burst_size = (byte_width-1).bit_length() diff --git a/tests/axis/test_axis.py b/tests/axis/test_axis.py index 6b04e9b..4772342 100644 --- a/tests/axis/test_axis.py +++ b/tests/axis/test_axis.py @@ -126,7 +126,7 @@ def cycle_pause(): def size_list(): - data_width = int(os.getenv("PARAM_DATA_WIDTH")) + data_width = len(cocotb.top.axis_tdata) byte_width = data_width // 8 return list(range(1, byte_width*4+1)) + [512] + [1]*64