self.is_overflowed = Signal(reset_less=True)
self.is_denormalised = Signal(reset_less=True)
self.exp_128 = Signal(reset_less=True)
+ self.exp_gt_n126 = Signal(reset_less=True)
self.exp_gt127 = Signal(reset_less=True)
self.exp_n127 = Signal(reset_less=True)
self.exp_n126 = Signal(reset_less=True)
m.d.comb += self.is_overflowed.eq(self._is_overflowed())
m.d.comb += self.is_denormalised.eq(self._is_denormalised())
m.d.comb += self.exp_128.eq(self.e == self.P128)
+ m.d.comb += self.exp_gt_n126.eq(self.e > self.N126)
m.d.comb += self.exp_gt127.eq(self.e > self.P127)
m.d.comb += self.exp_n127.eq(self.e == self.N127)
m.d.comb += self.exp_n126.eq(self.e == self.N126)
m.submodules.norm1_out_z = self.out_z
m.d.comb += self.out_z.copy(self.in_z)
m.d.comb += self.out_of.copy(self.in_of)
- m.d.comb += self.out_norm.eq((self.in_z.m[-1] == 0) & \
- (self.in_z.e > self.in_z.N126))
+ m.d.comb += self.out_norm.eq((self.in_z.m_msbzero) & \
+ (self.in_z.exp_gt_n126))
with m.If(self.out_norm):
m.d.comb += [
self.out_z.e.eq(self.in_z.e - 1), # DECREASE exponent