From e6e567510004c38563d75bf85f332746550cb2ec Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 23 Oct 2020 10:31:36 +0200 Subject: [PATCH] software/litescope_cli: add name support (default="analyzer"). We can have several analyzers in the design, this allows selecting the one to use. --- litescope/software/litescope_cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litescope/software/litescope_cli.py b/litescope/software/litescope_cli.py index d7bc96f..10e5706 100755 --- a/litescope/software/litescope_cli.py +++ b/litescope/software/litescope_cli.py @@ -62,6 +62,7 @@ def parse_args(): parser.add_argument("-v", "--value-trigger", action="append", nargs=2, help="Add conditional trigger with given value", metavar=("TRIGGER", "VALUE")) parser.add_argument("-l", "--list", action="store_true", help="List signal choices") + parser.add_argument("--name", default="analyzer", help="Analyzer Name.") parser.add_argument("--group", default="0", help="Capture Group.") parser.add_argument("--subsampling", default="1", help="Capture Subsampling.") parser.add_argument("--offset", default="32", help="Capture Offset.") @@ -96,7 +97,7 @@ def add_triggers(args, analyzer, signals): def main(): args = parse_args() - signals = get_signals("analyzer.csv", args.group) + signals = get_signals(args.name + ".csv", args.group) if args.list: for signal in signals: print(signal) @@ -106,7 +107,7 @@ def main(): wb.open() try: - analyzer = LiteScopeAnalyzerDriver(wb.regs, "analyzer", debug=True) + analyzer = LiteScopeAnalyzerDriver(wb.regs, args.name, debug=True) analyzer.configure_group(int(args.group, 0)) analyzer.configure_subsampler(int(args.subsampling, 0)) if not add_triggers(args, analyzer, signals):