From e47839fad581624f248e13b05b2ca9d9975d2f95 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 28 Jun 2019 07:10:56 +0100 Subject: [PATCH] quick debug session on FP div stub pipeline --- src/ieee754/fpdiv/div2.py | 6 +++--- src/ieee754/fpdiv/pipeline.py | 4 ++-- src/ieee754/fpdiv/test/test_fpdiv_pipe.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ieee754/fpdiv/div2.py b/src/ieee754/fpdiv/div2.py index 7acb01b4..051e8702 100644 --- a/src/ieee754/fpdiv/div2.py +++ b/src/ieee754/fpdiv/div2.py @@ -11,7 +11,7 @@ from ieee754.fpcommon.postcalc import FPAddStage1Data from .div0 import FPDivStage0Data -class FPDivStage1Mod(FPState, Elaboratable): +class FPDivStage2Mod(FPState, Elaboratable): """ Second stage of div: preparation for normalisation. """ @@ -67,11 +67,11 @@ class FPDivStage1Mod(FPState, Elaboratable): return m -class FPDivStage1(FPState): +class FPDivStage2(FPState): def __init__(self, width, id_wid): FPState.__init__(self, "divider_1") - self.mod = FPDivStage1Mod(width) + self.mod = FPDivStage2Mod(width) self.out_z = FPNumBaseRecord(width, False) self.out_of = Overflow() self.norm_stb = Signal() diff --git a/src/ieee754/fpdiv/pipeline.py b/src/ieee754/fpdiv/pipeline.py index 2cb53b90..7c130fae 100644 --- a/src/ieee754/fpdiv/pipeline.py +++ b/src/ieee754/fpdiv/pipeline.py @@ -10,7 +10,7 @@ from ieee754.fpcommon.getop import FPADDBaseData from ieee754.fpcommon.denorm import FPSCData from ieee754.fpcommon.pack import FPPackData from ieee754.fpcommon.normtopack import FPNormToPack -from .specialcases import FPDivSpecialCasesDeNorm +from .specialcases import FPDIVSpecialCasesDeNorm from .divstages import FPDivStages @@ -18,7 +18,7 @@ from .divstages import FPDivStages class FPDIVBasePipe(ControlBase): def __init__(self, width, id_wid): ControlBase.__init__(self) - self.pipe1 = FPDivSpecialCasesDeNorm(width, id_wid) + self.pipe1 = FPDIVSpecialCasesDeNorm(width, id_wid) self.pipe2 = FPDivStages(width, id_wid) self.pipe3 = FPNormToPack(width, id_wid) diff --git a/src/ieee754/fpdiv/test/test_fpdiv_pipe.py b/src/ieee754/fpdiv/test/test_fpdiv_pipe.py index 7f0e120a..c1ad9732 100644 --- a/src/ieee754/fpdiv/test/test_fpdiv_pipe.py +++ b/src/ieee754/fpdiv/test/test_fpdiv_pipe.py @@ -5,7 +5,7 @@ from ieee754.fpdiv.pipeline import (FPDIVMuxInOut,) from ieee754.fpcommon.test.fpmux import runfp from sfpy import Float64, Float32, Float16 -from operator import div +from operator import truediv as div def test_pipe_fp16(): dut = FPDIVMuxInOut(16, 4) -- 2.30.2