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

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Jun 22 13:23:17 BST 2021


https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm#Data_reordering,_bit_reversal,_and_in-place_algorithms

from the above, the exact same algorithm is implemented in the fft.py code:

t ← ω A[k + j + m/2]
u ← A[k + j]
A[k + j] ← u + t
A[k + j + m/2] ← u – t

this can be done as a special fmac operation not normally accessible
to the main ISA:

def twinmac(RA, RB, RC):
    t = RA * RC
    u = RB
    return RA + t,
           RB - t

i.e. it is 3-in, 2-out *but* the registers are as follows:

RT1 = RT+dststep
RT2 = RT1+m/2

val1, val2 = twinmac(RA, RB, RC)

FPR[RT1] = val1
FPR[RT2] = val2

which is very cool because there is no need for a 5-operand
instruction (which is impossible) just overload the meaning of fmadd
with OE=1 to redirect to a different pipeline.

this should avoid the problems expected of the TestIssuer being a FSM.

l.



More information about the Libre-soc-dev mailing list