Skip to content

Commit 577c709

Browse files
chvamshi-xilinxCh Vamshi Krishna
and
Ch Vamshi Krishna
authored
fixed gmio async status logic (#8946) (#8948)
(cherry picked from commit 0fcfccc) Co-authored-by: Ch Vamshi Krishna <chvamshi@xcochvamshi40x.xlnx.xilinx.com>
1 parent 9da2412 commit 577c709

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/runtime_src/core/edge/user/aie/common_layer/adf_runtime_api.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ void gmio_api::getAvailableBDs()
678678
if (driverStatus != AieRC::XAIE_OK)
679679
throw xrt_core::error(-EIO, "ERROR: adf::gmio_api::getAvailableBDs: AIE driver error.");
680680

681-
numBDCompleted = dmaStartQMaxSize - numPendingBDs;
681+
numBDCompleted = dmaStartQMaxSize - availableBDs.size() - numPendingBDs;
682682

683683
for (int i = 0; i < numBDCompleted && !enqueuedBDs.empty(); i++)
684684
{
@@ -762,6 +762,7 @@ err_code gmio_api::wait()
762762
while (!enqueuedBDs.empty())
763763
{
764764
size_t bdNumber = frontAndPop(enqueuedBDs);
765+
statusBDs[bdNumber]++;
765766
availableBDs.push(bdNumber);
766767
}
767768

0 commit comments

Comments
 (0)