[libre-riscv-dev] div/mod algorithm written in python
Jacob Lifshay
programmerjake at gmail.com
Fri Jul 5 11:18:14 BST 2019
On Fri, Jul 5, 2019 at 3:14 AM Jacob Lifshay <programmerjake at gmail.com> wrote:
> Well, I wanted to use module-based classes to implement the div pipeline:
> stages = [DivPipeCoreSetupStage(core_config)]
> for stage_index in range(core_config.num_calcluate_stages):
> stages.append(DivPipeCoreCalculateStage(core_config, stage_index))
> stages.append(DivPipeCoreFinishStage(core_config))
> chain = StageChain(stages)
>
> now, there isn't any name I can use for the submodule in
> DivPipeCoreCalculateStage.setup(), since the next instance will
> interfere with it.
admittedly, I can use stage_index to generate a new name in setup(),
but if I had a slightly different design for a division-only pipeline,
it wouldn't need the stage_index to be passed in at all, since it
wouldn't be used anywhere in the implementation of
DivPipeCoreCalculateStage.
More information about the libre-riscv-dev
mailing list