+ def __init__(self, width):
+ self.in_a = FPNumBase(width)
+ self.in_b = FPNumBase(width)
+ self.out_z = FPNumOut(width, False)
+ self.out_do_z = Signal(reset_less=True)
+
+ def setup(self, m, in_a, in_b, out_z, out_do_z):
+ """ links module to inputs and outputs
+ """
+ m.d.comb += self.in_a.copy(in_a)
+ m.d.comb += self.in_b.copy(in_b)
+ m.d.comb += out_z.v.eq(self.out_z.v)
+ m.d.comb += out_do_z.eq(self.out_do_z)
+
+ def elaborate(self, platform):
+ m = Module()
+
+ m.submodules.sc_in_a = self.in_a
+ m.submodules.sc_in_b = self.in_b
+ m.submodules.sc_out_z = self.out_z
+