[libre-riscv-dev] div/mod algorithm written in python

Luke Kenneth Casson Leighton lkcl at lkcl.net
Fri Jul 5 11:29:17 BST 2019


---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68

On Fri, Jul 5, 2019 at 11:18 AM Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> 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.

 no need - i've already set that up.  there is no need for you to
write any code to "set up" the pipeline, i've already written it.

 see FPDivStages.setup().

 now that the name(s) of the combinatorial stages exist
(DivPipeCoreInterstageData) i've added comments in all the locations
where they'll need importing.

 to reiterate: there is *no need* to write any code that creates
pipeline "chains", because i *already did it*.

l.



More information about the libre-riscv-dev mailing list