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

Luke Kenneth Casson Leighton lkcl at lkcl.net
Mon Jul 22 10:03:27 BST 2019


okaaay fiiiinally, after an hour of floundering about with syntax
errors, imports and config data, we have a DIV pipeline.

jacob can you take a look with  python3
ieee754/fpdiv/test/test_fpdiv_pipe.py and see what's going on?  i have
no idea how to calculate the number of stages needed, for example.

that's in FPDivBasePipe, however the configuration is established in
FPDivMuxInOut.

btw i removed... what was it... DivPipeBaseConfig?  pspec is the
top-level "thing" that gets passed around (as self.pspec), so i
created a DivPipeCoreConfig back in *FPDIVMuxInOut*, made it a member
of pspec (pspec.core_config), then, back in div_pipe.py (the "joiner"
between the pipeline API and DivPipeCore), passed in pspec.core_config
there:

class DivPipeInputData(DivPipeCoreInputData, DivPipeBaseData):
    def __init__(self, pspec):
        DivPipeCoreInputData.__init__(self, pspec.core_config)
        DivPipeBaseData.__init__(self, pspec)



More information about the libre-riscv-dev mailing list