From 12be70325eae85a8e9fa1939221f545d08ab8afb Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 2 Sep 2020 10:55:14 +0200 Subject: [PATCH] software/litescope_cli: set default length to None (do a capture with max depth). --- litescope/software/driver/analyzer.py | 2 +- litescope/software/litescope_cli.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/litescope/software/driver/analyzer.py b/litescope/software/driver/analyzer.py index 80b3f4b..95ab7de 100644 --- a/litescope/software/driver/analyzer.py +++ b/litescope/software/driver/analyzer.py @@ -99,7 +99,7 @@ class LiteScopeAnalyzerDriver: def configure_subsampler(self, value): self.subsampler_value.write(value-1) - def run(self, offset = 0, length = None): + def run(self, offset=0, length=None): if length is None: length = self.depth assert offset < self.depth diff --git a/litescope/software/litescope_cli.py b/litescope/software/litescope_cli.py index 9c57158..35b5f9d 100755 --- a/litescope/software/litescope_cli.py +++ b/litescope/software/litescope_cli.py @@ -64,7 +64,7 @@ def parse_args(): parser.add_argument("-l", "--list", action="store_true", help="List signal choices") parser.add_argument("--subsampling", default="1", help="Capture Subsampling.") parser.add_argument("--offset", default="32", help="Capture Offset.") - parser.add_argument("--length", default="128", help="Capture Length.") + parser.add_argument("--length", default=None, help="Capture Length.") args = parser.parse_args() return args @@ -112,7 +112,10 @@ def main(): if not add_triggers(args, analyzer, signals): print("WARNING: no trigger added!") - analyzer.run(offset=int(args.offset, 0), length=int(args.length, 0)) + analyzer.run( + offset = int(args.offset, 0), + length = None if args.length is None else int(args.length, 0) + ) analyzer.wait_done() analyzer.upload()