From: Luke Kenneth Casson Leighton Date: Thu, 21 Mar 2019 21:09:46 +0000 (+0000) Subject: add ispec and ospec to NormToPack and FPRound X-Git-Tag: ls180-24jan2020~1546 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0568da0e26edd89698d05a2553ac04aa4159667;p=ieee754fpu.git add ispec and ospec to NormToPack and FPRound --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index c930e376..91dc8950 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -1251,8 +1251,15 @@ class FPNormToPack(FPState, FPID): def __init__(self, width, id_wid): FPID.__init__(self, id_wid) FPState.__init__(self, "normalise_1") + self.id_wid = id_wid self.width = width + def ispec(self): + return FPAddStage1Data(self.width, self.id_wid) # Norm1ModSingle ispec + + def ospec(self): + return FPPackData(self.width, self.id_wid) # FPPackMod ospec + def setup(self, m, i, in_mid): """ links module to inputs and outputs """ @@ -1334,7 +1341,13 @@ class FPRound(FPState, FPID): FPState.__init__(self, "round") FPID.__init__(self, id_wid) self.mod = FPRoundMod(width) - self.out_z = self.mod.ospec() + self.out_z = self.ospec() + + def ispec(self): + return self.mod.ispec() + + def ospec(self): + return self.mod.ospec() def setup(self, m, i, in_mid): """ links module to inputs and outputs