spike = os.path.expandvars("$RISCV/bin/spike")
cmd = [spike]
if xlen == 32:
- cmd += ["--isa", "RV32"]
+ cmd += ["--isa", "RV32G"]
+ else:
+ cmd += ["--isa", "RV64G"]
if timeout:
cmd = ["timeout", str(timeout)] + cmd
+ cmd += ["-m0x10000000:0x10000000"]
+
if halted:
cmd.append('-H')
if with_jtag_gdb:
cmd += ['--rbb-port', '0']
os.environ['REMOTE_BITBANG_HOST'] = 'localhost'
- cmd.append("-m32")
cmd.append('programs/infinite_loop')
if binary:
cmd.append(binary)
global gdb_cmd # pylint: disable=global-statement
gdb_cmd = parsed.gdb
- todo = [("ExamineTarget", ExamineTarget)]
+ todo = []
+ if (parsed.misa):
+ self.target.misa = parsed.misa
+ else:
+ todo.append(("ExamineTarget", ExamineTarget))
+
for name in dir(module):
definition = getattr(module, name)
if type(definition) == type and hasattr(definition, 'test') and \
help="Run only tests that are named here.")
parser.add_argument("--gdb",
help="The command to use to start gdb.")
+ parser.add_argument("--misa", "-m",
+ help="Don't run ExamineTarget, just assume the misa which is specified.")
def header(title, dash='-'):
if title:
self.gdb.command(
"target extended-remote localhost:%d" % self.server.port)
- self.gdb.p("$priv=3")
+ # FIXME: OpenOCD doesn't handle PRIV now
+ #self.gdb.p("$priv=3")
def classTeardown(self):
del self.gdb