aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2019-04-08 10:59:55 -0700
committerGitHub <noreply@github.com>2019-04-08 10:59:55 -0700
commitd8177046a0809eb29241641c040eff81ead8a8de (patch)
tree71b9a53e6be40772891e35560440ba169210b175 /debug/testlib.py
parent74aecdcce266d2d7f73df415cb83b6e7816e0dc5 (diff)
downloadriscv-tests-d8177046a0809eb29241641c040eff81ead8a8de.zip
riscv-tests-d8177046a0809eb29241641c040eff81ead8a8de.tar.gz
riscv-tests-d8177046a0809eb29241641c040eff81ead8a8de.tar.bz2
Test lack of abstract CSR access. (#187)
Diffstat (limited to 'debug/testlib.py')
-rw-r--r--debug/testlib.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index b3163c3..d0383cb 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -59,7 +59,7 @@ class Spike(object):
# pylint: disable=too-many-instance-attributes
def __init__(self, target, halted=False, timeout=None, with_jtag_gdb=True,
isa=None, progbufsize=None, dmi_rti=None, abstract_rti=None,
- support_hasel=True):
+ support_hasel=True, support_abstract_csr=True):
"""Launch spike. Return tuple of its process and the port it's running
on."""
self.process = None
@@ -67,6 +67,7 @@ class Spike(object):
self.progbufsize = progbufsize
self.dmi_rti = dmi_rti
self.abstract_rti = abstract_rti
+ self.support_abstract_csr = support_abstract_csr
self.support_hasel = support_hasel
if target.harts:
@@ -135,6 +136,9 @@ class Spike(object):
if not self.abstract_rti is None:
cmd += ["--abstract-rti", str(self.abstract_rti)]
+ if not self.support_abstract_csr:
+ cmd.append("--debug-no-abstract-csr")
+
if not self.support_hasel:
cmd.append("--without-hasel")
@@ -790,7 +794,6 @@ class BaseTest(object):
self.hart = hart
else:
self.hart = random.choice(target.harts)
- self.hart = target.harts[-1] #<<<
self.server = None
self.target_process = None
self.binary = None