cores.litedram: add SDR DRAM type.
authorJean-François Nguyen <jf@lambdaconcept.com>
Fri, 29 Oct 2021 16:25:35 +0000 (18:25 +0200)
committerJean-François Nguyen <jf@lambdaconcept.com>
Fri, 29 Oct 2021 16:25:35 +0000 (18:25 +0200)
lambdasoc/cores/litedram.py

index 31a3a35e312c471feb4aab4ea399fa7c73936188..11c470015584ee538e807e227d0f597ce062d19a 100644 (file)
@@ -73,13 +73,15 @@ class Config(metaclass=ABCMeta):
             cmd_buffer_depth = 16,
             csr_data_width   = 32):
 
-        if memtype == "DDR2":
+        if memtype == "SDR":
+            rate = "1:1"
+        elif memtype in {"DDR", "LPDDR", "DDR2"}:
             rate = "1:2"
         elif memtype in {"DDR3", "DDR4"}:
             rate = "1:4"
         else:
-            raise ValueError("Unsupported DRAM type, must be one of \"DDR2\", \"DDR3\" or "
-                             "\"DDR4\", not {!r}"
+            raise ValueError("Unsupported DRAM type, must be one of \"SDR\", \"DDR\", \"LPDDR\", "
+                             "\"DDR2\", \"DDR3\" or \"DDR4\", not {!r}"
                              .format(memtype))
 
         if not isinstance(module_name, str):