worked out that DivPipeSpec can be given a default. gets DivFunctionUnit
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 18 Jul 2020 22:17:45 +0000 (23:17 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 18 Jul 2020 22:17:51 +0000 (23:17 +0100)
working again

src/soc/fu/div/pipe_data.py

index 000ac0a9abb0f9f3167a4c777fa6d9ddb7561955..3f721bca34e1ee9d79070e71ef85edbe8ba734fa 100644 (file)
@@ -129,7 +129,9 @@ class DivPipeKind(enum.Enum):
 
 
 class DivPipeSpec(CommonPipeSpec):
-    def __init__(self, id_wid, div_pipe_kind):
+    def __init__(self, id_wid, div_pipe_kind=None):
+        if div_pipe_kind is None:
+            div_pipe_kind = DivPipeKind.DivPipeCore
         super().__init__(id_wid=id_wid)
         self.div_pipe_kind = div_pipe_kind
         self.core_config = div_pipe_kind.config.core_config