基于DSP的电力线载波OFDM调制解调器
//number of stage
n1=n2
n2>>=2 // distance between input datas
wa1=0
forj=0j<n2j+=2 //number of butterfies perstage
wb1=wa1+ie
wa2=wa1+wa1
wb2=wb1+wb1 //since heremost of the folow-
ering two instructions are parallel
wa3=wa2+wa1
wb3=wb2+wb1
coa1=wwa12+1
cob1=wwb12+1
sia1=wwa12
sib1=wwb12
coa2=wwa22+1
cob2=wwb22+1
sia2=wwa22
sib2=wwb22
coa3=wwa32+1
cob3=wwb32+1
sia3=wwa32
sib3=wwb32
wa1=wb1+ie
foria0=j ib0=j+1 ia0<n ia0+=n1 ib0+=n1
//loop of two butterflies caculation
ia1=ia0+n2
ib1=ib0+n2
ia2=ia1+n2
ib2=ib1+n2
ia3=ia2+n2
ib3=ib2+n2
ra1=x2ia0+x2ia2
rb1=x2ib0+x2ib2
ra1=x2ia0-x2ia2
rb1=x2ib0-x2ib2
ta=x2ia1+x2ia3
tb=x2ib1+x2ib3
x2ia0=ra1+ta // x2ia0
x2ib0=rb1+tb // x2ia0
ra1=ra1-ta
rb1=rb1-tb
sa1=x2ia0+1+x2ia2+1
sb1=x2ib0+1+x2ib2+1
sa2=x2ia0+1-x2ia2+1
sb2=x2ib0+1-x2ib2+1
ta=x2ia1+1+x2ia3+1
tb=x2ib1+1+x2ib3+1
x2ia0+1=sa1+ta
x2ib0+1=sb1+tb
sa1=sa1-ta
sb1=sb1-tb
x2ia2=ra1coa2+sa1sia2>>15
x2ib2=rb1cob2+sb2sib2 >>15
x2ia2+1=sa1coa2-ra1sia2 >>15
x2ib2+1=sb1cob2-rb1sib2 >>15
ta=x2ia1+1-x2ia3+1
ra1=ra2+ta
rb1=rb2+tb
ra2=ra2-ta
rb2=rb2-tb
ta=x2ia1-x2ia3
tb=x2ib1-x2ib3
sa1=sa2-ta
sb1=sb2-tb
sa2=sa2+ta
sb2=sb2+tb
x2ia1=ra1coa1+sa1sia1 >>15
x2ib1=rb1cob1+sb1sib1 >>15
x2ia1+1=sa1coa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