aboutsummaryrefslogtreecommitdiff
path: root/debug/targets.py
diff options
context:
space:
mode:
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