From: Luke Kenneth Casson Leighton Date: Wed, 31 Jul 2019 00:27:30 +0000 (+0100) Subject: use DynamicPipe instead of SimpleHandshake X-Git-Tag: ls180-24jan2020~655 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a8c4b808133fbeb6ffebeb918eed17d65dcfe35;p=ieee754fpu.git use DynamicPipe instead of SimpleHandshake --- diff --git a/src/ieee754/fpadd/specialcases.py b/src/ieee754/fpadd/specialcases.py index e6e04fe9..3221e9cc 100644 --- a/src/ieee754/fpadd/specialcases.py +++ b/src/ieee754/fpadd/specialcases.py @@ -7,7 +7,8 @@ from nmigen.cli import main, verilog from math import log from ieee754.fpcommon.fpbase import FPNumDecode -from nmutil.singlepipe import SimpleHandshake, StageChain +from nmutil.singlepipe import StageChain +from ieee754.pipeline import DynamicPipe from ieee754.fpcommon.fpbase import FPState, FPID, FPNumBaseRecord from ieee754.fpcommon.getop import FPADDBaseData @@ -172,16 +173,15 @@ class FPAddSpecialCases(FPState): m.next = "denormalise" -class FPAddSpecialCasesDeNorm(FPState, SimpleHandshake): +class FPAddSpecialCasesDeNorm(DynamicPipe): """ special cases: NaNs, infs, zeros, denormalised NOTE: some of these are unique to add. see "Special Operations" https://steve.hollasch.net/cgindex/coding/ieeefloat.html """ def __init__(self, pspec): - FPState.__init__(self, "special_cases") self.pspec = pspec - SimpleHandshake.__init__(self, self) # pipe is its own stage + super().__init__(pspec) self.out = self.ospec() def ispec(self): @@ -207,12 +207,3 @@ class FPAddSpecialCasesDeNorm(FPState, SimpleHandshake): def process(self, i): return self.o - def action(self, m): - # for break-out (early-out) - #with m.If(self.out_do_z): - # m.next = "put_z" - #with m.Else(): - m.d.sync += self.out.eq(self.process(None)) - m.next = "align" - -