update comments
[ieee754fpu.git] / src / add / fpadd / specialcases.py
index 06321117da425a3e3f3734883c32f7f6c434945c..6f9d1a08575773c3e57139c480a1b8b84ed5b677 100644 (file)
@@ -7,7 +7,7 @@ from nmigen.cli import main, verilog
 from math import log
 
 from fpbase import FPNumDecode
-from singlepipe import UnbufferedPipeline, StageChain
+from singlepipe import SimpleHandshake, StageChain
 
 from fpbase import FPState, FPID
 from fpcommon.getop import FPADDBaseData
@@ -64,7 +64,7 @@ class FPAddSpecialCasesMod:
         m.d.comb += m_match.eq(a1.m == b1.m)
 
         e_match = Signal(reset_less=True)
-        m.d.comb += m_match.eq(a1.e == b1.e)
+        m.d.comb += e_match.eq(a1.e == b1.e)
 
         aeqmb = Signal(reset_less=True)
         m.d.comb += aeqmb.eq(s_nomatch & m_match & e_match)
@@ -176,7 +176,7 @@ class FPAddSpecialCases(FPState):
             m.next = "denormalise"
 
 
-class FPAddSpecialCasesDeNorm(FPState, UnbufferedPipeline):
+class FPAddSpecialCasesDeNorm(FPState, SimpleHandshake):
     """ special cases: NaNs, infs, zeros, denormalised
         NOTE: some of these are unique to add.  see "Special Operations"
         https://steve.hollasch.net/cgindex/coding/ieeefloat.html
@@ -186,7 +186,7 @@ class FPAddSpecialCasesDeNorm(FPState, UnbufferedPipeline):
         FPState.__init__(self, "special_cases")
         self.width = width
         self.id_wid = id_wid
-        UnbufferedPipeline.__init__(self, self) # pipe is its own stage
+        SimpleHandshake.__init__(self, self) # pipe is its own stage
         self.out = self.ospec()
 
     def ispec(self):