aboutsummaryrefslogtreecommitdiff
path: root/debug/targets.py
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2017-11-16 16:34:02 -0800
committerGitHub <noreply@github.com>2017-11-16 16:34:02 -0800
commit4590b79bc7241f3fa2424f96b4c6666a864fb6a9 (patch)
treea3fe091008fc28a7464a9e595f28c1cad87720eb /debug/targets.py
parent96b21fa7b8912cc2ecc86f6b0e91d19a65103a55 (diff)
downloadriscv-tests-4590b79bc7241f3fa2424f96b4c6666a864fb6a9.zip
riscv-tests-4590b79bc7241f3fa2424f96b4c6666a864fb6a9.tar.gz
riscv-tests-4590b79bc7241f3fa2424f96b4c6666a864fb6a9.tar.bz2
Debug: Use the --32 and --64 command line arguments (#97)
* Debug: Actually use the --32 and --64 command line arguments * debug: make XLEN mismatch message clearer
Diffstat (limited to 'debug/targets.py')
-rw-r--r--debug/targets.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/debug/targets.py b/debug/targets.py
index eb6862b..e92b593 100644
--- a/debug/targets.py
+++ b/debug/targets.py
@@ -180,5 +180,10 @@ def target(parsed):
t = found[0](parsed.target, parsed)
assert t.harts, "%s doesn't have any harts defined!" % t.name
+ for h in t.harts :
+ if (h.xlen == 0):
+ h.xlen = parsed.xlen
+ elif (h.xlen != parsed.xlen):
+ raise Exception("The target has an XLEN of %d, but the command line specified an XLEN of %d. They must match." % (h.xlen, parsed.xlen))
return t