add preliminary DivPipeCalculateStage and DivPipeFinalStage
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Jul 2019 15:03:46 +0000 (16:03 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Jul 2019 15:03:46 +0000 (16:03 +0100)
src/ieee754/div_rem_sqrt_rsqrt/div_pipe.py

index 24be906feab06917bf4f7e32a5aaef24ae5c81fe..325fceaa6b1af8fc09d9ca1cb854a5e6f2006491 100644 (file)
@@ -133,8 +133,29 @@ class DivPipeBaseStage:
 # FIXME: in DivPipeSetupStage.elaborate
 # DivPipeBaseStage._elaborate(self, m, platform)
 
-# FIXME: in DivPipeCalculateStage.elaborate
-# DivPipeBaseStage._elaborate(self, m, platform)
 
-# FIXME: in DivPipeFinalStage.elaborate
-# DivPipeBaseStage._elaborate(self, m, platform)
+class DivPipeCalculateStage(DivPipeBaseStage, DivPipeCoreCalculateStage):
+
+    def __init__(self, pspec, stage_index):
+        # XXX TODO: get core_config from pspec
+        DivPipeCoreCalculateStage.__init__(core_config, stage_index)
+        self.pspec = pspec
+
+    def elaborate(self, platform):
+        m = DivPipeCoreCalculateStage(platform) # XXX TODO: out_do_z logic!
+        self._elaborate(m, platform)
+        return m
+
+
+class DivPipeFinalStage(DivPipeBaseStage, DivPipeCoreFinalStage):
+
+    def __init__(self, pspec, stage_index):
+        # XXX TODO: get core_config from pspec
+        DivPipeCoreFinalStage.__init__(core_config, stage_index)
+        self.pspec = pspec
+
+    def elaborate(self, platform):
+        m = DivPipeCoreCalculateStage(platform) # XXX TODO: out_do_z logic!
+        self._elaborate(m, platform)
+        return m
+