From 4f8b9a35679f8fe7c398bff6df32fdb856fec2b6 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 13 Sep 2018 13:46:23 +0800 Subject: [PATCH] analyzer-driver: use default depth from config The configuration already knows what the default depth is, so just use the default depth from there. Also set the default offset to 0, since that is frequently a good default. Signed-off-by: Sean Cross --- litescope/software/driver/analyzer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litescope/software/driver/analyzer.py b/litescope/software/driver/analyzer.py index 385d252..563e327 100644 --- a/litescope/software/driver/analyzer.py +++ b/litescope/software/driver/analyzer.py @@ -91,7 +91,9 @@ class LiteScopeAnalyzerDriver: def configure_subsampler(self, value): self.subsampler_value.write(value-1) - def run(self, offset, length): + def run(self, offset = 0, length = None): + if length is None: + length = self.depth assert offset < self.depth assert length <= self.depth if self.debug: