Add timer calls to FT4 decoder.

This commit is contained in:
Joe Taylor 2019-04-03 10:26:47 -04:00
parent 6ea9f4990d
commit 50d4120c0c

View File

@ -206,15 +206,19 @@ contains
fa=nfa fa=nfa
fb=nfb fb=nfb
call timer('getcand4',0)
call getcandidates4(iwave,fa,fb,syncmin,nfqso,maxcand,savg,candidate, & call getcandidates4(iwave,fa,fb,syncmin,nfqso,maxcand,savg,candidate, &
ncand,sbase) ncand,sbase)
call timer('getcand4',1)
ndecodes=0 ndecodes=0
dobigfft=.true. dobigfft=.true.
do icand=1,ncand do icand=1,ncand
f0=candidate(1,icand) f0=candidate(1,icand)
snr=candidate(3,icand)-1.0 snr=candidate(3,icand)-1.0
call timer('ft4_down',0)
call ft4_downsample(iwave,dobigfft,f0,cd2) !Downsample to 32 Sam/Sym call ft4_downsample(iwave,dobigfft,f0,cd2) !Downsample to 32 Sam/Sym
call timer('ft4_down',1)
if(dobigfft) dobigfft=.false. if(dobigfft) dobigfft=.false.
sum2=sum(cd2*conjg(cd2))/(real(NZZ)/real(NDOWN)) sum2=sum(cd2*conjg(cd2))/(real(NZZ)/real(NDOWN))
if(sum2.gt.0.0) cd2=cd2/sqrt(sum2) if(sum2.gt.0.0) cd2=cd2/sqrt(sum2)
@ -238,6 +242,7 @@ contains
ibest=-1 ibest=-1
smax=-99. smax=-99.
idfbest=0 idfbest=0
call timer('sync4d ',0)
do idf=idfmin,idfmax,idfstp do idf=idfmin,idfmax,idfstp
do istart=ibmin,ibmax,ibstp do istart=ibmin,ibmax,ibstp
call sync4d(cd2,istart,ctwk2(:,idf),1,sync) !Find sync power call sync4d(cd2,istart,ctwk2(:,idf),1,sync) !Find sync power
@ -248,15 +253,19 @@ contains
endif endif
enddo enddo
enddo enddo
call timer('sync4d ',1)
enddo enddo
f0=f0+real(idfbest) f0=f0+real(idfbest)
if( f0.le.10.0 .or. f0.ge.4990.0 ) cycle if( f0.le.10.0 .or. f0.ge.4990.0 ) cycle
! write(*,3002) smax,ibest/750.0,f0 ! write(*,3002) smax,ibest/750.0,f0
!3002 format('b',3f8.2) !3002 format('b',3f8.2)
call ft4_downsample(iwave,dobigfft,f0,cb) !Final downsample with corrected f0 call timer('ft4down ',0)
call ft4_downsample(iwave,dobigfft,f0,cb) !Final downsample, corrected f0
call timer('ft4down ',1)
sum2=sum(abs(cb)**2)/(real(NSS)*NN) sum2=sum(abs(cb)**2)/(real(NSS)*NN)
if(sum2.gt.0.0) cb=cb/sqrt(sum2) if(sum2.gt.0.0) cb=cb/sqrt(sum2)
cd=cb(ibest:ibest+NN*NSS-1) cd=cb(ibest:ibest+NN*NSS-1)
call timer('four2a ',0)
do k=1,NN do k=1,NN
i1=(k-1)*NSS i1=(k-1)*NSS
csymb=cd(i1:i1+NSS-1) csymb=cd(i1:i1+NSS-1)
@ -264,6 +273,7 @@ contains
cs(0:3,k)=csymb(1:4) cs(0:3,k)=csymb(1:4)
s4(0:3,k)=abs(csymb(1:4)) s4(0:3,k)=abs(csymb(1:4))
enddo enddo
call timer('four2a ',1)
! Sync quality check ! Sync quality check
is1=0 is1=0
@ -440,8 +450,10 @@ contains
endif endif
max_iterations=40 max_iterations=40
message77=0 message77=0
call timer('bpdec174',0)
call bpdecode174_91(llr,apmask,max_iterations,message77, & call bpdecode174_91(llr,apmask,max_iterations,message77, &
cw,nharderror,niterations) cw,nharderror,niterations)
call timer('bpdec174',1)
if(sum(message77).eq.0) cycle if(sum(message77).eq.0) cycle
if( nharderror.ge.0 ) then if( nharderror.ge.0 ) then
message77=mod(message77+rvec,2) ! remove rvec scrambling message77=mod(message77+rvec,2) ! remove rvec scrambling