From 4967cd8b7d54f43c5a6bad44693a9c013ae68866 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 28 Jun 2019 07:03:00 +0100 Subject: [PATCH] put in TODO divstages list --- src/ieee754/fpdiv/divstages.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ieee754/fpdiv/divstages.py b/src/ieee754/fpdiv/divstages.py index 94c8a785..e1f8b113 100644 --- a/src/ieee754/fpdiv/divstages.py +++ b/src/ieee754/fpdiv/divstages.py @@ -16,6 +16,7 @@ from ieee754.fpcommon.postcalc import FPAddStage1Data # TODO: write these from .div0 import FPDivStage0Mod from .div1 import FPDivStage1Mod +from .div2 import FPDivStage2Mod class FPDivStages(FPState, SimpleHandshake): @@ -40,10 +41,12 @@ class FPDivStages(FPState, SimpleHandshake): # TODO. clearly, this would be a for-loop, here, creating # a huge number of stages (if radix-2 is used). interestingly # the number of stages will be data-dependent. - m0mod = FPDivStage0Mod(self.width, self.id_wid) - m1mod = FPDivStage1Mod(self.width, self.id_wid) + divstages = [FPDivStage0Mod(self.width, self.id_wid)] + for i in range(self.width): # XXX TODO: work out actual number needed + divstages.append(FPDivStage1Mod(self.width, self.id_wid)) + divstages.append(FPDivStage2Mod(self.width, self.id_wid)) - chain = StageChain([m0mod, m1mod]) + chain = StageChain(divstages) chain.setup(m, i) self.o = m1mod.o -- 2.30.2