vunit
vunit copied to clipboard
AXI4 Lite master hangs on wait_until_idle() if bus is really idle
Hello,
It seems that there's a problem with the way AXI4 Lite master detects bus idle condition. To trigger this bug it's enough to have this code in your testbench:
read_bus(net, bus_handle, bus_addr, bus_data);
wait_until_idle(net, bus_handle);
It seems to me that the problem is with this line of code:
wait until ((bvalid and bready) = '1' or (rvalid and rready) = '1') and is_empty(message_queue) and rising_edge(aclk);
This code checks only for transition from busy to idle.
If the wait_until_idle() is called when the bus is idle then the first part of if statement is impossible to meet.
Considering how the bus_process works, maybe it could be replaced with:
wait until bready = '0' and rready = '0' and is_empty(reply_queue) and is_empty(message_queue) and rising_edge(aclk);