-PYNQ Z2 with image V3.0.0
I have a while loop, but I only want each iteration to last for 10 seconds. Currently, I determine this by calculating the working time, recalculating it after each iteration, and turning the while condition to False when the time reaches 10 seconds.
start_time = time.time()
Flag = True
while Flag:
current_time = time.time()
if current_time - start_time >= 10:
Flag = False
However, this significantly reduces the frequency of my loop. Therefore, I want to implement an external timer that stops my loop when 10 seconds have passed.
How can I achieve this? I’m not familiar with C++ development, so it would be best if I could implement this using Verilog, Block Design, or Python.