From b9139fd9601e261f01eead8be349f73f91d8e7df Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 21 Jul 2019 16:03:46 +0100 Subject: [PATCH] add preliminary DivPipeCalculateStage and DivPipeFinalStage --- src/ieee754/div_rem_sqrt_rsqrt/div_pipe.py | 29 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/ieee754/div_rem_sqrt_rsqrt/div_pipe.py b/src/ieee754/div_rem_sqrt_rsqrt/div_pipe.py index 24be906f..325fceaa 100644 --- a/src/ieee754/div_rem_sqrt_rsqrt/div_pipe.py +++ b/src/ieee754/div_rem_sqrt_rsqrt/div_pipe.py @@ -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 + -- 2.30.2