[libre-riscv-dev] daily kan-ban update, 22jul2020

Jacob Lifshay programmerjake at gmail.com
Thu Jul 23 18:06:24 BST 2020


On Thu, Jul 23, 2020, 09:42 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> On Thursday, July 23, 2020, Jacob Lifshay <programmerjake at gmail.com>
> wrote:
>
> > On Thu, Jul 23, 2020, 02:40 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> > wrote:
> >
> > > On Thursday, July 23, 2020, Luke Kenneth Casson Leighton <
> lkcl at lkcl.net>
> > > wrote:
> > >
> > > >
> > > >
> > > > On Thursday, July 23, 2020, Jacob Lifshay <programmerjake at gmail.com>
> > > > wrote:
> > > >
> > > >>
> > > >> SimOnly, I discovered that for test_divwuo_regression_1 (0xc4e32b68
> /
> > > >> 0x32867d69), the pipeline (SimOnly) is giving the correct results
> > > >> (rt=0x3), it's the ISA simulator code that's messed up
> > > >> (rt=0xFFFFFFFF).
> > > >
> > > >
> > > > please raise a bugreport for it.
> > > >
> > >
> > > saw it, thank you for doing that.
> > >
> > > these look great btw
> > >
> > >
> > >
> > > https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=
> > 78096b62db0345846cca70ab2f75f9c3519006c4
> >
> >
> > Thanks! I used the same list of test values as in
> > power-instruction-analyzer.
>
>
> i wondered if, like in the ieee754fp tests, if some random values could be
> added, too.
>

I specifically want the test cases to be reproducible for
power-instruction-analyzer, since the test results generated on a POWER9
cpu are checked into the repo for those who don't have a POWER9.

for soc, we can copy the test case generation logic from DivPipeCore's
tests in ieee754fpu since that covers waaay more cases (nicely
exponentially distributed too) but is also deterministic. it covers the
cases:
for all 0 <= a < 2^8 and 0 <= b < 64:
the case a << b if b < 64 - 8
and the case ~(a << b) if b < 64 - 8
and the case (1 << b) - 1
and the case ~((1 << b) - 1)

It might use a different value than 8 -- icr.

this covers all the corner cases I can think of, which random testing has a
very small chance of ever hitting (small enough that you'd need every
person on the planet to all run the test on the order of a billion times
each to hit the case once).

Jacob


More information about the libre-riscv-dev mailing list