fix attributes, sort out address
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 25 Mar 2022 17:37:03 +0000 (17:37 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 25 Mar 2022 17:37:03 +0000 (17:37 +0000)
lambdasoc/periph/hyperram.py

index e0d54bd7e694bb743b9453ddcf17af1af975f9c0..446e495032357cad9f835ad61e55607dbe93c188 100644 (file)
@@ -16,11 +16,11 @@ Usage example when wiring up an external pmod.
 use platform.add_extension to first define the pins:
 
     from nmigen.resources.memory import HyperRAMResources
-    hyperram_ios = HyperRAMResources(cs_n="B1",
+    hyperram_ios = HyperRAMResources(cs="B1",
                                      dq="D0 D1 D2 D3 D4 D7 D6 D7",
                                      rwds="B2", rst_n="B3", ck_p="B4",
-                                     attrs=IOStandard("LVCMOS33"))
-    self.platform.add_extension(hyperram_ios)
+                                     attrs=Attrs(IOSTANDARD="LVCMOS33"))
+    self.platform.add_resources(hyperram_ios)
     io = self.platform.request("hyperram")
 
 this trick will work with the 1-IC HyperRAM PMOD by Piotr Esden, sold
@@ -198,7 +198,6 @@ class HyperRAM(Peripheral, Elaboratable):
             ca[47].eq(~self.bus.we),          # R/W#
             ca[45].eq(1),                     # Burst Type (Linear)
             ca[16:45].eq(self.bus.adr[la:]),  # Row & Upper Column Address
-            ca[1:3].eq(self.bus.adr[0:2]),    # Lower Column Address
             ca[ashift:3].eq(bus.adr),         # Lower Column Address
         ]