litescope/core: add function to clear scope

The analyzer driver can be reused for further capturing by calling
the clear() function.
This commit is contained in:
Arnaud Durand 2021-05-24 03:51:09 +02:00 committed by Arnaud
parent 72c9930705
commit fab60ab5e0
1 changed files with 7 additions and 0 deletions

View File

@ -134,6 +134,13 @@ class LiteScopeAnalyzerDriver:
self.storage_enable.write(1)
self.trigger_enable.write(1)
def clear(self):
self.data = DumpData(self.data_width)
self.offset = 0
self.length = None
self.trigger_enable.write(0)
self.storage_enable.write(0)
def done(self):
return self.storage_done.read()