[Libre-soc-dev] FFT, DCT, REMAP

Luke Kenneth Casson Leighton lkcl at lkcl.net
Sun Jun 20 22:41:37 BST 2021

it occurred to me from looking at imdct36 in ffmpeg that the REMAP
facility may be able to autogenerate the array indices for FFT, both
inner and outer loops.

this code shows how simple the loops are:

in SVSTATE, srcstep can be used for the inner loop, dststep for the
outer while loop, and perhaps the offset field could be put to use as
a 3rd loop.

or: in theory with REMAP having 3 dimensions it should be possible to
use src/dststep for all three, the i j and the while loop, for a total
of up to 64 elements.

for longer than that, 2 dimensions could be used with a manual
external while loop.

the only fly in the ointment: there are *TWO* mul-accumulates, of
opposite sign.  SV was never designed for this scenario.

a workaround is to use the  OE flag on madd, fmadd and fmadds to
indicate that those operations should be modified suitably.

there is quite a bit involved here: the thing is that this is of very
high importance in computer science, so is worth paying attention to.

More information about the Libre-soc-dev mailing list