diff options
| author | Silent <103598001+SebSilent@users.noreply.github.com> | 2026-11-22 23:25:34 -0300 |
|---|---|---|
| committer | Silent <103598001+SebSilent@users.noreply.github.com> | 2026-11-22 23:25:34 -0300 |
| commit | 6cbc32a49eedf710872c2d1a07cd47aecf182ba2 (patch) | |
| tree | 4bd9196c83e4c36fba2641433a6a1b78ef70c347 /tools/cpu_ref.py | |
| parent | d0835dd9f9ec0a88faee510126436f2427854c2e (diff) | |
cpu_ref: reject an out-of-range --lane as a CLI error instead of a ValueError traceback
Diffstat (limited to 'tools/cpu_ref.py')
| -rw-r--r-- | tools/cpu_ref.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/cpu_ref.py b/tools/cpu_ref.py index 694782f52..f4e413aae 100644 --- a/tools/cpu_ref.py +++ b/tools/cpu_ref.py | |||
| @@ -778,6 +778,8 @@ def main(argv=None): | |||
| 778 | 778 | ||
| 779 | inputs = {"lanes": args.lanes, "vcc": args.vcc} | 779 | inputs = {"lanes": args.lanes, "vcc": args.vcc} |
| 780 | if args.lanes == 1: | 780 | if args.lanes == 1: |
| 781 | if not 0 <= args.lane < 64: | ||
| 782 | ap.error("--lane must be in 0..63") | ||
| 781 | inputs["lane"] = args.lane | 783 | inputs["lane"] = args.lane |
| 782 | if args.exec is not None: | 784 | if args.exec is not None: |
| 783 | inputs["exec"] = args.exec | 785 | inputs["exec"] = args.exec |