From a5d280990e7d258b76d2154c83ecae271511426c Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 31 Dec 2018 13:10:29 -0800 Subject: Add testing of run-test/idle cases. --- debug/testlib.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'debug/testlib.py') diff --git a/debug/testlib.py b/debug/testlib.py index 8fa0c43..a302cc6 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -56,13 +56,16 @@ def compile(args, xlen=32): # pylint: disable=redefined-builtin raise Exception("Compile failed!") 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): + isa=None, progbufsize=None, dmi_rti=None, abstract_rti=None): """Launch spike. Return tuple of its process and the port it's running on.""" self.process = None self.isa = isa self.progbufsize = progbufsize + self.dmi_rti = dmi_rti + self.abstract_rti = abstract_rti if target.harts: harts = target.harts @@ -124,6 +127,12 @@ class Spike(object): cmd += ["--progsize", str(self.progbufsize)] cmd += ["--debug-sba", "32"] + if not self.dmi_rti is None: + cmd += ["--dmi-rti", str(self.dmi_rti)] + + if not self.abstract_rti is None: + cmd += ["--abstract-rti", str(self.abstract_rti)] + assert len(set(t.ram for t in harts)) == 1, \ "All spike harts must have the same RAM layout" assert len(set(t.ram_size for t in harts)) == 1, \ -- cgit v1.1