from ieee754.fpcommon.fpbase import FPNumBaseRecord
from ieee754.fpcommon.fpbase import FPState
from ieee754.fpcommon.denorm import FPSCData
-from .div0 import FPDivStage0Data
+from .div0 import FPDivStage0Data # TODO: replace with DivPipeCoreInterstageData
class FPDivStage1Mod(Elaboratable):
self.o = self.ospec()
def ispec(self):
+ # TODO: DivPipeCoreInterstageData, here
return FPDivStage0Data(self.width, self.pspec) # Q/Rem (etc) in...
def ospec(self):
+ # TODO: DivPipeCoreInterstageData, here
return FPDivStage0Data(self.width, self.pspec) # ... Q/Rem (etc) out
def process(self, i):
from ieee754.fpcommon.fpbase import FPState
from ieee754.fpcommon.postcalc import FPAddStage1Data
-from .div0 import FPDivStage0Data
+from .div0 import FPDivStage0Data # XXX TODO: replace
class FPDivStage2Mod(FPState, Elaboratable):
self.o = self.ospec()
def ispec(self):
+ # TODO: DivPipeCoreInterstageData
return FPDivStage0Data(self.width, self.pspec) # Q/Rem in...
def ospec(self):
+ # XXX REQUIRED. MUST NOT BE CHANGED. this is the format
+ # required for ongoing processing (normalisation, correction etc.)
return FPAddStage1Data(self.width, self.pspec) # out to post-process
def process(self, i):
self.m1o = self.ospec()
def ispec(self):
- if self.begin:
+ if self.begin: # TODO - this is for FPDivStage0Mod
+ # REQUIRED. do NOT change.
return FPSCData(self.width, self.pspec, False) # from denorm
+
+ if self.end: # TODO - this is for FPDivStage2Mod
+ # XXX TODO: replace with "intermediary" (DivPipeCoreInterstageData?)
+ return FPDivStage0Data(self.width, self.pspec) # DIV ispec (loop)
+
+ # TODO - this is for FPDivStage1Mod
+ # XXX TODO: replace with "intermediary" (DivPipeCoreInterstageData)
return FPDivStage0Data(self.width, self.pspec) # DIV ispec (loop)
def ospec(self):
- if self.end: # TODO
+ if self.begin: # TODO - this is for FPDivStage0Mod
+ # XXX TODO: replace with "intermediary" (DivPipeCoreInterstageData)
+ return FPDivStage0Data(self.width, self.pspec) # DIV ospec (loop)
+
+ if self.end: # TODO - this is for FPDivStage2Mod
+ # REQUIRED. do NOT change.
return FPAddStage1Data(self.width, self.pspec) # to post-norm
+
+ # TODO - this is for FPDivStage1Mod
+ # XXX TODO: replace with "intermediary" (DivPipeCoreInterstageData)
return FPDivStage0Data(self.width, self.pspec) # DIV ospec (loop)
def setup(self, m, i):