Fixed depth=4. Removed apmask from bpd and osd.

This commit is contained in:
Jordan Sherer
2020-05-02 22:31:45 -04:00
parent c8476b3308
commit eeffb13719
8 changed files with 58 additions and 101 deletions
+3 -7
View File
@@ -1,9 +1,9 @@
subroutine bpdecode174(llr,apmask,maxiterations,decoded,cw,nharderror,iter)
subroutine bpdecode174(llr,maxiterations,decoded,cw,nharderror,iter)
!
! A log-domain belief propagation decoder for the (174,87) code.
!
integer, parameter:: N=174, K=87, M=N-K
integer*1 codeword(N),cw(N),apmask(N)
integer*1 codeword(N),cw(N)
integer colorder(N)
integer*1 decoded(K)
integer Nm(7,M) ! 5, 6, or 7 bits per check
@@ -323,11 +323,7 @@ do iter=0,maxiterations
! Update bit log likelihood ratios (tov=0 in iteration 0).
do i=1,N
if( apmask(i) .ne. 1 ) then
zn(i)=llr(i)+sum(tov(1:ncw,i))
else
zn(i)=llr(i)
endif
zn(i)=llr(i)+sum(tov(1:ncw,i))
enddo
! Check to see if we have a codeword (check before we do any iteration).
+2 -6
View File
@@ -1,10 +1,9 @@
subroutine osd174(llr,apmask,ndeep,decoded,cw,nhardmin,dmin)
subroutine osd174(llr,ndeep,decoded,cw,nhardmin,dmin)
!
! An ordered-statistics decoder for the (174,87) code.
!
include "ldpc_174_87_params.f90"
integer*1 apmask(N),apmaskr(N)
integer*1 gen(K,N)
integer*1 genmrb(K,N),g2(N,K)
integer*1 temp(K),m0(K),me(K),mi(K),misub(K),e2sub(N-K),e2(N-K),ui(N-K)
@@ -37,7 +36,6 @@ endif
! Re-order received vector to place systematic msg bits at the end.
rx=llr(colorder+1)
apmaskr=apmask(colorder+1)
! Hard decisions on the received word.
hdec=0
@@ -90,7 +88,6 @@ hdec=hdec(indices) ! hard decisions from received symbols
m0=hdec(1:K) ! zero'th order message
absrx=absrx(indices)
rx=rx(indices)
apmaskr=apmaskr(indices)
call mrbencode(m0,c0,g2,N,K)
nxor=ieor(c0,hdec)
@@ -151,7 +148,6 @@ do iorder=1,nord
do n1=iflag,iend,-1
mi=misub
mi(n1)=1
if(any(iand(apmaskr(1:K),mi).eq.1)) cycle
ntotal=ntotal+1
me=ieor(m0,mi)
if(n1.eq.iflag) then
@@ -222,7 +218,7 @@ if(npre2.eq.1) then
mi=misub
mi(in1)=1
mi(in2)=1
if(sum(mi).lt.nord+npre1+npre2.or.any(iand(apmaskr(1:K),mi).eq.1)) cycle
if(sum(mi).lt.nord+npre1+npre2) cycle
me=ieor(m0,mi)
call mrbencode(me,ce,g2,N,K)
nxor=ieor(ce,hdec)