[Libre-soc-bugs] [Bug 583] Implement simple VL for-loop in nMigen for TestIssuer

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Feb 12 15:14:53 GMT 2021


--- Comment #27 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Cesar Strauss from comment #25)

> It would be interesting to have a test case to test against, like the one
> you have on test_caller_svp64.py. Does the simulator already work on it?

does now.

commit 9078b2935beb4ba89dcd2af91bb5e3a0bcffbe71 (HEAD -> master, origin/master)
Author: Luke Kenneth Casson Leighton <lkcl at lkcl.net>
Date:   Fri Feb 12 14:41:48 2021 +0000

    add srcstep and correct PC-advancing during Sub-PC looping in ISACaller

i added 3 unit tests:

* one all vector
* one dest=scalar src1/2=vector
* one dest=vector src1=scalar src2=vector

strictly speaking for full coverage, QTY 8x tests are required.... per opcode!
that's going to be one hell of a lot of unit tests, particularly for 4-operand
instructions (QTY 16x for all permuations s/v s/v s/v s/v)

i just added this though:

commit 3a940211d59b532fb0b5d06890bbe1eb75cbcd4e (HEAD -> master)
Author: Luke Kenneth Casson Leighton <lkcl at lkcl.net>
Date:   Fri Feb 12 15:02:43 2021 +0000

    validate all registers to make sure no damage occurs in SVP64 ISACaller

that's to make sure that running SVP64 doesn't damage the regfile.

now you should be able to safely "compare" against the same tests, they have
to be done slightly differently.  note that you'll need to manually set up
SVSTATE.vl/mvl otherwise there's no loop.

if you can start a new test case class, in fu/alu/test/test_pipe_caller.py
SVP64ALUTestCase, and add the same 3 from decoder/isa/test_caller_svp64.py
you *should* be able to just call self.add_case() just remember to establish
the SVSTATE class instance just like in test_caller_svp64.py

now, the only thing is: the test_pipe_caller.py will *not work* with SVP64,
it's not designed to and not intended to.  test_pipe_caller.py is not
connected to regfiles, and it's only TestIssuer that has the decoding
of SVP64.

so maybe putting the unit tests in a different file, fu/alu/test/svp64_cases.py
is probably a good idea?

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list