From: Luke Kenneth Casson Leighton Date: Sun, 21 Jul 2019 15:03:46 +0000 (+0100) Subject: add preliminary DivPipeCalculateStage and DivPipeFinalStage X-Git-Tag: ls180-24jan2020~800 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9139fd9601e261f01eead8be349f73f91d8e7df;p=ieee754fpu.git add preliminary DivPipeCalculateStage and DivPipeFinalStage --- 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 +