From 9426fb21d599cafa9e9eb9d7da736e4c5689f0ad Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Wed, 1 Apr 2020 13:26:09 -0400 Subject: [PATCH] Combine initial stage with first cordic stage --- src/ieee754/cordic/sin_cos_pipeline.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ieee754/cordic/sin_cos_pipeline.py b/src/ieee754/cordic/sin_cos_pipeline.py index e8b3a6be..58d84e38 100644 --- a/src/ieee754/cordic/sin_cos_pipeline.py +++ b/src/ieee754/cordic/sin_cos_pipeline.py @@ -19,19 +19,19 @@ class CordicPipeChain(PipeModBaseChain): class CordicBasePipe(ControlBase): def __init__(self, pspec): ControlBase.__init__(self) - self.initstage = CordicPipeChain(pspec, - [CordicInitialStage(pspec)]) self.cordicstages = [] for i in range(pspec.iterations): - stage = CordicPipeChain(pspec, - [CordicStage(pspec, i)]) + if i == 0: + stages = [CordicInitialStage(pspec), CordicStage(pspec, i)] + else: + stages = [CordicStage(pspec, i)] + stage = CordicPipeChain(pspec, stages) self.cordicstages.append(stage) - self._eqs = self.connect([self.initstage] + self.cordicstages) + self._eqs = self.connect(self.cordicstages) def elaborate(self, platform): m = ControlBase.elaborate(self, platform) - m.submodules.init = self.initstage for i, stage in enumerate(self.cordicstages): setattr(m.submodules, "cordic%d" % i, stage) -- 2.30.2