add Regspecs get_io_spec function
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 1 Dec 2021 11:53:27 +0000 (11:53 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 1 Dec 2021 11:53:27 +0000 (11:53 +0000)
src/soc/fu/regspec.py

index f6d90d9e35e1b7cced05fc36d073a8791241dab0..6804c593971fab5adcce20ddccaf797439a65e86 100644 (file)
@@ -65,6 +65,11 @@ class RegSpecAPI:
         """
         self.rwid = rwid
 
+    def get_io_spec(self, direction, i):
+        if direction: # input (read specs)
+            return self.get_in_spec(i)
+        return self.get_out_spec(i)
+
     def get_in_spec(self, i):
         return self.rwid[0][i]