upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools/cpu_ref.py
diff options
context:
space:
mode:
authorSilent <103598001+SebSilent@users.noreply.github.com>2026-11-22 23:25:34 -0300
committerSilent <103598001+SebSilent@users.noreply.github.com>2026-11-22 23:25:34 -0300
commit6cbc32a49eedf710872c2d1a07cd47aecf182ba2 (patch)
tree4bd9196c83e4c36fba2641433a6a1b78ef70c347 /tools/cpu_ref.py
parentd0835dd9f9ec0a88faee510126436f2427854c2e (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.py2
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