code-shuffle on testing to prepare loading large files into memory
[soc.git] / src / soc / bus / test / test_minerva.py
index 02c83281612c992227a4b792db9524e6b2265cb4..780fcba73474b195bc22a59c8f9e2ab3f4543d8c 100644 (file)
@@ -38,7 +38,13 @@ class TestSRAMBareFetchUnit(BareFetchUnit):
     def __init__(self, pspec):
         super().__init__(pspec)
         # small 16-entry Memory
-        self.mem = Memory(width=self.data_wid, depth=32)
+        if (hasattr(pspec, "imem_test_depth") and
+            isinstance(pspec.imem_test_depth, int)):
+            depth = pspec.imem_test_depth
+        else:
+            depth = 32
+        print ("TestSRAMBareFetchUnit depth", depth)
+        self.mem = Memory(width=self.data_wid, depth=depth)
 
     def _get_memory(self):
         return self.mem