From ac2c0fdac80a8ff75d806e93d262335ac2de2549 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Mon, 14 Aug 2023 16:57:30 -0700 Subject: [PATCH] Read configuration directly from DUT Signed-off-by: Alex Forencich --- tb/axis_async_fifo/test_axis_async_fifo.py | 6 +++--- tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py | 6 +++--- tb/axis_fifo/test_axis_fifo.py | 4 ++-- tb/axis_fifo_adapter/test_axis_fifo_adapter.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tb/axis_async_fifo/test_axis_async_fifo.py b/tb/axis_async_fifo/test_axis_async_fifo.py index 60e3422a0..1b00e51f3 100644 --- a/tb/axis_async_fifo/test_axis_async_fifo.py +++ b/tb/axis_async_fifo/test_axis_async_fifo.py @@ -152,7 +152,7 @@ async def run_test_tuser_assert(dut): test_frame = AxiStreamFrame(test_data, tuser=1) await tb.source.send(test_frame) - if int(os.getenv("PARAM_DROP_BAD_FRAME")): + if dut.DROP_BAD_FRAME.value: for k in range(64): await RisingEdge(dut.s_clk) @@ -302,7 +302,7 @@ async def run_test_shift_in_source_reset(dut): for k in range(64): await RisingEdge(dut.s_clk) - if int(os.getenv("PARAM_FRAME_FIFO")): + if dut.FRAME_FIFO.value: assert tb.sink.empty() else: rx_frame = await tb.sink.recv() @@ -463,7 +463,7 @@ async def run_test_overflow(dut): tb.sink.pause = False - if int(os.getenv("PARAM_DROP_OVERSIZE_FRAME")): + if dut.DROP_OVERSIZE_FRAME.value: for k in range(2048): await RisingEdge(dut.s_clk) diff --git a/tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py b/tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py index 3b50e00d2..a62319c16 100644 --- a/tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py +++ b/tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py @@ -149,7 +149,7 @@ async def run_test_tuser_assert(dut): test_frame = AxiStreamFrame(test_data, tuser=1) await tb.source.send(test_frame) - if int(os.getenv("PARAM_DROP_BAD_FRAME")): + if dut.DROP_BAD_FRAME.value: for k in range(64): await RisingEdge(dut.s_clk) @@ -299,7 +299,7 @@ async def run_test_shift_in_source_reset(dut): for k in range(64): await RisingEdge(dut.s_clk) - if int(os.getenv("PARAM_FRAME_FIFO")): + if dut.FRAME_FIFO.value: assert tb.sink.empty() else: rx_frame = await tb.sink.recv() @@ -460,7 +460,7 @@ async def run_test_overflow(dut): tb.sink.pause = False - if int(os.getenv("PARAM_DROP_OVERSIZE_FRAME")): + if dut.DROP_OVERSIZE_FRAME.value: for k in range(2048): await RisingEdge(dut.s_clk) diff --git a/tb/axis_fifo/test_axis_fifo.py b/tb/axis_fifo/test_axis_fifo.py index ef9f099fc..9314c5248 100644 --- a/tb/axis_fifo/test_axis_fifo.py +++ b/tb/axis_fifo/test_axis_fifo.py @@ -122,7 +122,7 @@ async def run_test_tuser_assert(dut): test_frame = AxiStreamFrame(test_data, tuser=1) await tb.source.send(test_frame) - if int(os.getenv("PARAM_DROP_BAD_FRAME")): + if dut.DROP_BAD_FRAME.value: for k in range(64): await RisingEdge(dut.clk) @@ -249,7 +249,7 @@ async def run_test_overflow(dut): tb.sink.pause = False - if int(os.getenv("PARAM_DROP_OVERSIZE_FRAME")): + if dut.DROP_OVERSIZE_FRAME.value: for k in range(2048): await RisingEdge(dut.clk) diff --git a/tb/axis_fifo_adapter/test_axis_fifo_adapter.py b/tb/axis_fifo_adapter/test_axis_fifo_adapter.py index 8363ec332..f072a6211 100644 --- a/tb/axis_fifo_adapter/test_axis_fifo_adapter.py +++ b/tb/axis_fifo_adapter/test_axis_fifo_adapter.py @@ -122,7 +122,7 @@ async def run_test_tuser_assert(dut): test_frame = AxiStreamFrame(test_data, tuser=1) await tb.source.send(test_frame) - if int(os.getenv("PARAM_DROP_BAD_FRAME")): + if dut.DROP_BAD_FRAME.value: for k in range(64): await RisingEdge(dut.clk) @@ -249,7 +249,7 @@ async def run_test_overflow(dut): tb.sink.pause = False - if int(os.getenv("PARAM_DROP_OVERSIZE_FRAME")): + if dut.DROP_OVERSIZE_FRAME.value: for k in range(2048): await RisingEdge(dut.clk)