From fab60ab5e0dc94a1ffa5741016493b3888948857 Mon Sep 17 00:00:00 2001 From: Arnaud Durand Date: Mon, 24 May 2021 03:51:09 +0200 Subject: [PATCH] litescope/core: add function to clear scope The analyzer driver can be reused for further capturing by calling the clear() function. --- litescope/software/driver/analyzer.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/litescope/software/driver/analyzer.py b/litescope/software/driver/analyzer.py index e432cb0..3476e69 100644 --- a/litescope/software/driver/analyzer.py +++ b/litescope/software/driver/analyzer.py @@ -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()