From 6a8c4b808133fbeb6ffebeb918eed17d65dcfe35 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 31 Jul 2019 01:27:30 +0100 Subject: [PATCH] use DynamicPipe instead of SimpleHandshake --- src/ieee754/fpadd/specialcases.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) 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" - - -- 2.30.2