File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
verification/cocotb/top/lib_i3c_top Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -997,16 +997,23 @@ async def test_payload_available(dut):
997
997
# Wait
998
998
await Timer (100 , "ns" )
999
999
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 ):
1002
1003
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"
1005
1008
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
1007
1014
assert not bool (
1008
1015
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"
1010
1017
1011
1018
# Wait
1012
1019
await Timer (1 , "us" )
You can’t perform that action at this time.
0 commit comments