add load algebraic immediate unit test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 23 Aug 2020 20:57:10 +0000 (21:57 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 23 Aug 2020 20:57:18 +0000 (21:57 +0100)
libreriscv
src/soc/fu/ldst/test/test_pipe_caller.py

index 26c7e408f87f14a00e6e350da3e93d191ad90d75..1b3c9590a8878194b8df77c10d184f26f2670ee8 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 26c7e408f87f14a00e6e350da3e93d191ad90d75
+Subproject commit 1b3c9590a8878194b8df77c10d184f26f2670ee8
index dc32e9d69cff43567223980b7165500b2a8639aa..662b89d7b5bf40614a67ff423dcb21b77b566ef4 100644 (file)
@@ -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)
+