out_op2.decode(self.i.b),
self.o.a.eq(out_op1),
self.o.b.eq(out_op2),
+ self.o.mid.eq(self.i.mid)
]
return m
with m.Else():
m.d.comb += self.out_do_z.eq(0)
+ m.d.comb += self.o.mid.eq(self.i.mid)
+
return m
"""
self.mod.setup(m, i, self.out_do_z)
m.d.sync += self.out_z.v.eq(self.mod.out_z.v) # only take the output
- m.d.sync += self.out_z.mid.eq(self.pmod.o.mid) # (and mid)
+ m.d.sync += self.out_z.mid.eq(self.mod.o.mid) # (and mid)
def action(self, m):
self.idsync(m)
with m.Else():
m.d.comb += self.o.b.m[-1].eq(1) # set top mantissa bit
+ m.d.comb += self.o.mid.eq(self.i.mid)
+
return m
self.o.a.eq(t_out),
self.o.a.s.eq(self.i.a.s), # whoops forgot sign
]
+
+ m.d.comb += self.o.mid.eq(self.i.mid)
+
return m
m.submodules.add0_in_b = self.i.b
m.submodules.add0_out_z = self.o.z
+ m.d.comb += self.o.mid.eq(self.i.mid)
m.d.comb += self.o.z.e.eq(self.i.a.e)
# store intermediate tests (and zero-extended mantissas)
#m.submodules.norm1_in_z = self.in_z
#m.submodules.norm1_out_z = self.out_z
m.d.comb += self.o.z.eq(self.i.z)
+ m.d.comb += self.o.mid.eq(self.i.mid)
# tot[-1] (MSB) gets set when the sum overflows. shift result down
with m.If(self.i.tot[-1]):
m.d.comb += [