Add port declarations to the SRAM wrappers
authorCesar Strauss <cestrauss@gmail.com>
Sat, 16 Apr 2022 17:33:04 +0000 (14:33 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Sat, 16 Apr 2022 17:33:04 +0000 (14:33 -0300)
src/soc/regfile/sram_wrapper.py

index 5a455b811e6371f9db1bf69bce54eb18bab3e1c2..297a935f6707036344c0504607a8791089cc964a 100644 (file)
@@ -340,6 +340,16 @@ class PhasedDualPortRegfile(Elaboratable):
 
         return m
 
+    def ports(self):
+        return [
+            self.wr_addr_i,
+            self.wr_data_i,
+            self.wr_we_i,
+            self.rd_addr_i,
+            self.rd_data_o,
+            self.phase
+        ]
+
 
 class PhasedDualPortRegfileTestCase(FHDLTestCase):
 
@@ -660,6 +670,15 @@ class DualPortRegfile(Elaboratable):
                                    == self.dbg_wrote_phase)
         return m
 
+    def ports(self):
+        return [
+            self.wr_addr_i,
+            self.wr_data_i,
+            self.wr_we_i,
+            self.rd_addr_i,
+            self.rd_data_o
+        ]
+
 
 class DualPortRegfileTestCase(FHDLTestCase):