reduce n_comb_stages for fpdiv first setup
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 23 Jul 2019 09:29:37 +0000 (10:29 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 23 Jul 2019 09:29:37 +0000 (10:29 +0100)
src/ieee754/fpdiv/pipeline.py

index 553af107ad680b04742c844caade7a69a17509fd..82a33e2cf8561d50978e38e82681f2f22d63a1bf 100644 (file)
@@ -87,15 +87,17 @@ class FPDIVBasePipe(ControlBase):
 
         # get number of stages, set up loop.
         n_stages = pspec.core_config.n_stages
-        n_comb_stages = self.pspec.n_comb_stages
+        max_n_comb_stages = self.pspec.n_comb_stages
         print ("n_stages", n_stages)
         stage_idx = 0
 
         end = False
         while not end:
 
+            n_comb_stages = max_n_comb_stages
             # needs to convert input from pipestart ospec
             if stage_idx == 0:
+                n_comb_stages -= 1
                 kls = FPDivStagesSetup # does n_comb_stages-1 calcs as well
 
             # needs to convert output to pipeend ispec