From 50cb750d7f20188be2230ccf0411470b1a187ad8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 15 Jul 2020 16:07:53 +0100 Subject: [PATCH] test privileged rfid call --- src/soc/config/endian.py | 2 +- src/soc/fu/trap/test/test_pipe_caller.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/soc/config/endian.py b/src/soc/config/endian.py index eb6e0c3f..0aaa61c2 100644 --- a/src/soc/config/endian.py +++ b/src/soc/config/endian.py @@ -1,5 +1,5 @@ global bigendian -bigendian = 0 +bigendian = 1 def set_endian_mode(mode): bigendian = mode diff --git a/src/soc/fu/trap/test/test_pipe_caller.py b/src/soc/fu/trap/test/test_pipe_caller.py index 75d2d48e..146708ed 100644 --- a/src/soc/fu/trap/test/test_pipe_caller.py +++ b/src/soc/fu/trap/test/test_pipe_caller.py @@ -143,6 +143,16 @@ class TrapTestCase(FHDLTestCase): msr = 1 << MSR.PR # set in "problem state" self.run_tst_program(Program(lst, bigendian), initial_regs, initial_msr=msr) + def test_7_rfid_priv_0(self): + lst = ["rfid"] + initial_regs = [0] * 32 + initial_regs[1] = 1 + initial_sprs = {'SRR0': 0x12345678, 'SRR1': 0x5678} + msr = 1 << MSR.PR # set in "problem state" + self.run_tst_program(Program(lst, bigendian), + initial_regs, initial_sprs, + initial_msr=msr) + def test_999_illegal(self): # ok, um this is a bit of a cheat: use an instruction we know # is not implemented by either ISACaller or the core -- 2.30.2