From: Luke Kenneth Casson Leighton Date: Wed, 15 Jul 2020 13:42:39 +0000 (+0100) Subject: remove FPPipeContext (moved to nmutil), name-substitute on import X-Git-Tag: ls180-24jan2020~37 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0617970190acd31290ae256f2bb4daff14ea78f;p=ieee754fpu.git remove FPPipeContext (moved to nmutil), name-substitute on import see https://bugs.libre-soc.org/show_bug.cgi?id=431 --- diff --git a/src/ieee754/fpcommon/getop.py b/src/ieee754/fpcommon/getop.py index 294d6e49..e19bb22e 100644 --- a/src/ieee754/fpcommon/getop.py +++ b/src/ieee754/fpcommon/getop.py @@ -9,6 +9,7 @@ from math import log from ieee754.fpcommon.fpbase import FPOpIn, FPBase, FPNumBase from nmutil.singlepipe import PrevControl +from nmutil.concurrentunit import PipeContext as FPPipeContext from nmutil import nmoperator @@ -46,40 +47,6 @@ class FPNumBase2Ops: return [self.a, self.b, self.muxid] -class FPPipeContext: - - def __init__(self, pspec): - """ creates a pipeline context. currently: operator (op) and muxid - - opkls (within pspec) - the class to create that will be the - "operator". instance must have an "eq" - function. - """ - self.id_wid = pspec.id_wid - self.op_wid = pspec.op_wid - self.muxid = Signal(self.id_wid, reset_less=True) # RS multiplex ID - opkls = pspec.opkls - if opkls is None: - self.op = Signal(self.op_wid, reset_less=True) - else: - self.op = opkls(pspec) - - def eq(self, i): - ret = [self.muxid.eq(i.muxid)] - ret.append(self.op.eq(i.op)) - return ret - - def __iter__(self): - yield self.muxid - yield self.op - - def ports(self): - if hasattr(self.op, "ports"): - return [self.muxid] + self.op.ports() - else: - return list(self) - - class FPGet2OpMod(PrevControl): def __init__(self, width, id_wid, op_wid=None): PrevControl.__init__(self)