From d8177046a0809eb29241641c040eff81ead8a8de Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 8 Apr 2019 10:59:55 -0700 Subject: Test lack of abstract CSR access. (#187) --- debug/testlib.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'debug/testlib.py') 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 -- cgit v1.1