From 01ff073916efe7c6827e374520f6b21330a90d58 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Wed, 11 Jan 2023 17:31:42 -0500 Subject: [PATCH] tb: axis_mii_tx: Test one-cycle error Ensure we transition properly even if buf_err is only high for one cycle. Signed-off-by: Sean Anderson --- tb/axis_mii_tx.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tb/axis_mii_tx.py b/tb/axis_mii_tx.py index 6a3bf05..e88b6a1 100644 --- a/tb/axis_mii_tx.py +++ b/tb/axis_mii_tx.py @@ -225,6 +225,11 @@ async def test_underflow(mac): send, status = await start(mac, [*range(x), None]) await underflow(mac, send, status) + # Error on last byte valid for one cycle + send, status = await start(mac, [*range(x), None], + last_extra=(12 + 8 + x) * 10 - x + 5) + await underflow(mac, send, status) + # Error with more to come send, status = await start(mac, [*range(x), None, 1]) await underflow(mac, send, status)