Skip to content

Commit 7c8a0c4

Browse files
committed
Update the test for payload_available signal
Internal-tag: [#73491] Signed-off-by: Maciej Kurc <[email protected]>
1 parent a89fab9 commit 7c8a0c4

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

verification/cocotb/top/lib_i3c_top/test_recovery.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -997,16 +997,23 @@ async def test_payload_available(dut):
997997
# Wait
998998
await Timer(100, "ns")
999999

1000-
# Read INDIRECT_FIFO_DATA. This should deassert payload_available
1001-
await tb.read_csr(tb.reg_map.I3C_EC.SECFWRECOVERYIF.INDIRECT_FIFO_DATA.base_addr, 4)
1000+
# Read data from the indirect FIFO from the AXI side. payload_available should
1001+
# get deasserted only when the FIFO gets empty.
1002+
for i in range(payload_size // 4):
10021003

1003-
# Wait
1004-
await Timer(100, "ns")
1004+
# Check the signal
1005+
assert bool(
1006+
payload_available.value
1007+
), "FIFO payload_available should not be deasserted until the indirect FIFO is not empty"
10051008

1006-
# Check if payload available is deasserted
1009+
# Read & wait
1010+
await tb.read_csr(tb.reg_map.I3C_EC.SECFWRECOVERYIF.INDIRECT_FIFO_DATA.base_addr, 4)
1011+
await Timer(100, "ns")
1012+
1013+
# Check the signal
10071014
assert not bool(
10081015
payload_available.value
1009-
), "After reading INDIRECT_FIFO_DATA over AHB/AXI payload_available should be deasserted"
1016+
), "After emptying indirect FIFO payload_available should be deasserted"
10101017

10111018
# Wait
10121019
await Timer(1, "us")

0 commit comments

Comments
 (0)