[Libre-soc-dev] pysvp64asm: opcode setvli not supported

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Jun 15 13:56:27 BST 2021


Lauri, hi,

for these:
        # SUM8P2(sum, MACS, sum2, MLSS, w, w2, p)
        # sv.lfs/els fv0.v, 256(p)
        # sv.lfs/els fv1.v, 256(win)
        # sv.fmuls/mr sum, fv0.v, fv1.v

are you expecting  the benaviour to be:

for i in range(8):
   sum += fv0[i] * fv1[i]

because for that we need FMA (fp mul-and-acc):

    sv.fmadds/mr sum, fv0.v, fv1.v

and also i need to revert the change i just made to how scalar
mapreduce works whoops (0 .. VL-2 not 0 ... VL-1)

currently the behaviour is:

for i in range(8):
    sum = fv0[i] * fv1[i]

which, obviously, clearly, produces the wrong answer (overwriting
sum each time).

to temporarily get the right answer i believe it should be:

        # sv.fmuls fv0.v fv0.v, fv1.v
        # sv.fadds/mr sum, fv0.v, sum

of course, this is one extra instruction, and is exactly the reason we
are doing this study, so that things like this are found.

l.


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


More information about the Libre-soc-dev mailing list