sort out hyperram ports down to test class
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 26 Mar 2022 21:20:15 +0000 (21:20 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 26 Mar 2022 21:20:15 +0000 (21:20 +0000)
lambdasoc/periph/hyperram.py

index 446e495032357cad9f835ad61e55607dbe93c188..02e3d5fdac86c207d90a08c0edd731aff22f8286 100644 (file)
@@ -94,6 +94,16 @@ class HyperRAMPads:
         self.cs_n = Signal()
         self.dq   = Record([("oe", 1), ("o", dw),     ("i", dw)])
         self.rwds = Record([("oe", 1), ("o", dw//8),  ("i", dw//8)])
+        self.dq.o.name = "dq_o"
+        self.dq.i.name = "dq_i"
+        self.dq.oe.name = "dq_oe"
+        self.rwds.o.name = "rwds_o"
+        self.rwds.i.name = "rwds_i"
+        self.rwds.oe.name = "rwds_oe"
+
+    def ports(self):
+        return [self.ck, self.cs, self.dq.o, self.dq.i, self.dq.oe,
+                self.rwds.o, self.rwds.oe]
 
 
 class HyperRAMPHY(Elaboratable):
@@ -114,8 +124,8 @@ class HyperRAMPHY(Elaboratable):
         return m
 
     def ports(self):
-        return [self.ck, self.cs, self.dq_o, self.dq_i, self.dq_oe,
-                self.rwds_o, self.rwds_oe]
+        return self.pads.ports()
+
 
 # HyperRAM --------------------------------------------------------------------