quick debug session on FP div stub pipeline
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 28 Jun 2019 06:10:56 +0000 (07:10 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 28 Jun 2019 06:10:56 +0000 (07:10 +0100)
src/ieee754/fpdiv/div2.py
src/ieee754/fpdiv/pipeline.py
src/ieee754/fpdiv/test/test_fpdiv_pipe.py

index 7acb01b45e54bfb17bc5a8c56d49eb31b6e51ae7..051e87029222616cc45e1557c04de28a73fe9718 100644 (file)
@@ -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()
index 2cb53b90cc4bab51c37c5a851475c0a32d4c8ef3..7c130fae0539a48c235b331f70b8e3f451da0eb6 100644 (file)
@@ -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)
 
index 7f0e120ac61ba00d496fb708beeeb641f02ddafc..c1ad9732a6a451499c01db3db2885b81f55d538c 100644 (file)
@@ -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)