split off CR0/XER production in DIV Function Unit into separate stage
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 30 Apr 2022 21:17:58 +0000 (22:17 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 30 Apr 2022 21:17:58 +0000 (22:17 +0100)
due to massive combinatorial chains

src/soc/fu/div/pipeline.py

index 56308942c1c02fb8ccca9d65acbf3563f8692caa..7fbbf10cfd812330d8db43ed975086aef680fb65 100644 (file)
@@ -45,9 +45,14 @@ class DivStagesEnd(PipeModBaseChain):
         else:
             core_final = ()
         div_out = DivOutputStage(self.pspec)
-        alu_out = DivMulOutputStage(self.pspec)
         self.div_out = div_out  # debugging - bug #425
-        return [*core_final, div_out, alu_out]
+        return [*core_final, div_out]
+
+
+class DivStagesFinalise(PipeModBaseChain):
+    def get_chain(self):
+        alu_out = DivMulOutputStage(self.pspec)
+        return [alu_out]
 
 
 class DivBasePipe(ControlBase):
@@ -66,9 +71,11 @@ class DivBasePipe(ControlBase):
             self.pipe_middles.append(
                 self.pspec.div_pipe_kind.config.core_stage_class(pspec))
         self.pipe_end = DivStagesEnd(pspec)
+        self.pipe_final = DivStagesFinalise(pspec)
         self._eqs = self.connect([self.pipe_start,
                                   *self.pipe_middles,
-                                  self.pipe_end])
+                                  self.pipe_end,
+                                  self.pipe_final])
 
     def elaborate(self, platform):
         m = ControlBase.elaborate(self, platform)