From 9b63fe6ac78ec26edba460ec933830535c78a2a3 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Tue, 12 Jun 2018 16:00:06 -0500 Subject: [PATCH] Fix a bug in ldpcsim144 so that nerrhisto.dat is calculated and printed. --- lib/ldpcsim144.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ldpcsim144.f90 b/lib/ldpcsim144.f90 index 66dbfbf0b..161991059 100644 --- a/lib/ldpcsim144.f90 +++ b/lib/ldpcsim144.f90 @@ -14,7 +14,7 @@ integer*1 i1hash(4) integer*1 msgbits(80) integer*4 i4Msg6BitWords(13) integer ihash -integer nerrtot(128),nerrdec(128) +integer nerrtot(0:128),nerrdec(0:128) real*8, allocatable :: lratio(:), rxdata(:), rxavgd(:) real, allocatable :: yy(:), llr(:) equivalence(ihash,i1hash) @@ -42,7 +42,7 @@ read(arg,*) s ! don't count hash bits as data bits N=128 -K=72 +K=80 rate=real(K)/real(N) write(*,*) "rate: ",rate @@ -167,7 +167,7 @@ do idb = -6, 14 enddo open(unit=23,file='nerrhisto.dat',status='unknown') -do i=1,128 +do i=0,128 write(23,'(i4,2x,i10,i10,f10.2)') i,nerrdec(i),nerrtot(i),real(nerrdec(i))/real(nerrtot(i)+1e-10) enddo close(23)