software/driver/analyzer: add wait_done method

This commit is contained in:
Florent Kermarrec 2017-06-22 19:10:43 +02:00
parent 0c4d0f4505
commit 92710208de
1 changed files with 7 additions and 3 deletions

View File

@ -73,9 +73,6 @@ class LiteScopeAnalyzerDriver:
def configure_subsampler(self, value):
self.frontend_subsampler_value.write(value-1)
def done(self):
return self.storage_idle.read()
def run(self, offset, length):
while self.storage_mem_valid.read():
self.storage_mem_ready.write(1)
@ -85,6 +82,13 @@ class LiteScopeAnalyzerDriver:
self.storage_length.write(length)
self.storage_start.write(1)
def done(self):
return self.storage_idle.read()
def wait_done(self):
while not self.done:
pass
def upload(self):
if self.debug:
print("[uploading]...")