From da9f217936910e61a370d8509645f827c00426ee Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 17 Aug 2019 05:24:38 +0100 Subject: [PATCH] rename fp div classes and submodule --- src/ieee754/fpdiv/div0.py | 4 ++-- src/ieee754/fpdiv/div2.py | 4 ++-- src/ieee754/fpdiv/divstages.py | 8 ++++---- src/ieee754/fpdiv/pipeline.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ieee754/fpdiv/div0.py b/src/ieee754/fpdiv/div0.py index 37583b0f..1ccc6e23 100644 --- a/src/ieee754/fpdiv/div0.py +++ b/src/ieee754/fpdiv/div0.py @@ -21,7 +21,7 @@ from ieee754.div_rem_sqrt_rsqrt.div_pipe import DivPipeInputData from ieee754.div_rem_sqrt_rsqrt.core import DivPipeCoreOperation as DPCOp -class FPDivStage0Mod(PipeModBase): +class FPDivPreFPAdjust(PipeModBase): """ DIV/SQRT/RSQRT "preparation" module. adjusts mantissa and exponent (sqrt/rsqrt exponent must be even), @@ -31,7 +31,7 @@ class FPDivStage0Mod(PipeModBase): no *actual* processing occurs here: it is *purely* preparation work. """ def __init__(self, pspec): - super().__init__(pspec, "div0") + super().__init__(pspec, "pre_fp_adjust") def ispec(self): return FPSCData(self.pspec, False) diff --git a/src/ieee754/fpdiv/div2.py b/src/ieee754/fpdiv/div2.py index 6cb1f5b3..d21ab848 100644 --- a/src/ieee754/fpdiv/div2.py +++ b/src/ieee754/fpdiv/div2.py @@ -17,7 +17,7 @@ from ieee754.fpcommon.postcalc import FPPostCalcData from ieee754.div_rem_sqrt_rsqrt.div_pipe import DivPipeOutputData -class FPDivStage2Mod(PipeModBase): +class FPDivPostToFPFormat(PipeModBase): """ Last stage of div: preparation for normalisation. NOTE: this phase does NOT do ACTUAL DIV processing, it ONLY @@ -25,7 +25,7 @@ class FPDivStage2Mod(PipeModBase): """ def __init__(self, pspec): - super().__init__(pspec, "div1") + super().__init__(pspec, "post_to_fp_fmt") def ispec(self): return DivPipeOutputData(self.pspec) # Q/Rem in... diff --git a/src/ieee754/fpdiv/divstages.py b/src/ieee754/fpdiv/divstages.py index d8807d10..ad1c8497 100644 --- a/src/ieee754/fpdiv/divstages.py +++ b/src/ieee754/fpdiv/divstages.py @@ -21,8 +21,8 @@ from ieee754.div_rem_sqrt_rsqrt.div_pipe import (DivPipeInterstageData, DivPipeCalculateStage, DivPipeFinalStage, ) -from ieee754.fpdiv.div0 import FPDivStage0Mod -from ieee754.fpdiv.div2 import FPDivStage2Mod +from ieee754.fpdiv.div0 import FPDivPreFPAdjust +from ieee754.fpdiv.div2 import FPDivPostToFPFormat class FPDivStagesSetup(PipeModBaseChain): @@ -43,7 +43,7 @@ class FPDivStagesSetup(PipeModBaseChain): divstages = [] # Converts from FPSCData into DivPipeInputData - divstages.append(FPDivStage0Mod(self.pspec)) + divstages.append(FPDivPreFPAdjust(self.pspec)) # does 1 "convert" (actual processing) from DivPipeInputData # into "intermediate" output (DivPipeInterstageData) @@ -109,6 +109,6 @@ class FPDivStagesFinal(PipeModBaseChain): # does conversion from DivPipeOutputData into FPPostCalcData format # so that post-normalisation and corrections can take over - divstages.append(FPDivStage2Mod(self.pspec)) + divstages.append(FPDivPostToFPFormat(self.pspec)) return divstages diff --git a/src/ieee754/fpdiv/pipeline.py b/src/ieee754/fpdiv/pipeline.py index 8b9e1086..6a9cf809 100644 --- a/src/ieee754/fpdiv/pipeline.py +++ b/src/ieee754/fpdiv/pipeline.py @@ -19,7 +19,7 @@ scnorm - FPDIVSpecialCasesDeNorm ispec FPBaseData pipediv0 - FPDivStagesSetup ispec FPSCData -------- ospec DivPipeInterstageData - StageChain: FPDivStage0Mod, + StageChain: FPDivPreFPAdjust, DivPipeSetupStage, DivPipeCalculateStage, ... @@ -41,7 +41,7 @@ pipediv5 - FPDivStageFinal ispec FPDivStage0Data ... DivPipeCalculateStage, DivPipeFinalStage, - FPDivStage2Mod + FPDivPostToFPFormat normpack - FPNormToPack ispec FPPostCalcData -------- ospec FPPackData -- 2.30.2