From 88620ab963030d1fe1950487b33e7d79e566e61b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 23 Aug 2020 21:57:10 +0100 Subject: [PATCH] add load algebraic immediate unit test --- libreriscv | 2 +- src/soc/fu/ldst/test/test_pipe_caller.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libreriscv b/libreriscv index 26c7e408..1b3c9590 160000 --- a/libreriscv +++ b/libreriscv @@ -1 +1 @@ -Subproject commit 26c7e408f87f14a00e6e350da3e93d191ad90d75 +Subproject commit 1b3c9590a8878194b8df77c10d184f26f2670ee8 diff --git a/src/soc/fu/ldst/test/test_pipe_caller.py b/src/soc/fu/ldst/test/test_pipe_caller.py index dc32e9d6..662b89d7 100644 --- a/src/soc/fu/ldst/test/test_pipe_caller.py +++ b/src/soc/fu/ldst/test/test_pipe_caller.py @@ -206,3 +206,15 @@ class LDSTTestCase(TestAccumulatorBase): self.add_case(Program(lst, bigendian), initial_regs, initial_mem=initial_mem) + def case_9_load_algebraic_4(self): + lst = ["lwa 3, 4(4)"] + initial_regs = [0] * 32 + initial_regs[1] = 0x5678 + initial_regs[4] = 0x0020 + initial_mem = {0x0000: (0x5432123412345678, 8), + 0x0008: (0xabcdef0187654321, 8), + 0x0020: (0xf000000f1234ffff, 8), + } + self.add_case(Program(lst, bigendian), initial_regs, + initial_mem=initial_mem) + -- 2.30.2