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

Luke Kenneth Casson Leighton lkcl at lkcl.net
Thu Jul 25 16:57:39 BST 2019


On Thu, Jul 25, 2019 at 4:50 PM Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> On Thu, Jul 25, 2019, 08:44 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> wrote:
>
> > On Thu, Jul 25, 2019 at 4:34 PM Jacob Lifshay <programmerjake at gmail.com>
> > wrote:
> > >
> > > running all fpdiv/test/test_fp*.py tests, 30k random cases
> >
> >  i usually do that in test_fpdiv_pipe.py by putting a for-loop around
> > the 3 fns :)
> >
> >  really should sort this all out properly.
> >
> see test_core.py for some pattern-based test case generation (all bit
> patterns w << s with w in [0, 2^n) and the whole thing in [0, 2^m); also
> have all patterns with bits partitioned with all ones on one side and all
> zeros on the other)

yeh i like that.  an augmentation of that is to set random bits (as
well), and, also, to say _how many_ random bits are to be set.

one of the problems with just "random numbers" is, you get no coverage
of when (e.g.) FP32 e=-126.  likewise for the FPCVT int-to-fp.

sigh, really, we need formal proofs.  except, that needs to go under a
separate funding project, as it's going to be a looot.

l.



More information about the libre-riscv-dev mailing list