def __init__(self, width, id_wid):
self.width = width
self.id_wid = id_wid
- self.in_z = self.ispec()
+ self.i = self.ispec()
self.out_z = self.ospec()
def ispec(self):
def ospec(self):
return FPRoundData(self.width, self.id_wid)
- def setup(self, m, in_z):
+ def setup(self, m, i):
""" links module to inputs and outputs
"""
m.submodules.corrections = self
- m.d.comb += self.in_z.eq(in_z)
+ m.d.comb += self.i.eq(i)
def elaborate(self, platform):
m = Module()
- m.submodules.corr_in_z = self.in_z.z
+ m.submodules.corr_in_z = self.i.z
m.submodules.corr_out_z = self.out_z.z
- m.d.comb += self.out_z.eq(self.in_z)
- with m.If(self.in_z.z.is_denormalised):
- m.d.comb += self.out_z.z.e.eq(self.in_z.z.N127)
+ m.d.comb += self.out_z.eq(self.i)
+ with m.If(self.i.z.is_denormalised):
+ m.d.comb += self.out_z.z.e.eq(self.i.z.N127)
return m