self.normalise_2(m, self.z, self.of, "round")
+class FPRound(FPState):
+
+ def action(self, m):
+ self.roundz(m, self.z, self.of, "corrections")
+
+
class FPADD(FPBase):
def __init__(self, width, single_cycle=False):
n2.set_inputs({"z": z, "of": of}) # XXX Z as output
n2.set_outputs({"z": z}) # XXX Z as output
+ rn = FPRound("corrections")
+ rn.set_inputs({"z": z, "of": of}) # XXX Z as output
+ rn.set_outputs({"z": z}) # XXX Z as output
+
with m.FSM() as fsm:
# ******
# rounding stage
with m.State("round"):
- self.roundz(m, z, of, "corrections")
+ rn.action(m)
# ******
# correction stage