├── .gitignore ├── LICENSE ├── NB_LDPC.c ├── README.md ├── bubble_decoder.c ├── channel.c ├── data └── .gitkeep ├── include ├── NB_LDPC.h ├── bubble_decoder.h ├── channel.h ├── init.h ├── struct.h ├── syndrome_decoder.h └── tools.h ├── init.c ├── makefile ├── matrices ├── Beidou │ └── BeiDou_NB_LDPC.pdf ├── KN │ ├── N1200_K600_GF64_BeiDou.txt │ ├── N128_K64_GF256.txt │ ├── N128_K64_GF256_L.txt │ ├── N144_K120_GF64.txt │ ├── N216_K144_GF64.txt │ ├── N2304_K1152_GF64.txt │ ├── N360_K120_GF256.txt │ ├── N360_K120_GF4096.txt │ ├── N360_K120_GF64.txt │ ├── N360_K120_GF64_ali.txt │ ├── N360_K240_GF64.txt │ ├── N432_K144_GF256.txt │ ├── N432_K144_GF64.txt │ ├── N512_K256_GF256.txt │ ├── N528_K264_GF64_BeiDou.txt │ ├── N572_K288_GF64_Beidou.txt │ ├── N576_K288_GF64.txt │ ├── N576_K480_GF256.txt │ ├── N576_K480_GF64.txt │ ├── N600_K480_GF64.txt │ ├── N64800_K48600_GF256.txt │ ├── N64800_K51840_GF256.txt │ ├── N720_K240_GF64.txt │ ├── N864_K720_GF64.txt │ ├── N882_K294_GF64.txt │ ├── N96_K48_GF256.txt │ ├── N96_K48_GF64.txt │ ├── N972_K486_GF64_BeiDou.txt │ └── readme.txt.txt ├── N1200_K600_GF64.txt ├── N528_K264_GF64.txt ├── N572_K288_GF64.txt ├── N972_K486_GF64.txt ├── NB_LDPC_matrix_format.md ├── alist.txt ├── alist2matrix_nb.m ├── alist_KN.txt ├── matrix.mat ├── matrix2alist_KN.m └── show_matrix.m ├── obj └── .gitkeep ├── start.sh └── tools.c /.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | # ignore files in the folder obj 3 | obj/* 4 | # but keep the folder 5 | !obj/.gitkeep 6 | # ignore files in the folder data 7 | data/* 8 | # but keep the folder 9 | !data/.gitkeep 10 | test.* 11 | 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2020, cedric marchand, Universite de Bretagne Sub, Lab-STICC 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /NB_LDPC.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * \file NB_LDPC.c 3 | * \brief Non-binary LDPC reduced complexity decoder with horizontal scheduling 4 | * \author C.Marchand, A. Al-Ghouwahel, Oussama Abassi, L. Conde-Canencia, A. abdmoulah, E. Boutillon 5 | * \copyright BSD copyright 6 | * \date 03/03/2015 7 | * \details 8 | 9 | Extended Min-Sum Decoder 10 | Horizontal Scheduling 11 | Layered decoder 12 | syndrome based architecture 13 | 14 | */ 15 | 16 | 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #include "./include/NB_LDPC.h" 25 | 26 | /// preprocessing directives 27 | 28 | 29 | /*! 30 | * \fn int main(int argc, char * argv[]) 31 | * \brief main program 32 | 33 | * Inputs 34 | * 35 | * NbMonteCarlo : # simulated frames 36 | * NbIterMax : # of maximum decoding iteration 37 | * FileMatrix : File name of the parity-check matrix 38 | * EbN : Eb/No (dB) 39 | * n_vc : size of truncated messages from Variable to Check 40 | * n_cv : size of truncated messages from Check to Variable 41 | * Offset : offset correction factor (0.4 -- 1) 42 | * NbOper : Maximum number of operations for sorting 43 | * Output 44 | * Frame Error Rate for the given simulation parameters 45 | * Input File : 'FileMatrix' is an ASCII file with the parity-check matrix description in aList format. 46 | * Output File : in ./data file 47 | * 48 | * 49 | under linux 50 | compile using make 51 | then Run the executable with the following parameters 52 | 53 | ./essai 2000 10 ./matrices/KN/N576_K480_GF64.txt 3.5 10 20 0.3 25 54 | 55 | giving 56 | 57 | <0> FER = 40/751 = 0.053262 BER = 520 / x = 0.001443 avr_it = 2.58 58 | 59 | */ 60 | int main(int argc, char * argv[]) 61 | { 62 | int k,l,n,iter,i,g; 63 | int **KBIN,*KSYMB,**NBIN,*NSYMB; 64 | int *decide,*CodeWord; 65 | int nb,NbIterMax; 66 | float EbN; 67 | int NbOper,NbMonteCarlo; 68 | float offset; 69 | char *FileName,*FileMatrix,*name; 70 | int synd=0, nbErrors, nbErroneousFrames = 0, nbUndetectedErrors = 0; 71 | int total_errors =0; 72 | 73 | code_t code; 74 | table_t table; 75 | decoder_t decoder; 76 | 77 | int node; 78 | 79 | int Idum=-1; // initialization of random generator 80 | srand(5); 81 | 82 | /* 83 | * Command line arguments 84 | */ 85 | if (argc < 8) 86 | { 87 | printf("File:\n %s\n ",argv[0]); 88 | printf(usage_txt); 89 | return (EXIT_FAILURE); 90 | } 91 | FileName = malloc(STR_MAXSIZE); 92 | FileMatrix = malloc(STR_MAXSIZE); 93 | name = malloc(STR_MAXSIZE); 94 | 95 | 96 | NbMonteCarlo = atoi(argv[1]); 97 | NbIterMax = atoi(argv[2]); 98 | strcpy(FileMatrix,argv[3]); 99 | EbN = atof(argv[4]); 100 | decoder.n_vc = atoi(argv[5]); 101 | decoder.n_cv = atoi(argv[6]); 102 | offset = atof(argv[7]); 103 | NbOper = atoi(argv[8]); 104 | printf(" Monte-Carlo simulation of Non-Binary LDPC decoder \n\n"); 105 | printf("Simulation parameters:\n"); 106 | printf("\n\t NbMonteCarlo : %d", NbMonteCarlo); 107 | printf("\n\t NbIterMax : %d", NbIterMax); 108 | printf("\n\t FileMatrix : %s", FileMatrix); 109 | printf("\n\t Eb/No (dB) : %g", EbN); 110 | printf("\n\t n_vc : %d", decoder.n_vc); 111 | printf("\n\t n_cv : %d", decoder.n_cv); 112 | printf("\n\t Offset : %g", offset); 113 | printf("\n\t NbOper : %d\n",NbOper); 114 | 115 | 116 | 117 | printf("Load code ... "); 118 | LoadCode (FileMatrix, &code); 119 | printf(" OK \n Load table ..."); 120 | LoadTables (&table, code.GF, code.logGF); 121 | printf("OK \n Allocate decoder ... "); 122 | AllocateDecoder (&code, &decoder); 123 | 124 | 125 | 126 | int tmp_dec; 127 | int tmp_GF; 128 | 129 | /* //only for Beidou 's matrices 130 | for (i=0; i code.rowDegree[node]) 196 | { 197 | dc_min = code.rowDegree[node]; 198 | } 199 | } 200 | if (dc_min != dc_max) 201 | { 202 | printf("d_c is not constant: dc_min= %d ; dc_max=%d !!!!!! \n", dc_min,dc_max); 203 | } 204 | 205 | 206 | int sum_it; 207 | 208 | 209 | // getchar(); 210 | 211 | softdata_t Mvc_temp[dc_max][code.GF]; 212 | softdata_t Mvc_temp2[dc_max][code.GF]; 213 | sum_it=0; 214 | 215 | 216 | for (nb=1; nb<=NbMonteCarlo; nb++) 217 | { 218 | /* Decoder re-initialization */ 219 | 220 | /* Generate uniformly distributed information bits (KBIN)) */ 221 | RandomBinaryGenerator (code.N, code.M, code.GF, code.logGF, KBIN, KSYMB, table.BINGF,&Idum); 222 | 223 | /* Encode the information bits KBIN to a (non binary) codeword NSYMB */ 224 | Encoding (&code, &table, CodeWord, NBIN, KSYMB); 225 | 226 | 227 | /* Noisy channel (AWGN)*/ 228 | ModelChannel_AWGN_BPSK (&code, &decoder, &table, NBIN, EbN,&Idum); 229 | // ModelChannel_AWGN_BPSK_repeat (&code, &decoder, &table, NBIN, EbN,&Idum); 230 | //ModelChannel_AWGN_64 (&code, &decoder, NBIN, EbN,&Idum); 231 | //ModelChannel(&code, &decoder, NBIN, EbN,&Idum); 232 | 233 | 234 | /***********************************************/ 235 | /* Implementation of the horizontal scheduling */ 236 | 237 | // init Mvc with intrinsic 238 | for (n=0; n FER= %d / %d = %f BER= %d / x = %f avr_it=%.2f", 344 | nbUndetectedErrors, nbErroneousFrames, nb,(double)(nbErroneousFrames)/ nb,total_errors,(double)total_errors/(nb*code.K*code.logGF),(double)(sum_it)/nb); 345 | fflush(stdout); 346 | } 347 | 348 | 349 | 350 | if (nbErroneousFrames == 40) 351 | break; 352 | 353 | 354 | 355 | } 356 | 357 | printf("\r<%d> FER= %d / %d = %f BER= %d / x = %f avr_it=%.2f", 358 | nbUndetectedErrors, nbErroneousFrames, nb,(double)(nbErroneousFrames)/ nb,total_errors,(double)total_errors/(nb*code.K*code.logGF),(double)(sum_it)/nb); 359 | 360 | printf(" \n results are printed in file %s \n",file_name); 361 | 362 | 363 | 364 | end_time = time(NULL); 365 | c_time_string = ctime(&end_time); 366 | exec_time = difftime(end_time,start_time); 367 | opfile=fopen(file_name,"a"); 368 | //opfile=fopen("./data/results.txt","a"); 369 | if ((opfile)==NULL) 370 | { 371 | printf(" \n !! file not found \n "); 372 | } 373 | else 374 | { 375 | fprintf(opfile," SNR:%.2f: \t FER= %d / %d = %f ", EbN, nbErroneousFrames, nb,(double)(nbErroneousFrames)/ nb ); 376 | fprintf(opfile," \t BER= %d / x = \t %f avr_it= \t %.2f \t time: %s",total_errors, (double)total_errors/(double)(nb*code.K*code.logGF),(double)(sum_it)/nb , c_time_string ); 377 | } 378 | fclose(opfile); 379 | printf(" \n results printed \n "); 380 | 381 | 382 | printf("\n"); 383 | printf("Simulation complete at time: %s", c_time_string); 384 | 385 | printf("execution time:%0.2f",exec_time); 386 | 387 | getchar(); 388 | 389 | free(FileName); 390 | free(FileMatrix); 391 | free(name); 392 | free(decide); 393 | free(CodeWord); 394 | free(KSYMB); 395 | free(NSYMB); 396 | 397 | for (n=0; n Set Programs' arguments 32 | 33 | > 2000 10 ./matrices/KN/N576_K480_GF64.txt 3.5 20 20 0.3 25 34 | 35 | ## Simulation on Linux 36 | 37 | compile the c code using the makefile 38 | 39 | > make 40 | 41 | then run with appropriate parameters 42 | 43 | > ./essai 2000 10 ./matrices/KN/N576_K480_GF64.txt 3.5 20 20 0.3 25 44 | 45 | you may use the start.sh shell script to run simulation for multiple snr 46 | 47 | > sh ./start.sh 48 | 49 | ## Simulation results 50 | 51 | > Monte-Carlo simulation of Non-Binary LDPC decoder 52 | > > 53 | > Simulation parameters: 54 | > 55 | > NbMonteCarlo : 2000 56 | > NbIterMax : 10 57 | > FileMatrix : ./matrices/KN/N576_K480_GF64.txt 58 | > Eb/No (dB) : 3.5 59 | > n_vc : 20 60 | > n_cv : 20 61 | > Offset : 0.3 62 | > NbOper : 25 63 | > 64 | > Normal alist format is used! 65 | > LDPC code parameters: 66 | > N :96 67 | > K :80 68 | > M :16 69 | > CR :0.833333 70 | > GF :64 71 | > logGF :6 72 | > 73 | > Note : FB30 74 | > Simulation started at time: Wed Jan 08 17:34:02 2020 75 | > 76 | > <0> FER= 40 / 751 = 0.053262 BER= 520 / x = 0.001443 avr_it=2.58 77 | > results are printed in file ./data/results_N96_CR0.83_GF64_IT10_Offset0.3_nm20_FB30.txt 78 | > 79 | > results printed 80 | > 81 | > Simulation complete at time: Wed Jan 08 17:34:08 2020 82 | 83 | -------------------------------------------------------------------------------- /bubble_decoder.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * \file bubble_decoder.c 3 | * \brief Check node based on bubbles 4 | * \author C.Marchand 5 | * \copyright BSD copyright 6 | * \date 03/03/2015 7 | */ 8 | 9 | #include 10 | #include 11 | #include "./include/syndrome_decoder.h" 12 | #include "./include/bubble_decoder.h" 13 | 14 | 15 | 16 | 17 | 18 | int maximum(float *Y, int nl) 19 | { 20 | 21 | float aux = 0.0; 22 | int pos = 0; 23 | int i; 24 | 25 | for (i=0; i aux) 28 | { 29 | aux = Y[i]; 30 | pos = i; 31 | } 32 | } 33 | 34 | return pos; 35 | 36 | } 37 | 38 | int minimum(float *Y, int nl) 39 | { 40 | 41 | float aux = 1e5; 42 | int pos = 0; 43 | int i; 44 | 45 | for (i=0; iVtoC 69 | * Outputs 70 | * - decoder->CtoV 71 | */ 72 | void CheckPassLogEMS (int node,decoder_t *decoder, code_t *code, table_t *table,int NbOper, float offset) 73 | { 74 | const int nbMax = decoder->n_vc; 75 | 76 | int t,k,g,kk,S,c,k1,Stp; 77 | int **MatriceInterIndice,*OutForwardIndice,*OutBackwardIndice,*OutForwardIndice1,*OutBackwardIndice1; 78 | float **MatriceInter,*OutForward,*OutBackward,*OutForward1,*OutBackward1; 79 | float LLR_tmp[code->GF]; 80 | 81 | 82 | 83 | //Temporary buffers (for the F/B recursivity) 84 | 85 | OutForward=(float *)calloc(nbMax,sizeof(float)); 86 | OutForwardIndice=(int *)calloc(nbMax,sizeof(int)); 87 | OutBackward=(float *)calloc(nbMax,sizeof(float)); 88 | OutBackwardIndice=(int *)calloc(nbMax,sizeof(int)); 89 | 90 | OutForward1=(float *)calloc(nbMax,sizeof(float)); 91 | OutForwardIndice1=(int *)calloc(nbMax,sizeof(int)); 92 | OutBackward1=(float *)calloc(nbMax,sizeof(float)); 93 | OutBackwardIndice1=(int *)calloc(nbMax,sizeof(int)); 94 | 95 | 96 | // Number of steps F/B = S 97 | S=2*(code->rowDegree[node]-2); 98 | 99 | // MatriceInter - store the results (reeal values) of the F/B recursivity 100 | MatriceInter=(float **)calloc(S,sizeof(float*)); 101 | for (k=0; krowDegree[node]; t++) 134 | { 135 | //printf("\n node=%d, coef=%d \n",node,code->matValue[node][t] ); 136 | for(k=0; k",decoder->M_VtoC_GF[t][k]); 139 | 140 | if (decoder->M_VtoC_GF[t][k]!=-1) 141 | { 142 | c=decoder->M_VtoC_GF[t][k]; 143 | 144 | // GF multiplication and output decimal 145 | c=table->MULDEC[c][code->matValue[node][t]]; 146 | 147 | decoder->M_VtoC_GF[t][k] =c; 148 | 149 | } 150 | else printf("M_VtoC_GF[%d][%d]=%d\n",t,k,decoder->M_VtoC_GF[t][k]); 151 | 152 | //printf(" %d ->",decoder->M_VtoC_GF[t][k]); 153 | 154 | } 155 | } 156 | 157 | 158 | 159 | //Initialisation algorithm 160 | for(k=0; kM_VtoC_LLR[0][k]; 163 | OutForwardIndice[k]=decoder->M_VtoC_GF[0][k]; 164 | OutBackward[k]=decoder->M_VtoC_LLR[code->rowDegree[node]-1][k]; 165 | OutBackwardIndice[k]=decoder->M_VtoC_GF[code->rowDegree[node]-1][k]; 166 | } 167 | 168 | // Start of the recusivity 169 | for(kk=1; kk<(code->rowDegree[node]-1); kk++) 170 | { 171 | 172 | 173 | for(k=0; kM_VtoC_LLR[kk][k]; 177 | OutForwardIndice1[k]=decoder->M_VtoC_GF[kk][k]; 178 | //backward step 179 | OutBackward1[k]=decoder->M_VtoC_LLR[code->rowDegree[node]-kk-1][k]; 180 | OutBackwardIndice1[k]=decoder-> M_VtoC_GF[code->rowDegree[node]-kk-1][k]; 181 | } 182 | 183 | for(k=0; krowDegree[node]-2)-kk][k]=OutBackward[k]; 189 | MatriceInterIndice[2*(code->rowDegree[node]-2)-kk][k]=OutBackwardIndice[k]; 190 | } 191 | 192 | //forward step 193 | //printf(" \n forward step %d \n",kk); 194 | if(kk<(code->rowDegree[node]-1)) 195 | ElementaryStep(OutForward,OutForward1,OutForwardIndice,OutForwardIndice1,OutForward,OutForwardIndice,table->ADDGF,code->GF,nbMax,NbOper); 196 | 197 | 198 | //backward step 199 | //printf(" \n backward step %d \n",kk); 200 | if(kk<(code->rowDegree[node]-1)) 201 | ElementaryStep(OutBackward,OutBackward1,OutBackwardIndice,OutBackwardIndice1,OutBackward,OutBackwardIndice,table->ADDGF,code->GF,nbMax,NbOper); 202 | 203 | } 204 | 205 | 206 | //Update of vectors CtoV (first and last) 207 | for(k=0; kM_CtoV_LLR[code->rowDegree[node]-1][k]=OutForward[k]; 211 | decoder->M_CtoV_GF[code->rowDegree[node]-1][k]=OutForwardIndice[k]; 212 | // first vector M_CtoV_LLR 213 | decoder->M_CtoV_LLR[0][k]=OutBackward[k]; 214 | decoder->M_CtoV_GF[0][k]=OutBackwardIndice[k]; 215 | 216 | } 217 | 218 | //printf("\n merge \n"); 219 | //Update of the others vectors CtoV 220 | for(k=0; k<(code->rowDegree[node]-2); k++) 221 | { 222 | 223 | 224 | ElementaryStep(MatriceInter[k],MatriceInter[(code->rowDegree[node]-2)+k],MatriceInterIndice[k],MatriceInterIndice[(code->rowDegree[node]-2) +k],OutForward,OutForwardIndice,table->ADDGF,code->GF,nbMax,NbOper); 225 | for(g=0; gM_CtoV_LLR[k+1][g]=OutForward[g]; 228 | decoder->M_CtoV_GF[k+1][g]=OutForwardIndice[g]; 229 | } 230 | } 231 | 232 | 233 | //Rotation par la valeur non nulle dans la matrice pour CtoV 234 | for(t=0; trowDegree[node]; t++) 235 | { 236 | for(k=0; kM_CtoV_GF[t][k]== -1) 240 | { 241 | Stp=k; 242 | break; 243 | } 244 | else 245 | Stp=nbMax; 246 | } 247 | 248 | // back to GF symbol and devise 249 | for(k=0; kM_CtoV_GF[t][k]=table->DIVGF[decoder->M_CtoV_GF[t][k]][code->matValue[node][t]]; 252 | decoder->M_CtoV_GF[t][k]=table->DIVDEC[decoder->M_CtoV_GF[t][k]][code->matValue[node][t]]; 253 | } 254 | 255 | /// reorder in GF order and add offset 256 | //printf("sat=%0.3f \n", decoder->M_CtoV_LLR[t][Stp-1] + offset ); 257 | //getchar(); 258 | 259 | 260 | for(k=0; kGF; k++) 261 | { 262 | LLR_tmp[k] = decoder->M_CtoV_LLR[t][Stp-1] + offset; 263 | } 264 | 265 | for(k=0; kM_CtoV_GF[t][k]]= decoder->M_CtoV_LLR[t][k]; 268 | } 269 | 270 | 271 | 272 | for(k=0; kGF; k++) 273 | { 274 | decoder->M_CtoV_GF[t][k] = k; 275 | decoder->M_CtoV_LLR[t][k] = LLR_tmp[k]; 276 | } 277 | 278 | 279 | } 280 | 281 | // for(g=0; gGF; g++) 282 | // { 283 | // printf(" GF=%d, LLR=%0.2f \t GF=%d, LLR=%0.2f \t GF=%d, LLR=%0.2f \n",decoder->M_CtoV_GF[0][g],decoder->M_CtoV_LLR[0][g] , 284 | // decoder->M_CtoV_GF[1][g],decoder->M_CtoV_LLR[1][g],decoder->M_CtoV_GF[2][g],decoder->M_CtoV_LLR[2][g]); 285 | // } 286 | // getchar(); 287 | 288 | 289 | 290 | for (k=0; kVtoC 316 | * Outputs 317 | * - decoder->CtoV 318 | */ 319 | void CheckPassLogEMS_dc3 (int node,decoder_t *decoder, code_t *code, table_t *table,int NbOper, float offset) 320 | { 321 | const int n_vc = decoder->n_vc; 322 | const int n_cv = decoder->n_cv; 323 | int t,c,k,Stp,g; 324 | float LLR_tmp[code->GF]; 325 | 326 | //Rotation par la valeur non nulle dans la matrice pour VtoC 327 | for(t=0; trowDegree[node]; t++) 328 | { 329 | //printf("\n node=%d, coef=%d \n",node,code->matValue[node][t] ); 330 | for(k=0; k",decoder->M_VtoC_GF[t][k]); 333 | if (decoder->M_VtoC_GF[t][k]!=-1) 334 | { 335 | c=decoder->M_VtoC_GF[t][k]; 336 | // GF multiplication and output decimal 337 | c=table->MULDEC[c][code->matValue[node][t]]; 338 | decoder->M_VtoC_GF[t][k] =c; 339 | } 340 | else printf("M_VtoC_GF[%d][%d]=%d\n",t,k,decoder->M_VtoC_GF[t][k]); 341 | //printf(" %d ->",decoder->M_VtoC_GF[t][k]); 342 | } 343 | } 344 | 345 | 346 | // printf("print m_vc: \n"); 347 | // for(g=0; gM_VtoC_GF[0][g],decoder->M_VtoC_LLR[0][g] , 350 | // decoder->M_VtoC_GF[1][g],decoder->M_VtoC_LLR[1][g],decoder->M_VtoC_GF[2][g],decoder->M_VtoC_LLR[2][g]); 351 | // } 352 | // getchar(); 353 | 354 | 355 | ElementaryStep_nm(decoder->M_VtoC_LLR[0],decoder->M_VtoC_LLR[1],decoder->M_VtoC_GF[0],decoder->M_VtoC_GF[1],decoder->M_CtoV_LLR[2],decoder->M_CtoV_GF[2],table->ADDGF,code->GF,n_vc,n_vc,n_cv,NbOper); // forward 356 | ElementaryStep_nm(decoder->M_VtoC_LLR[1],decoder->M_VtoC_LLR[2],decoder->M_VtoC_GF[1],decoder->M_VtoC_GF[2],decoder->M_CtoV_LLR[0],decoder->M_CtoV_GF[0],table->ADDGF,code->GF,n_vc,n_vc,n_cv,NbOper); // backward 357 | ElementaryStep_nm(decoder->M_VtoC_LLR[0],decoder->M_VtoC_LLR[2],decoder->M_VtoC_GF[0],decoder->M_VtoC_GF[2],decoder->M_CtoV_LLR[1],decoder->M_CtoV_GF[1],table->ADDGF,code->GF,n_vc,n_vc,n_cv,NbOper); // merge 358 | 359 | // printf("print m_cv: \n"); 360 | // for(g=0; gM_CtoV_GF[0][g],decoder->M_CtoV_LLR[0][g] , 363 | // decoder->M_CtoV_GF[1][g],decoder->M_CtoV_LLR[1][g],decoder->M_CtoV_GF[2][g],decoder->M_CtoV_LLR[2][g]); 364 | // } 365 | // getchar(); 366 | 367 | 368 | //Rotation par la valeur non nulle dans la matrice pour CtoV 369 | for(t=0; trowDegree[node]; t++) 370 | { 371 | for(k=0; kM_CtoV_GF[t][k]== -1) 375 | { 376 | Stp=k; 377 | break; 378 | } 379 | else 380 | Stp=n_cv; 381 | } 382 | 383 | // back to GF symbol and devise 384 | for(k=0; kM_CtoV_GF[t][k]=table->DIVGF[decoder->M_CtoV_GF[t][k]][code->matValue[node][t]]; 387 | decoder->M_CtoV_GF[t][k]=table->DIVDEC[decoder->M_CtoV_GF[t][k]][code->matValue[node][t]]; 388 | 389 | } 390 | 391 | 392 | 393 | /// reorder in GF order and add offset 394 | //printf("sat=%0.3f \n", decoder->M_CtoV_LLR[t][Stp-1] + offset ); 395 | //getchar(); 396 | 397 | 398 | for(k=0; kGF; k++) 399 | { 400 | LLR_tmp[k] = decoder->M_CtoV_LLR[t][Stp-1] + offset; 401 | } 402 | 403 | for(k=0; kM_CtoV_GF[t][k]]= decoder->M_CtoV_LLR[t][k]; 406 | } 407 | 408 | 409 | for(k=0; kGF; k++) 410 | { 411 | decoder->M_CtoV_GF[t][k] = k; 412 | decoder->M_CtoV_LLR[t][k] = LLR_tmp[k]; 413 | } 414 | 415 | } 416 | 417 | // for(g=0; gGF; g++) 418 | // { 419 | // printf(" GF=%d, LLR=%0.2f \t GF=%d, LLR=%0.2f \t GF=%d, LLR=%0.2f \n",decoder->M_CtoV_GF[0][g],decoder->M_CtoV_LLR[0][g] , 420 | // decoder->M_CtoV_GF[1][g],decoder->M_CtoV_LLR[1][g],decoder->M_CtoV_GF[2][g],decoder->M_CtoV_LLR[2][g]); 421 | // } 422 | // getchar(); 423 | 424 | 425 | } 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | /** 436 | * \fn ElementaryStep with x bubbles 437 | * \brief Elementary bubble check 438 | */ 439 | int ElementaryStep(float *Input1,float *Input2,int *IndiceInput1,int *IndiceInput2,float *Output,int *IndiceOut,int **ADDGF,int GF,int nbMax,int nbOper) 440 | { 441 | 442 | int nmU = nbMax; 443 | int nmV = nbMax; 444 | int nmS = nbMax; 445 | 446 | float loc_Output[nbMax]; 447 | int loc_IndiceOut[nbMax]; 448 | 449 | int i,j, s, ss, Indice_aux=0; 450 | int nb_bubble=8; 451 | 452 | int pos; 453 | 454 | float tab_aux[nbMax][nbMax]; 455 | 456 | float tab_comp[3][nb_bubble]; 457 | int GFvalues_already_in_Out[GF]; 458 | 459 | //int debug = 0; 460 | 461 | 462 | // printf("\n GF in 1 \n"); 463 | // for(i=0;i>1; j++) 510 | { 511 | for (i=0; i< nmU; i++) 512 | { 513 | tab_aux[i][j] = Input1[i]+Input2[j]; //min-sum algorithm 514 | 515 | // // min-max algorithm 516 | // if (Input1[i]>Input2[j]) 517 | // { 518 | // tab_aux[i][j] = Input1[i]; 519 | // } 520 | // else 521 | // { 522 | // tab_aux[i][j] = Input2[j]; 523 | // } 524 | 525 | 526 | 527 | 528 | } 529 | } 530 | // vertical 531 | for (i=0; i>1; i++) 532 | { 533 | for (j=nb_bubble>>1; jInput2[j]) 539 | // { 540 | // tab_aux[i][j] = Input1[i]; 541 | // } 542 | // else 543 | // { 544 | // tab_aux[i][j] = Input2[j]; 545 | // } 546 | } 547 | } 548 | 549 | 550 | //printf(" nbmax=%d \n",nbMax); 551 | // for (i=0; i= nmU-1)||(tab_comp[2][pos]>=nmV-1)) 633 | { 634 | 635 | 636 | // printf("\n\n out of bounds pos=%d, tab_aux: x=%d, y=%d , candidate=%d, output number=%d \n",pos,(int)(tab_comp[1][pos]),(int)(tab_comp[2][pos]),ss,s ); 637 | 638 | // for(i=0;i nb_bubble/2-1) 675 | { 676 | tab_comp[1][pos]=tab_comp[1][pos] + 1; 677 | } 678 | else 679 | { 680 | tab_comp[2][pos]=tab_comp[2][pos] + 1; 681 | } 682 | 683 | tab_comp[0][pos]= tab_aux[(int)tab_comp[1][pos]][(int)tab_comp[2][pos]]; 684 | 685 | 686 | 687 | 688 | } 689 | 690 | for(i=0; i>1; j++) 762 | { 763 | for (i=0; i< nmU; i++) 764 | { 765 | tab_aux[i][j] = Input1[i]+Input2[j]; //min-sum algorithm 766 | 767 | // // min-max algorithm 768 | // if (Input1[i]>Input2[j]) 769 | // { 770 | // tab_aux[i][j] = Input1[i]; 771 | // } 772 | // else 773 | // { 774 | // tab_aux[i][j] = Input2[j]; 775 | // } 776 | } 777 | tab_aux[i][j]= 100; 778 | } 779 | // vertical 780 | for (i=0; i>1; i++) 781 | { 782 | for (j=nb_bubble>>1; jInput2[j]) 787 | // { 788 | // tab_aux[i][j] = Input1[i]; 789 | // } 790 | // else 791 | // { 792 | // tab_aux[i][j] = Input2[j]; 793 | // } 794 | } 795 | tab_aux[i][j]= 100; 796 | } 797 | 798 | 799 | // printf(" nmU=%d \n",nmU,nmV); 800 | // for (i=0; i= nmU-1)||(tab_comp[2][pos]>=nmV-1)) 881 | // { 882 | // printf("\n\n out of bounds pos=%d, tab_aux: x=%d, y=%d , candidate=%d, output number=%d \n",pos,(int)(tab_comp[1][pos]),(int)(tab_comp[2][pos]),ss,s ); 883 | // //break; 884 | // } 885 | 886 | 887 | 888 | // update tab_comp with next value from tab_aux 889 | 890 | if (pos > nb_bubble/2-1) 891 | { 892 | tab_comp[1][pos]=tab_comp[1][pos] + 1; 893 | } 894 | else 895 | { 896 | tab_comp[2][pos]=tab_comp[2][pos] + 1; 897 | } 898 | 899 | tab_comp[0][pos]= tab_aux[(int)tab_comp[1][pos]][(int)tab_comp[2][pos]]; 900 | 901 | 902 | } 903 | 904 | for(i=0; i 12 | #include "./include/struct.h" 13 | #include "./include/init.h" 14 | #include "./include/tools.h" 15 | #include "./include/channel.h" 16 | 17 | 18 | 19 | #define APSK 20 | //#define QAM 21 | //#define QAM_R //rotated QAM 22 | 23 | //#define rayleigh_fading 24 | //#define rayleigh_fading_SSD 25 | //#define erasure 26 | 27 | /*! 28 | * \fn void ModelChannel_AWGN_BPSK (code_t *code, decoder_t *decoder, table_t *table, int **NBIN, float EbN,int *init_rand) 29 | * \brief BPSK modulation + AWGN noise on the codeword. 30 | * The function computes the intrinsic_LLRs corresponding to the noisy observations. 31 | * Inputs 32 | * - NBIN : Binary copy of the codeword 33 | * - EbN : Signal to noise ratio in terms of Eb/No (dB) 34 | * Outputs 35 | * - decoder->intrinsic_LLR 36 | */ 37 | void ModelChannel_AWGN_BPSK (code_t *code, decoder_t *decoder, table_t *table, int **NBIN, float EbN,int *init_rand) 38 | { 39 | const int N = code->N; 40 | const int logGF = code->logGF; 41 | int n,k,g,q; 42 | float u,v,sigma; 43 | float TMP[4096]; 44 | 45 | float **NoisyBin = calloc(N,sizeof(float *)); 46 | for (n=0; nrate*pow(10,EbN/10.0))); // considering EbNo 51 | //sigma = sqrt(1.0/(2*pow(10,EbN/10.0))); // considering SNR 52 | for (n=0; nGF; g++) 74 | { 75 | TMP[g]=0.0; 76 | for (q=0; qBINGF[g][q]))/(2.0*SQR(sigma)); 79 | TMP[g] = TMP[g] - NoisyBin[n][q]*BPSK(table->BINGF[g][q]); 80 | } 81 | 82 | } 83 | 84 | for(k=0; kGF; k++) 85 | { 86 | // decoder->intrinsic_LLR[n][k] = +1e5; 87 | // decoder->intrinsic_GF[n][k] = -1; 88 | // for (g=0; gGF; g++) 89 | // { 90 | // if (TMP[g] < decoder->intrinsic_LLR[n][k]) 91 | // { 92 | // decoder->intrinsic_LLR[n][k] = TMP[g]; 93 | // decoder->intrinsic_GF[n][k] = g; 94 | // } 95 | // } 96 | // TMP[decoder->intrinsic_GF[n][k]] = +1e5; 97 | 98 | 99 | decoder->intrinsic_LLR[n][k] = TMP[k]; 100 | } 101 | 102 | 103 | } 104 | 105 | for (n=0; nN; 117 | const int logGF = code->logGF; 118 | int n,k,g,q; 119 | float u,v,sigma; 120 | float TMP[4096]; 121 | 122 | float **NoisyBin = calloc(N,sizeof(float *)); 123 | for (n=0; nrate*pow(10,EbN/10.0))); // considering EbNo 130 | sigma = sqrt(1.0/(pow(10,EbN/10.0))); // considering SNR 131 | for (n=0; nGF; g++){TMP[g]=0.0;} 135 | for (r=0; rGF; g++) 161 | { 162 | //TMP[g]=0.0; 163 | for (q=0; qBINGF[g][q]))/(2.0*SQR(sigma)); 166 | TMP[g] = TMP[g] - NoisyBin[n][q]*BPSK(table->BINGF[g][q]); 167 | } 168 | 169 | } 170 | 171 | 172 | } 173 | 174 | 175 | for(k=0; kGF; k++) 176 | { 177 | // decoder->intrinsic_LLR[n][k] = +1e5; 178 | // decoder->intrinsic_GF[n][k] = -1; 179 | // for (g=0; gGF; g++) 180 | // { 181 | // if (TMP[g] < decoder->intrinsic_LLR[n][k]) 182 | // { 183 | // decoder->intrinsic_LLR[n][k] = TMP[g]; 184 | // decoder->intrinsic_GF[n][k] = g; 185 | // } 186 | // } 187 | // TMP[decoder->intrinsic_GF[n][k]] = +1e5; 188 | 189 | 190 | decoder->intrinsic_LLR[n][k] = TMP[k]/ repeat; 191 | } 192 | 193 | 194 | } 195 | 196 | for (n=0; nintrinsic_LLR 216 | */ 217 | void ModelChannel_AWGN_64(code_t *code, decoder_t *decoder, int **NBIN, float EbN, int *init_rand) 218 | { 219 | const int N = code->N; 220 | int n,k,g,q; 221 | float u,v,sigma; 222 | float TMP[code->GF]; 223 | int som; 224 | float **NoisyBin = calloc(N,sizeof(float *)); 225 | for (n=0; nGF][2]; 231 | 232 | 233 | 234 | 235 | ////compute normalization factor so that average power of one point of constellation is equal to one 236 | float norm_factor=0.0; 237 | for(i=0; i < code->GF ; i++) 238 | { 239 | // norm_factor = table_64QAM[i][0]*table_64QAM[i][0] + table_64QAM[i][1]*table_64QAM[i][1]+norm_factor;//compute sum 240 | norm_factor = table_64APSK[i][0]*table_64APSK[i][0] + table_64APSK[i][1]*table_64APSK[i][1]+norm_factor;//compute sum 241 | } 242 | norm_factor = sqrt( code->GF / norm_factor); 243 | // printf(" norm_factor = %f ", norm_factor); getchar(); 244 | 245 | for(i=0; i< code->GF ; i++) 246 | { 247 | // modulation[i][0]=norm_factor*table_64QAM[i][0]; 248 | // modulation[i][1]=norm_factor*table_64QAM[i][1]; 249 | 250 | modulation[i][0]=norm_factor*table_64APSK[i][0]; 251 | modulation[i][1]=norm_factor*table_64APSK[i][1]; 252 | } 253 | 254 | 255 | 256 | #ifdef rayleigh_fading 257 | float attenuation[N]; 258 | float attenuation_temp; 259 | float rand_temp; 260 | #endif // rayleigh_fading 261 | 262 | sigma = sqrt(1.0/(2.0*pow(10,EbN/10.0))); 263 | 264 | for (n=0; nGF);getchar(); 302 | for(k=0; kGF; k++) 303 | { 304 | som=0; 305 | for (q=0; q<6; q++) 306 | { 307 | som = som + BinGF_64[k][q]*pow(2,q); 308 | } 309 | 310 | #ifdef rayleigh_fading 311 | if(attenuation[n]>0 ) 312 | TMP[k] = SQR(NoisyBin[n][0]-modulation[som][0]*attenuation[n])/(2.0*SQR(sigma))+SQR(NoisyBin[n][1]-attenuation[n]*modulation[som][1])/(2.0*SQR(sigma)); 313 | else 314 | TMP[k]=0; 315 | #else 316 | TMP[k] = +SQR(NoisyBin[n][0]-modulation[som][0])/(2.0*SQR(sigma))+SQR(NoisyBin[n][1]-modulation[som][1])/(2.0*SQR(sigma)); 317 | #endif // rayleigh_fading 318 | 319 | 320 | 321 | //printf("%f \n", TMP[k]); 322 | } 323 | //getchar(); 324 | for(k=0; kGF; k++) 325 | { 326 | decoder->intrinsic_LLR[n][k] = TMP[k]; 327 | } 328 | 329 | } 330 | 331 | for (n=0; nintrinsic_LLR 348 | */ 349 | void ModelChannel(code_t *code, decoder_t *decoder, int **NBIN, float EbN, int *init_rand) 350 | { 351 | const int N = code->N; 352 | const int GF = code->GF; 353 | int n,k,g,q; 354 | float u,v,sigma; 355 | float TMP[GF]; 356 | int som; 357 | float **NoisyBin = calloc(N,sizeof(float *)); 358 | for (n=0; nGF / norm_factor); 593 | //printf(" norm_factor = %f ", norm_factor); getchar(); 594 | 595 | for(i=0; i< GF ; i++) 596 | { 597 | table_GF[i][0]=norm_factor*table_GF[i][0]; 598 | table_GF[i][1]=norm_factor*table_GF[i][1]; 599 | } 600 | 601 | 602 | 603 | 604 | float attenuation_temp; 605 | #ifdef rayleigh_fading // rayleigh_fading 606 | float attenuation[N]; 607 | float rand_temp; 608 | #endif 609 | #ifdef rayleigh_fading_SSD // Signal Space Diversity 610 | float attenuation[N][2]; 611 | float rand_temp; 612 | #endif // rayleigh_fading 613 | #ifdef erasure 614 | float erasure_proba=0.1; 615 | #endif // erasure 616 | 617 | 618 | 619 | sigma = sqrt(1.0/(2*pow(10,EbN/10.0))); //SNR 620 | 621 | //sigma = sqrt(1.0/(2*code->rate * code->logGF * pow(10,EbN/10.0))); //Eb/No 622 | 623 | //opfile=fopen("./data/bubble_stat.txt","a"); 624 | // for (k=0; k logGF; q++) 656 | { 657 | som = som + NBIN[n][q]*pow(2,q); 658 | //printf(" %d",NBIN[n][q] ); 659 | } 660 | 661 | //printf("\n somme= %d \n",som ); 662 | //getchar(); 663 | 664 | for (i=0; i<2; i++) 665 | { 666 | u=My_drand48(init_rand); 667 | v=My_drand48(init_rand); 668 | 669 | #ifdef rayleigh_fading_SSD 670 | rand_temp=My_drand48(init_rand); 671 | attenuation_temp=sqrt(-log(rand_temp)); 672 | attenuation[n][i]=attenuation_temp; 673 | #ifdef erasure 674 | 675 | rand_temp = My_drand48(init_rand); 676 | 677 | //printf("rand: %f , attenuation1: %f",rand_temp,attenuation_temp); 678 | if (rand_temp< erasure_proba) 679 | { 680 | attenuation_temp=0.0; 681 | } 682 | else 683 | { 684 | attenuation_temp=attenuation_temp/sqrt(1-erasure_proba); 685 | 686 | } 687 | 688 | attenuation[n][i]=attenuation_temp; 689 | 690 | #endif // erasure 691 | 692 | 693 | #endif 694 | 695 | NoisyBin[n][i] = table_GF[som][i]*attenuation_temp+ sigma*sqrt(-2.0*log(u))*cos(2.0*PI*v) ; 696 | 697 | 698 | 699 | } 700 | //printf("%f %f %f %f \n",NoisyBin[n][0], table_GF[som][0] , NoisyBin[n][1] , table_GF[som][1]);getchar(); 701 | } 702 | 703 | /* Compute the Log intrinsic_LLR Ratio messages */ 704 | for (n=0; nGF);getchar(); 709 | for(k=0; k0 ) 719 | TMP[k] = SQR(NoisyBin[n][0]-table_GF[som][0]*attenuation[n])/(2.0*SQR(sigma))+SQR(NoisyBin[n][1]-attenuation[n]*table_GF[som][1])/(2.0*SQR(sigma)); 720 | else 721 | TMP[k]=0; 722 | #else 723 | #ifdef rayleigh_fading_SSD 724 | TMP[k]=0; 725 | if(attenuation[n][0]>0 ) 726 | { 727 | TMP[k] = SQR(NoisyBin[n][0]-attenuation[n][0]*table_GF[som][0])/(2.0*SQR(sigma)); 728 | } 729 | 730 | if(attenuation[n][1]>0 ) 731 | { 732 | TMP[k] = TMP[k] +SQR(NoisyBin[n][1]-attenuation[n][1]*table_GF[som][1])/(2.0*SQR(sigma)); 733 | } 734 | 735 | 736 | #else 737 | TMP[k] = +SQR(NoisyBin[n][0]-table_GF[som][0])/(2.0*SQR(sigma))+SQR(NoisyBin[n][1]-table_GF[som][1])/(2.0*SQR(sigma)); 738 | #endif 739 | #endif // rayleigh_fading 740 | 741 | //printf("%f \n", TMP[k]); 742 | } 743 | //getchar(); 744 | 745 | for(k=0; kGF; k++) 746 | { 747 | decoder->intrinsic_LLR[n][k] = TMP[k]; 748 | } 749 | 750 | } 751 | 752 | for (n=0; nN; 760 | int n,k,g,q; 761 | float u,v,sigma; 762 | float TMP[256]; 763 | int som; 764 | float **NoisyBin = calloc(N,sizeof(float *)); 765 | for (n=0; nGF ; i++) 786 | { 787 | // table_256[i][0]=table_256QAM_4D_16QAM[i][0]; 788 | // table_256[i][1]=table_256QAM_4D_16QAM[i][1]; 789 | // table_256[i][2]=table_256QAM_4D_16QAM[i][2]; 790 | // table_256[i][3]=table_256QAM_4D_16QAM[i][3]; 791 | 792 | table_256[i][0]=table_256QAM_4D_16QAM_R[i][0]; 793 | table_256[i][1]=table_256QAM_4D_16QAM_R[i][1]; 794 | table_256[i][2]=table_256QAM_4D_16QAM_R[i][2]; 795 | table_256[i][3]=table_256QAM_4D_16QAM_R[i][3]; 796 | 797 | 798 | // table_256[i][0]=table_256QAM_4D[i][0]; 799 | // table_256[i][1]=table_256QAM_4D[i][1]; 800 | // table_256[i][2]=table_256QAM_4D[i][2]; 801 | // table_256[i][3]=table_256QAM_4D[i][3]; 802 | 803 | } 804 | 805 | for(i=0; i < code->GF ; i++) 806 | { 807 | norm_factor = table_256[i][0]*table_256[i][0] + table_256[i][1]*table_256[i][1]+norm_factor;//compute sum 808 | norm_factor = table_256[i][2]*table_256[i][2] + table_256[i][3]*table_256[i][3]+norm_factor;//compute sum 809 | } 810 | norm_factor = sqrt(2* code->GF / norm_factor); 811 | //printf(" norm_factor = %f ", norm_factor); getchar(); 812 | 813 | for(i=0; i< code->GF ; i++) 814 | { 815 | table_256[i][0]=norm_factor*table_256[i][0]; 816 | table_256[i][1]=norm_factor*table_256[i][1]; 817 | table_256[i][2]=norm_factor*table_256[i][2]; 818 | table_256[i][3]=norm_factor*table_256[i][3]; 819 | } 820 | 821 | sigma = sqrt(1.0/(2*pow(10,EbN/10.0))); //SNR 822 | 823 | //sigma = sqrt(1.0/(2*code->rate * code->logGF * pow(10,EbN/10.0))); //Eb/No 824 | 825 | //printf("sigma = %f \n",sigma);getchar(); 826 | 827 | 828 | for (n=0; nGF);getchar(); 884 | for(k=0; kGF; k++) 885 | { 886 | som=0; 887 | for (q=0; q<8; q++) 888 | { 889 | som = som + BinGF_256[k][q]*pow(2,q); 890 | } 891 | 892 | 893 | TMP[k]=0; 894 | if(attenuation[n][0]>0 ) 895 | { 896 | TMP[k] = SQR(NoisyBin[n][0]-attenuation[n][0]*table_256[som][0])/(2.0*SQR(sigma)); 897 | } 898 | 899 | if(attenuation[n][1]>0 ) 900 | { 901 | TMP[k] = TMP[k] +SQR(NoisyBin[n][1]-attenuation[n][1]*table_256[som][1])/(2.0*SQR(sigma)); 902 | } 903 | 904 | if(attenuation[n][2]>0 ) 905 | { 906 | TMP[k] = TMP[k] +SQR(NoisyBin[n][2]-attenuation[n][2]*table_256[som][2])/(2.0*SQR(sigma)); 907 | } 908 | 909 | if(attenuation[n][3]>0 ) 910 | { 911 | TMP[k] = TMP[k] +SQR(NoisyBin[n][3]-attenuation[n][3]*table_256[som][3])/(2.0*SQR(sigma)); 912 | } 913 | 914 | 915 | //printf("%f \n", TMP[k]); 916 | } 917 | //getchar(); 918 | for(k=0; kGF; k++) 919 | { 920 | decoder->intrinsic_LLR[n][k] = +1e5; 921 | decoder->intrinsic_GF[n][k] = -1; 922 | for (g=0; gGF; g++) 923 | { 924 | if (TMP[g] < decoder->intrinsic_LLR[n][k]) 925 | { 926 | decoder->intrinsic_LLR[n][k] = TMP[g]; 927 | decoder->intrinsic_GF[n][k] = g; 928 | } 929 | } 930 | TMP[decoder->intrinsic_GF[n][k]] = +1e5; 931 | } 932 | 933 | } 934 | 935 | for (n=0; n>1)-1) ; i< 1<<((logGF>>1)-1); i++) 943 | { 944 | for( j = - 1<<((logGF>>1)-1) ; j< 1<<((logGF>>1)-1); j++) 945 | { 946 | 947 | printf( "%f \t %f \n", i+0.5,j+0.5); 948 | } 949 | } 950 | } 951 | -------------------------------------------------------------------------------- /data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/data/.gitkeep -------------------------------------------------------------------------------- /include/NB_LDPC.h: -------------------------------------------------------------------------------- 1 | #ifndef NB_LDPC_H_INCLUDED 2 | #define NB_LDPC_H_INCLUDED 3 | 4 | /*! 5 | * \file NB_LDPC.h 6 | */ 7 | 8 | 9 | #define STR_MAXSIZE 350 //maximum string size. Used in calloc(). 10 | 11 | 12 | #include "struct.h" 13 | #include "init.h" 14 | #include "tools.h" 15 | #include "channel.h" 16 | #include "syndrome_decoder.h" 17 | #include "bubble_decoder.h" 18 | 19 | 20 | static char usage_txt[] = 21 | "\n\ 22 | Syntax:\n\ 23 | \n\t NbMonteCarlo : # simulated frames\ 24 | \n\t NbIterMax : # of maximum decoding iterations\ 25 | \n\t FileMatrix : File name of the parity-check matrix\ 26 | \n\t EbN : Eb/No (dB)\ 27 | \n\t NbMax : size of truncated messages\ 28 | \n\t n_vc : size of truncated messages from Variable to Check\ 29 | \n\t n_cv : size of truncated messages from Check to Variable\ 30 | \n\t Offset : offset correction factor (0.4 -- 1)\ 31 | \n\t NbOper : Maximum number of operations for sorting \n\ 32 | "; 33 | 34 | 35 | #endif // NB_LDPC_H_INCLUDED 36 | -------------------------------------------------------------------------------- /include/bubble_decoder.h: -------------------------------------------------------------------------------- 1 | #ifndef BUBBLE_DECODER_H_INCLUDED 2 | #define BUBBLE_DECODER_H_INCLUDED 3 | 4 | /*! 5 | * \file bubble_decoder.h 6 | * \brief header for bubble_decoder functions 7 | */ 8 | 9 | 10 | #include 11 | #include "./struct.h" 12 | #include "./init.h" 13 | 14 | 15 | int maximum(float *Y, int nl); 16 | int minimum(float *Y, int nl); 17 | void CheckPassLogEMS (int node,decoder_t *decoder, code_t *code, table_t *table, int NbOper, float offset); 18 | void CheckPassLogEMS_dc3 (int node,decoder_t *decoder, code_t *code, table_t *table, int NbOper, float offset); 19 | 20 | 21 | 22 | int ElementaryStep(float *Input1,float *Input2,int *IndiceInput1,int *IndiceInput2,float *Output,int *IndiceOut,int **ADDGF,int GF,int nbMax,int nbOper); 23 | int ElementaryStep_nm(float *Input1,float *Input2,int *IndiceInput1,int *IndiceInput2,float *Output,int *IndiceOut,int **ADDGF,int GF,int nmU,int nmV,int nmS,int nbOper); 24 | 25 | 26 | 27 | #endif // SYNDROME_DECODER_H_INCLUDED 28 | -------------------------------------------------------------------------------- /include/channel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/include/channel.h -------------------------------------------------------------------------------- /include/init.h: -------------------------------------------------------------------------------- 1 | #ifndef INIT_H_INCLUDED 2 | #define INIT_H_INCLUDED 3 | 4 | /*! 5 | * \file init.h 6 | */ 7 | 8 | #include "./struct.h" 9 | 10 | 11 | void Table_Add_GF(table_t *table, int GF, int logGF); 12 | 13 | void Table_Mul_GF(int **MULGF, int GF); 14 | 15 | void Table_Div_GF(int **DIVGF, int GF); 16 | 17 | void Table_dec_GF(table_t *table, int GF, int logGF); 18 | 19 | void Table_Mul_DEC(table_t *table, int GF); 20 | 21 | void Table_Div_DEC(table_t *table, int GF); 22 | 23 | 24 | void LoadCode (char *FileMatrix, code_t *code); 25 | 26 | void FreeCode(code_t *code); 27 | 28 | void AllocateDecoder (code_t *code, decoder_t *decoder); 29 | 30 | void FreeDecoder (decoder_t *decoder); 31 | 32 | void LoadTables (table_t *table, int GF, int logGF); 33 | 34 | void FreeTable(table_t *table); 35 | 36 | 37 | #endif 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /include/struct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/include/struct.h -------------------------------------------------------------------------------- /include/syndrome_decoder.h: -------------------------------------------------------------------------------- 1 | #ifndef SYNDROME_DECODER_H_INCLUDED 2 | #define SYNDROME_DECODER_H_INCLUDED 3 | 4 | /*! 5 | * \file syndrome_decoder.h 6 | */ 7 | 8 | #include "./struct.h" 9 | #include "./init.h" 10 | 11 | int syndrome_ems3(int node, decoder_t *decoder, const code_t *code, const table_t *table, int ** config_table, int config_table_size , int dc_max, float offset); 12 | int syndrome_ems2(int node, decoder_t *decoder, const code_t *code, const table_t *table, int ** config_table, int config_table_size , int dc_max, float offset); 13 | 14 | int syndrome_ems(int node, decoder_t *decoder, const code_t *code, const table_t *table, int ** config_table, int config_table_size , int dc_max, float offset, int n_cv); 15 | 16 | 17 | 18 | 19 | 20 | int factorial( int p); 21 | int combin( int n, int r); 22 | 23 | int sorting(syndrome_type* syndrome_set, int syndrome_table_size); 24 | 25 | float select_sort(float* array_float,int size_array, int order); 26 | 27 | float median_median64(float* array_float); 28 | float median_median256(float* array_float); 29 | float median_median_x(float* array_float, int array_float_size, int median_size, int median_select); 30 | 31 | int** AllocateArray(int line, int column); 32 | 33 | 34 | 35 | int** build_config_table(int* config_table_size_p,int dc_max,int d_1,int d_2, int d_3); 36 | 37 | int sort_config_table(int ** config_table,int config_table_size,int dc_max); 38 | 39 | int compute_config_table_size(int dc_max, int d_1, int d_2, int d_3); 40 | 41 | int gen_config_table(int ** config_table,int d_c,int d_1,int d_2, int d_3); 42 | int gen_config_table2(int ** config_table,int d_c,int d_1,int d_2, int d_3); 43 | int gen_config_table3(int ** config_table,int d_c,int d_1); 44 | 45 | 46 | int presorting_mvc(decoder_t *decoder,const code_t *code,int dc_max,int border, int *index_order); 47 | 48 | double bayes(double M1 , double M2 ); 49 | double f(double x); 50 | 51 | int check_deviation(int ** config_table,int dc_max,int index1,int index2,int index3,int *result); 52 | 53 | #endif // SYNDROME_DECODER_H_INCLUDED 54 | -------------------------------------------------------------------------------- /include/tools.h: -------------------------------------------------------------------------------- 1 | #ifndef TOOLS_H_INCLUDED 2 | #define TOOLS_H_INCLUDED 3 | 4 | /*! 5 | * 6 | * \file tools.h 7 | * 8 | */ 9 | 10 | 11 | 12 | #include "./struct.h" 13 | #include 14 | #include 15 | 16 | 17 | 18 | float My_drand48(int *initialise); 19 | 20 | int Bin2GF(int *U,int GF,int logGF,int **BINGF); 21 | 22 | void RandomBinaryGenerator (int N, int M,int GF,int logGF,int **KBIN,int *KSYMB,int **BINGF, int *init_rand); 23 | 24 | void GaussianElimination (code_t *code, table_t *table); 25 | 26 | int Encoding (code_t *code, table_t *table, int *CodeWord, int **NBIN, int *NSYMB); 27 | 28 | int Syndrom (code_t *code, int *decide, table_t *tableGF); 29 | 30 | void Decision( int *decision,float **APP,int N,int GF); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/init.c -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | #makefile 2 | all: essai 3 | 4 | ############ Generation des fichiers objets ############### 5 | 6 | #init.o 7 | obj/init.o: init.c include/init.h include/tools.h include/struct.h 8 | gcc -O3 -Wall -Iinclude/ -c init.c -o obj/init.o 9 | 10 | #tools.o 11 | obj/tools.o: tools.c include/tools.h include/init.h include/struct.h 12 | gcc -O3 -Wall -Iinclude/ -c tools.c -o obj/tools.o 13 | 14 | #channel.o 15 | obj/channel.o: channel.c include/channel.h include/init.h include/tools.h include/struct.h 16 | gcc -O3 -Wall -Iinclude/ -c channel.c -o obj/channel.o 17 | 18 | 19 | #bubble_decoder.o 20 | obj/bubble_decoder.o: bubble_decoder.c include/bubble_decoder.h include/init.h include/tools.h include/struct.h 21 | gcc -O3 -Wall -Iinclude/ -c bubble_decoder.c -o obj/bubble_decoder.o 22 | 23 | #NB_LDPC.o 24 | obj/NB_LDPC.o: NB_LDPC.c include/syndrome_decoder.h include/bubble_decoder.h include/init.h include/tools.h include/channel.h include/struct.h include/NB_LDPC.h 25 | gcc -O3 -Wall -Iinclude/ -c NB_LDPC.c -o obj/NB_LDPC.o 26 | 27 | ########## Generation de l'executable ####################### 28 | essai: obj/init.o obj/tools.o obj/channel.o obj/bubble_decoder.o obj/NB_LDPC.o 29 | gcc -O3 -Wall -o essai obj/init.o obj/tools.o obj/channel.o obj/bubble_decoder.o obj/NB_LDPC.o -lm 30 | 31 | #fin makefile 32 | -------------------------------------------------------------------------------- /matrices/Beidou/BeiDou_NB_LDPC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/matrices/Beidou/BeiDou_NB_LDPC.pdf -------------------------------------------------------------------------------- /matrices/KN/N1200_K600_GF64_BeiDou.txt: -------------------------------------------------------------------------------- 1 | 200 100 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 12 34 63 12 103 50 151 59 5 | 5 0 91 43 132 52 178 23 6 | 14 14 58 5 136 0 199 44 7 | 7 29 59 23 107 0 159 43 8 | 11 23 62 0 102 43 150 29 9 | 18 32 99 41 152 13 188 23 10 | 22 29 84 23 120 0 154 43 11 | 41 0 54 44 133 14 160 5 12 | 35 23 70 0 126 43 163 52 13 | 24 43 82 52 118 23 156 0 14 | 35 0 83 43 131 52 183 23 15 | 3 44 55 14 103 5 155 0 16 | 37 34 85 12 121 17 170 59 17 | 29 5 77 0 125 44 177 14 18 | 30 0 86 43 113 29 166 23 19 | 26 29 67 23 122 0 175 43 20 | 36 0 71 43 127 29 164 23 21 | 36 29 84 23 132 0 184 43 22 | 34 34 82 45 130 55 182 14 23 | 31 43 79 29 127 23 179 0 24 | 2 0 49 43 144 52 199 23 25 | 42 44 100 14 148 5 196 0 26 | 38 50 92 59 140 34 188 12 27 | 17 43 98 52 151 23 187 0 28 | 39 23 89 0 137 43 185 29 29 | 10 0 61 43 101 52 149 23 30 | 48 0 96 44 139 14 192 5 31 | 25 43 66 52 121 23 174 0 32 | 9 23 61 0 109 43 161 29 33 | 40 23 88 0 124 43 169 52 34 | 47 32 95 41 138 13 191 23 35 | 32 23 88 0 115 43 168 52 36 | 20 0 97 44 150 14 186 5 37 | 24 23 76 0 120 43 176 29 38 | 25 29 94 23 112 0 183 43 39 | 2 26 54 27 102 29 154 30 40 | 19 29 71 23 115 0 171 43 41 | 26 44 95 14 109 5 184 0 42 | 37 52 91 23 139 0 187 43 43 | 46 43 94 52 137 23 190 0 44 | 38 0 86 43 122 29 171 23 45 | 33 37 81 22 129 21 181 6 46 | 11 52 63 23 111 0 163 43 47 | 42 4 55 32 134 41 157 13 48 | 10 5 62 0 110 44 162 14 49 | 41 0 99 43 147 29 195 23 50 | 32 5 80 0 128 44 180 14 51 | 6 28 92 27 129 29 179 30 52 | 12 43 64 29 112 23 164 0 53 | 48 23 75 0 142 43 190 29 54 | 1 0 52 44 143 14 198 5 55 | 52 34 80 45 147 55 196 14 56 | 7 23 89 0 130 43 180 29 57 | 45 44 93 14 140 5 189 0 58 | 16 23 68 0 106 43 168 52 59 | 15 44 67 14 105 5 167 0 60 | 3 0 50 43 141 29 200 23 61 | 17 41 69 35 113 11 169 56 62 | 43 0 97 44 145 14 193 5 63 | 21 0 73 43 117 29 173 23 64 | 47 52 74 23 141 0 189 43 65 | 27 0 68 44 123 14 176 5 66 | 40 29 90 0 138 43 186 6 67 | 34 23 69 0 125 43 162 52 68 | 28 52 65 23 124 0 173 43 69 | 4 0 51 43 142 29 197 23 70 | 1 43 53 52 101 23 153 0 71 | 20 5 72 0 116 44 172 14 72 | 21 53 83 6 119 37 153 22 73 | 27 52 96 23 110 0 181 43 74 | 19 43 100 29 149 23 185 0 75 | 4 0 56 43 104 52 156 23 76 | 31 5 87 0 114 44 167 14 77 | 33 37 72 48 128 10 161 16 78 | 50 0 78 43 145 52 194 23 79 | 23 44 81 14 117 5 155 0 80 | 45 5 76 0 143 44 191 14 81 | 8 0 90 44 131 14 177 5 82 | 5 16 57 37 105 48 157 10 83 | 51 29 79 23 146 0 195 43 84 | 8 0 60 44 108 14 160 5 85 | 13 56 65 24 107 8 165 40 86 | 15 5 59 0 133 44 200 14 87 | 9 0 64 44 104 14 152 5 88 | 18 52 70 23 114 0 170 43 89 | 14 23 66 0 108 43 166 29 90 | 30 25 78 21 126 13 178 1 91 | 22 5 74 0 118 44 174 14 92 | 13 29 57 23 135 0 198 43 93 | 29 43 85 29 116 23 165 0 94 | 49 40 77 15 148 28 193 50 95 | 44 0 53 44 136 14 159 5 96 | 16 23 60 0 134 43 197 52 97 | 39 0 87 44 123 14 172 5 98 | 46 43 73 52 144 23 192 0 99 | 6 0 58 43 106 52 158 23 100 | 23 41 75 46 119 36 175 31 101 | 44 23 98 0 146 43 194 52 102 | 43 43 56 29 135 23 158 0 103 | 28 52 93 23 111 0 182 43 104 | -------------------------------------------------------------------------------- /matrices/KN/N128_K64_GF256.txt: -------------------------------------------------------------------------------- 1 | 16 8 256 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 | 4 4 4 4 4 4 4 4 5 | 6 | 4 147 7 217 10 140 16 225 7 | 4 181 5 111 9 189 15 104 8 | 2 39 6 47 7 217 14 224 9 | 1 144 8 66 11 136 16 59 10 | 3 246 9 76 11 68 14 253 11 | 1 146 6 154 12 69 15 76 12 | 2 178 5 248 8 171 13 1 13 | 3 95 10 180 12 102 13 172 -------------------------------------------------------------------------------- /matrices/KN/N128_K64_GF256_L.txt: -------------------------------------------------------------------------------- 1 | 16 8 256 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 | 4 4 4 4 4 4 4 4 5 | 6 | 1 0 6 89 12 81 15 9 7 | 2 8 7 0 9 182 16 173 8 | 3 173 8 8 10 0 13 183 9 | 4 8 5 0 11 88 14 80 10 | 1 183 5 173 9 8 13 0 11 | 2 0 6 88 10 80 14 8 12 | 3 0 7 167 11 127 15 40 13 | 4 0 8 182 12 173 16 8 -------------------------------------------------------------------------------- /matrices/KN/N144_K120_GF64.txt: -------------------------------------------------------------------------------- 1 | 144 24 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 4 | 1 44 13 1 25 32 37 5 49 38 61 10 73 60 85 15 97 50 109 21 121 56 133 26 5 | 2 44 14 1 26 32 38 5 50 38 62 10 74 60 86 15 98 50 110 21 122 56 134 26 6 | 3 44 15 1 27 32 39 5 51 38 63 10 75 60 87 15 99 50 111 21 123 56 135 26 7 | 4 44 16 1 28 32 40 5 52 38 64 10 76 60 88 15 100 50 112 21 124 56 136 26 8 | 5 44 17 1 29 32 41 5 53 38 65 10 77 60 89 15 101 50 113 21 125 56 137 26 9 | 6 44 18 1 30 32 42 5 54 38 66 10 78 60 90 15 102 50 114 21 126 56 138 26 10 | 7 44 19 1 31 32 43 5 55 38 67 10 79 60 91 15 103 50 115 21 127 56 139 26 11 | 8 44 20 1 32 32 44 5 56 38 68 10 80 60 92 15 104 50 116 21 128 56 140 26 12 | 9 44 21 1 33 32 45 5 57 38 69 10 81 60 93 15 105 50 117 21 129 56 141 26 13 | 10 44 22 1 34 32 46 5 58 38 70 10 82 60 94 15 106 50 118 21 130 56 142 26 14 | 11 44 23 1 35 32 47 5 59 38 71 10 83 60 95 15 107 50 119 21 131 56 143 26 15 | 12 44 24 1 36 32 48 5 60 38 72 10 84 60 96 15 108 50 120 21 132 56 144 26 16 | 1 1 14 32 27 5 40 38 53 10 66 60 79 15 92 50 105 21 118 56 131 26 144 44 17 | 2 1 15 32 28 5 41 38 54 10 67 60 80 15 93 50 106 21 119 56 132 26 133 44 18 | 3 1 16 32 29 5 42 38 55 10 68 60 81 15 94 50 107 21 120 56 121 26 134 44 19 | 4 1 17 32 30 5 43 38 56 10 69 60 82 15 95 50 108 21 109 56 122 26 135 44 20 | 5 1 18 32 31 5 44 38 57 10 70 60 83 15 96 50 97 21 110 56 123 26 136 44 21 | 6 1 19 32 32 5 45 38 58 10 71 60 84 15 85 50 98 21 111 56 124 26 137 44 22 | 7 1 20 32 33 5 46 38 59 10 72 60 73 15 86 50 99 21 112 56 125 26 138 44 23 | 8 1 21 32 34 5 47 38 60 10 61 60 74 15 87 50 100 21 113 56 126 26 139 44 24 | 9 1 22 32 35 5 48 38 49 10 62 60 75 15 88 50 101 21 114 56 127 26 140 44 25 | 10 1 23 32 36 5 37 38 50 10 63 60 76 15 89 50 102 21 115 56 128 26 141 44 26 | 11 1 24 32 25 5 38 38 51 10 64 60 77 15 90 50 103 21 116 56 129 26 142 44 27 | 12 1 13 32 26 5 39 38 52 10 65 60 78 15 91 50 104 21 117 56 130 26 143 44 -------------------------------------------------------------------------------- /matrices/KN/N216_K144_GF64.txt: -------------------------------------------------------------------------------- 1 | 36 12 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 6 6 6 6 6 6 6 6 6 6 6 6 4 | 1 0 7 6 13 13 19 20 25 46 31 55 5 | 2 0 8 6 14 13 20 20 26 46 32 55 6 | 3 6 9 13 15 0 21 20 27 46 33 55 7 | 4 6 10 13 16 20 22 0 28 46 34 55 8 | 5 6 11 13 17 20 23 46 29 0 35 55 9 | 6 6 12 13 18 20 24 46 30 55 36 0 10 | 1 6 8 0 15 13 22 20 29 46 36 55 11 | 2 6 9 0 16 13 23 55 30 46 31 20 12 | 3 0 10 6 17 13 24 20 25 55 32 46 13 | 4 0 11 6 18 13 19 55 26 20 33 46 14 | 5 0 12 6 13 46 20 13 27 55 34 20 15 | 6 0 7 13 14 46 21 55 28 20 35 6 -------------------------------------------------------------------------------- /matrices/KN/N2304_K1152_GF64.txt: -------------------------------------------------------------------------------- 1 | 384 192 64 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 | 6 | 73 59 145 31 217 22 361 44 7 | 74 32 146 4 218 17 362 58 8 | 75 15 147 28 219 6 363 43 9 | 76 9 148 18 220 46 364 31 10 | 77 21 149 36 221 8 365 62 11 | 78 26 150 39 222 17 366 54 12 | 79 40 151 62 223 49 367 14 13 | 80 46 152 11 224 37 368 59 14 | 81 40 153 18 225 27 369 55 15 | 82 27 154 49 226 1 370 36 16 | 83 33 155 46 227 61 371 24 17 | 84 28 156 43 228 15 372 6 18 | 85 35 157 7 229 20 373 61 19 | 86 41 158 54 230 6 374 32 20 | 87 10 159 38 231 1 375 23 21 | 88 33 160 11 232 20 376 48 22 | 89 8 161 23 233 49 377 58 23 | 90 12 162 21 234 49 378 34 24 | 91 39 163 26 235 54 379 17 25 | 92 14 164 55 236 29 380 1 26 | 93 45 165 54 237 4 381 19 27 | 94 14 166 51 238 23 382 36 28 | 95 61 167 24 239 33 383 46 29 | 96 17 168 45 240 30 384 8 30 | 73 36 97 21 193 62 337 8 31 | 74 49 98 34 194 21 338 12 32 | 75 15 99 28 195 6 339 43 33 | 76 37 100 50 196 28 340 2 34 | 77 6 101 47 197 56 341 21 35 | 78 54 102 0 198 28 342 13 36 | 79 16 103 7 199 44 343 29 37 | 80 47 104 6 200 21 344 56 38 | 81 20 105 46 201 5 345 55 39 | 82 23 106 58 202 49 346 8 40 | 83 38 107 51 203 29 347 3 41 | 84 5 108 20 204 46 348 55 42 | 85 47 109 60 205 38 349 12 43 | 86 50 110 22 206 13 350 35 44 | 87 54 111 13 207 28 351 0 45 | 88 33 112 5 208 18 352 59 46 | 89 59 113 11 209 37 353 46 47 | 90 55 114 5 210 20 354 46 48 | 91 30 115 17 211 45 355 8 49 | 92 28 116 13 212 54 356 0 50 | 93 2 117 52 213 17 357 43 51 | 94 32 118 23 214 60 358 45 52 | 95 32 119 6 215 41 359 54 53 | 96 5 120 59 216 18 360 33 54 | 25 57 121 22 153 48 313 7 55 | 26 26 122 61 154 11 314 52 56 | 27 31 123 22 155 59 315 44 57 | 28 62 124 21 156 8 316 36 58 | 29 60 125 6 157 19 317 34 59 | 30 55 126 46 158 20 318 5 60 | 31 38 127 25 159 16 319 53 61 | 32 23 128 36 160 14 320 51 62 | 33 13 129 35 161 22 321 50 63 | 34 26 130 35 162 0 322 48 64 | 35 61 131 24 163 46 323 33 65 | 36 26 132 4 164 41 324 13 66 | 37 58 133 8 165 49 325 23 67 | 38 47 134 32 166 10 326 19 68 | 39 13 135 39 167 61 327 48 69 | 40 44 136 9 168 57 328 35 70 | 41 49 137 1 145 36 329 27 71 | 42 12 138 27 146 53 330 62 72 | 43 47 139 38 147 12 331 60 73 | 44 46 140 37 148 59 332 11 74 | 45 54 141 26 149 39 333 17 75 | 46 41 142 4 150 13 334 26 76 | 47 57 143 31 151 16 335 3 77 | 48 37 144 52 152 15 336 24 78 | 1 0 169 54 241 28 363 13 79 | 2 49 170 36 242 1 364 27 80 | 3 13 171 4 243 26 365 41 81 | 4 26 172 13 244 41 366 4 82 | 5 16 173 25 245 53 367 38 83 | 6 11 174 52 246 26 368 61 84 | 7 26 175 39 247 17 369 54 85 | 8 21 176 49 248 34 370 12 86 | 9 30 177 21 249 43 371 58 87 | 10 28 178 2 250 50 372 37 88 | 11 18 179 44 251 3 373 53 89 | 12 9 180 50 252 24 374 59 90 | 13 47 181 12 253 60 375 38 91 | 14 28 182 0 254 54 376 13 92 | 15 16 183 29 255 44 377 7 93 | 16 26 184 17 256 54 378 39 94 | 17 58 185 17 257 32 379 4 95 | 18 45 186 23 258 60 380 32 96 | 19 62 187 53 259 27 381 12 97 | 20 11 188 46 260 37 382 59 98 | 21 22 189 31 261 44 383 59 99 | 22 11 190 20 262 33 384 48 100 | 23 5 191 14 263 42 361 27 101 | 24 14 192 51 264 23 362 36 102 | 49 38 206 60 246 12 316 47 103 | 50 19 207 45 247 4 317 54 104 | 51 31 208 16 248 57 318 3 105 | 52 50 209 13 249 22 319 35 106 | 53 13 210 26 250 4 320 41 107 | 54 46 211 59 251 11 321 37 108 | 55 23 212 14 252 51 322 36 109 | 56 29 213 1 253 55 323 14 110 | 57 10 214 60 254 25 324 51 111 | 58 61 215 7 255 20 325 35 112 | 59 12 216 53 256 27 326 62 113 | 60 6 193 47 257 21 327 56 114 | 61 18 194 33 258 5 328 59 115 | 62 32 195 41 259 54 329 6 116 | 63 50 196 24 260 9 330 59 117 | 64 3 197 44 261 53 331 18 118 | 65 53 198 12 262 62 332 27 119 | 66 44 199 53 263 3 333 18 120 | 67 21 200 47 264 6 334 56 121 | 68 29 201 16 241 7 335 44 122 | 69 44 202 31 242 22 336 59 123 | 70 50 203 37 243 2 313 28 124 | 71 5 204 42 244 27 314 14 125 | 72 32 205 10 245 47 315 19 126 | 1 43 134 58 265 30 349 21 127 | 2 56 135 43 266 8 350 34 128 | 3 37 136 24 267 52 351 15 129 | 4 5 137 46 268 20 352 55 130 | 5 22 138 9 269 0 353 37 131 | 6 55 139 5 270 20 354 46 132 | 7 34 140 8 271 56 355 43 133 | 8 25 141 3 272 40 356 12 134 | 9 61 142 52 273 26 357 11 135 | 10 38 143 60 274 12 358 47 136 | 11 49 144 12 275 21 359 34 137 | 12 1 121 38 276 23 360 10 138 | 13 20 122 11 277 48 337 33 139 | 14 18 123 55 278 40 338 27 140 | 15 50 124 15 279 0 339 41 141 | 16 29 125 7 280 16 340 44 142 | 17 26 126 41 281 13 341 4 143 | 18 7 127 33 282 42 342 55 144 | 19 16 128 38 283 25 343 53 145 | 20 29 129 55 284 1 344 14 146 | 21 13 130 61 285 48 345 39 147 | 22 29 131 42 286 57 346 20 148 | 23 13 132 0 287 54 347 28 149 | 24 55 133 18 288 40 348 27 150 | 25 16 98 25 181 53 289 38 151 | 26 17 99 52 182 43 290 2 152 | 27 0 100 50 183 41 291 15 153 | 28 56 101 15 184 2 292 30 154 | 29 26 102 61 185 11 293 52 155 | 30 53 103 16 186 25 294 38 156 | 31 39 104 61 187 48 295 13 157 | 32 52 105 15 188 24 296 37 158 | 33 50 106 9 189 59 297 24 159 | 34 29 107 1 190 14 298 55 160 | 35 11 108 61 191 52 299 26 161 | 36 49 109 58 192 23 300 8 162 | 37 6 110 41 169 54 301 32 163 | 38 20 111 42 170 29 302 57 164 | 39 34 112 56 171 8 303 43 165 | 40 38 113 16 172 25 304 53 166 | 41 61 114 24 173 46 305 33 167 | 42 31 115 22 174 59 306 44 168 | 43 39 116 24 175 11 307 2 169 | 44 57 117 48 176 7 308 22 170 | 45 21 118 8 177 36 309 62 171 | 46 38 119 60 178 47 310 12 172 | 47 46 120 20 179 5 311 55 173 | 48 18 97 46 180 31 312 9 174 | 49 32 227 19 283 10 297 47 175 | 50 30 228 21 284 43 298 58 176 | 51 50 229 59 285 9 299 24 177 | 52 5 230 55 286 20 300 46 178 | 53 36 231 58 287 45 301 10 179 | 54 54 232 26 288 39 302 17 180 | 55 23 233 8 265 58 303 49 181 | 56 7 234 55 266 42 304 33 182 | 57 43 235 21 267 58 305 30 183 | 58 9 236 44 268 35 306 57 184 | 59 30 237 4 269 39 307 52 185 | 60 18 238 40 270 55 308 27 186 | 61 14 239 27 271 42 309 5 187 | 62 60 240 10 272 25 310 51 188 | 63 56 217 2 273 15 311 30 189 | 64 13 218 26 274 4 312 41 190 | 65 4 219 13 275 26 289 41 191 | 66 43 220 6 276 15 290 28 192 | 67 48 221 22 277 7 291 57 193 | 68 35 222 0 278 26 292 48 194 | 69 8 223 17 279 45 293 30 195 | 70 62 224 36 280 21 294 8 196 | 71 42 225 51 281 16 295 1 197 | 72 4 226 39 282 30 296 52 -------------------------------------------------------------------------------- /matrices/KN/N360_K120_GF256.txt: -------------------------------------------------------------------------------- 1 | 45 30 256 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 | 1 0 16 175 31 247 5 | 2 0 17 175 32 247 6 | 3 175 18 247 33 0 7 | 4 175 19 247 34 0 8 | 5 175 20 247 35 0 9 | 6 0 21 175 36 247 10 | 7 175 22 0 37 247 11 | 8 175 23 0 38 247 12 | 9 175 24 0 39 247 13 | 10 175 25 0 40 247 14 | 11 175 26 247 41 0 15 | 12 0 27 175 42 247 16 | 13 175 28 247 43 0 17 | 14 175 29 247 44 0 18 | 15 175 30 247 45 0 19 | 1 175 21 0 41 247 20 | 2 175 22 247 42 0 21 | 3 0 23 175 43 247 22 | 4 0 24 175 44 247 23 | 5 0 25 175 45 247 24 | 6 175 27 0 33 247 25 | 7 0 28 175 34 247 26 | 8 0 29 175 35 247 27 | 9 247 30 0 31 175 28 | 10 247 26 0 32 175 29 | 11 247 18 0 37 175 30 | 12 247 19 0 38 175 31 | 13 247 20 0 39 175 32 | 14 247 16 0 40 175 33 | 15 0 17 247 36 175 -------------------------------------------------------------------------------- /matrices/KN/N360_K120_GF4096.txt: -------------------------------------------------------------------------------- 1 | 30 20 4096 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 | 1 0 2 361 3 1026 5 | 1 0 4 361 5 1026 6 | 2 361 6 1026 7 0 7 | 3 1026 8 0 9 361 8 | 4 361 10 1026 11 0 9 | 5 1026 12 0 13 361 10 | 6 1026 14 0 15 361 11 | 7 0 16 361 17 1026 12 | 8 0 18 361 19 1026 13 | 9 361 20 1026 21 0 14 | 10 1026 14 2277 22 2054 15 | 11 0 18 365 23 3746 16 | 12 0 16 362 24 1026 17 | 13 361 20 1049 25 3060 18 | 15 361 19 1036 26 6 19 | 17 1026 21 53 27 1943 20 | 22 2054 27 4037 28 2720 21 | 23 3746 24 550 29 2116 22 | 25 3060 26 111 30 850 23 | 28 2720 29 3483 30 1366 -------------------------------------------------------------------------------- /matrices/KN/N360_K120_GF64.txt: -------------------------------------------------------------------------------- 1 | 60 40 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 | 1 0 21 15 41 41 5 | 2 15 22 41 42 0 6 | 3 15 23 41 43 0 7 | 4 15 24 41 44 0 8 | 5 15 25 41 45 0 9 | 6 15 26 41 46 0 10 | 7 15 27 41 47 0 11 | 8 15 28 41 48 0 12 | 9 15 29 41 49 0 13 | 10 15 30 41 50 0 14 | 11 15 41 0 51 41 15 | 12 15 42 41 52 0 16 | 13 15 43 41 53 0 17 | 14 15 44 41 54 0 18 | 15 15 45 41 55 0 19 | 16 15 46 41 56 0 20 | 17 15 47 41 57 0 21 | 18 15 48 41 58 0 22 | 19 41 49 15 59 0 23 | 20 15 50 41 60 0 24 | 1 15 31 0 52 41 25 | 2 0 32 15 53 41 26 | 3 0 33 15 54 41 27 | 4 0 34 15 55 41 28 | 5 0 35 15 56 41 29 | 6 0 36 15 57 41 30 | 7 0 37 15 58 41 31 | 8 0 38 15 59 41 32 | 9 0 39 15 60 41 33 | 10 0 40 41 51 15 34 | 11 0 23 15 36 41 35 | 12 0 24 15 37 41 36 | 13 0 25 15 38 41 37 | 14 0 26 15 39 41 38 | 15 41 27 15 40 0 39 | 16 0 28 15 31 41 40 | 17 41 29 15 32 0 41 | 18 0 30 15 33 41 42 | 19 15 21 0 34 41 43 | 20 0 22 15 35 41 -------------------------------------------------------------------------------- /matrices/KN/N360_K120_GF64_ali.txt: -------------------------------------------------------------------------------- 1 | 60 40 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 | 1 0 2 15 3 41 5 | 1 0 4 22 5 37 6 | 2 15 6 0 7 41 7 | 3 41 8 0 9 15 8 | 4 22 10 37 11 0 9 | 5 37 12 0 13 22 10 | 6 0 14 26 15 48 11 | 7 41 16 15 17 0 12 | 8 0 18 48 19 26 13 | 9 15 20 0 21 41 14 | 10 37 22 0 23 22 15 | 11 0 24 48 25 26 16 | 12 0 26 15 27 41 17 | 13 22 28 37 29 0 18 | 14 26 30 0 31 48 19 | 15 48 32 26 33 0 20 | 16 15 34 0 35 41 21 | 17 0 36 15 37 41 22 | 18 48 38 0 39 26 23 | 19 26 40 48 41 0 24 | 20 0 42 37 43 22 25 | 21 41 44 0 45 15 26 | 22 0 30 16 46 41 27 | 23 22 38 54 47 38 28 | 24 48 34 1 48 26 29 | 25 26 42 20 49 39 30 | 26 15 32 46 50 62 31 | 27 41 40 22 51 59 32 | 28 37 36 5 52 21 33 | 29 0 44 23 53 38 34 | 31 48 43 17 54 32 35 | 33 0 39 28 55 47 36 | 35 41 45 11 56 58 37 | 37 41 41 29 57 4 38 | 46 41 51 0 56 28 39 | 47 38 53 59 58 12 40 | 48 26 50 24 59 2 41 | 49 39 52 33 55 10 42 | 54 32 57 56 60 15 43 | 58 12 59 27 60 58 44 | -------------------------------------------------------------------------------- /matrices/KN/N360_K240_GF64.txt: -------------------------------------------------------------------------------- 1 | 60 20 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 | 1 0 11 6 21 13 31 20 41 46 51 55 5 | 2 0 12 6 22 13 32 20 42 46 52 55 6 | 3 6 13 13 23 0 33 20 43 46 53 55 7 | 4 6 14 13 24 20 34 0 44 46 54 55 8 | 5 6 15 13 25 20 35 46 45 0 55 55 9 | 6 6 16 13 26 20 36 46 46 55 56 0 10 | 7 6 17 13 27 20 37 46 47 55 57 0 11 | 8 6 18 13 28 20 38 46 48 55 58 0 12 | 9 6 19 13 29 20 39 46 49 55 59 0 13 | 10 6 20 13 30 20 40 46 50 55 60 0 14 | 1 6 12 0 23 13 34 20 45 46 56 55 15 | 2 6 13 0 24 13 35 20 46 46 57 55 16 | 3 0 14 6 25 13 36 20 47 46 58 55 17 | 4 0 15 6 26 13 37 20 48 46 59 55 18 | 5 0 16 6 27 13 38 20 49 46 60 55 19 | 6 0 17 6 28 13 39 55 50 20 51 46 20 | 7 0 18 6 29 13 40 20 41 55 52 46 21 | 8 0 19 6 30 13 31 55 42 20 53 46 22 | 9 0 20 6 21 20 32 13 43 55 54 46 23 | 10 0 11 13 22 20 33 55 44 6 55 46 -------------------------------------------------------------------------------- /matrices/KN/N432_K144_GF256.txt: -------------------------------------------------------------------------------- 1 | 54 36 256 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 | 1 0 19 175 37 247 5 | 2 175 20 247 38 0 6 | 3 175 21 247 39 0 7 | 4 175 22 247 40 0 8 | 5 175 23 247 41 0 9 | 6 175 24 247 42 0 10 | 7 175 25 247 43 0 11 | 8 175 26 247 44 0 12 | 9 175 27 247 45 0 13 | 10 175 37 0 46 247 14 | 11 175 38 247 47 0 15 | 12 175 39 247 48 0 16 | 13 175 40 247 49 0 17 | 14 175 41 247 50 0 18 | 15 175 42 247 51 0 19 | 16 175 43 247 52 0 20 | 17 175 44 247 53 0 21 | 18 175 45 247 54 0 22 | 1 175 28 0 47 247 23 | 2 0 29 175 48 247 24 | 3 0 30 175 49 247 25 | 4 0 31 175 50 247 26 | 5 0 32 175 51 247 27 | 6 0 33 175 52 247 28 | 7 0 34 247 53 175 29 | 8 0 35 175 54 247 30 | 9 0 36 247 46 175 31 | 10 247 23 175 29 0 32 | 11 247 24 175 30 0 33 | 12 0 25 175 31 247 34 | 13 0 26 175 32 247 35 | 14 0 27 175 33 247 36 | 15 0 19 247 34 175 37 | 16 0 20 175 35 247 38 | 17 247 21 0 36 175 39 | 18 247 22 0 28 175 -------------------------------------------------------------------------------- /matrices/KN/N432_K144_GF64.txt: -------------------------------------------------------------------------------- 1 | 72 48 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 | 1 0 25 15 49 41 5 | 2 0 26 15 50 41 6 | 3 15 27 41 51 0 7 | 4 15 28 41 52 0 8 | 5 15 29 41 53 0 9 | 6 15 30 41 54 0 10 | 7 15 31 41 55 0 11 | 8 15 32 41 56 0 12 | 9 0 33 15 57 41 13 | 10 15 34 0 58 41 14 | 11 15 35 0 59 41 15 | 12 15 36 0 60 41 16 | 13 15 37 0 61 41 17 | 14 15 38 0 62 41 18 | 15 15 39 0 63 41 19 | 16 15 40 0 64 41 20 | 17 15 41 41 65 0 21 | 18 0 42 15 66 41 22 | 19 15 43 41 67 0 23 | 20 15 44 41 68 0 24 | 21 15 45 41 69 0 25 | 22 15 46 41 70 0 26 | 23 15 47 41 71 0 27 | 24 15 48 41 72 0 28 | 1 15 33 0 65 41 29 | 2 15 34 41 66 0 30 | 3 0 35 15 67 41 31 | 4 0 36 15 68 41 32 | 5 0 37 15 69 41 33 | 6 0 38 15 70 41 34 | 7 0 39 15 71 41 35 | 8 0 40 15 72 41 36 | 9 15 42 0 51 41 37 | 10 0 43 15 52 41 38 | 11 0 44 15 53 41 39 | 12 0 45 15 54 41 40 | 13 0 46 15 55 41 41 | 14 0 47 15 56 41 42 | 15 41 48 0 49 15 43 | 16 41 41 0 50 15 44 | 17 41 28 0 61 15 45 | 18 41 29 0 62 15 46 | 19 41 30 0 63 15 47 | 20 41 31 0 64 15 48 | 21 41 32 0 57 15 49 | 22 0 25 41 58 15 50 | 23 0 26 41 59 15 51 | 24 41 27 0 60 15 -------------------------------------------------------------------------------- /matrices/KN/N512_K256_GF256.txt: -------------------------------------------------------------------------------- 1 | 64 32 256 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 | 6 | 13 231 25 61 37 238 61 53 7 | 14 39 26 116 38 124 62 46 8 | 15 14 27 199 39 22 63 192 9 | 16 105 28 113 40 35 64 28 10 | 13 139 17 62 33 147 57 69 11 | 14 98 18 175 34 183 58 105 12 | 15 78 19 248 35 0 59 70 13 | 16 140 20 218 36 210 60 133 14 | 5 196 21 11 27 189 53 19 15 | 6 224 22 39 28 47 54 217 16 | 7 94 23 172 25 87 55 164 17 | 8 170 24 85 26 92 56 162 18 | 1 244 29 66 41 74 61 251 19 | 2 142 30 134 42 57 62 64 20 | 3 130 31 208 43 123 63 200 21 | 4 231 32 161 44 239 64 154 22 | 9 41 35 118 44 48 55 126 23 | 10 106 36 184 41 176 56 99 24 | 11 72 33 242 42 249 53 64 25 | 12 213 34 206 43 36 54 28 26 | 1 233 24 240 45 63 59 55 27 | 2 212 21 127 46 134 60 204 28 | 3 88 22 95 47 173 57 165 29 | 4 6 23 91 48 13 58 83 30 | 5 226 18 49 32 219 49 41 31 | 6 118 19 48 29 126 50 41 32 | 7 40 20 110 30 118 51 33 33 | 8 232 17 224 31 154 52 147 34 | 9 18 37 196 46 203 52 26 35 | 10 211 38 218 47 41 49 33 36 | 11 145 39 215 48 223 50 138 37 | 12 157 40 227 45 235 51 150 -------------------------------------------------------------------------------- /matrices/KN/N528_K264_GF64_BeiDou.txt: -------------------------------------------------------------------------------- 1 | 88 44 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 15 29 36 23 57 0 71 43 5 | 2 50 28 59 46 34 55 12 6 | 3 5 27 0 62 44 80 14 7 | 13 23 39 0 53 43 69 52 8 | 18 0 40 43 45 52 76 23 9 | 18 12 44 17 68 59 82 34 10 | 1 43 38 52 71 23 87 0 11 | 19 14 29 34 68 45 86 55 12 | 2 43 37 29 72 23 88 0 13 | 13 32 38 41 58 13 84 4 14 | 8 44 26 14 52 5 61 0 15 | 12 23 30 0 56 43 74 29 16 | 24 17 42 14 64 31 88 60 17 | 10 44 34 14 60 5 78 0 18 | 24 43 44 29 59 23 78 0 19 | 10 60 36 46 50 19 73 7 20 | 23 44 41 14 63 5 87 0 21 | 6 38 32 35 50 33 76 32 22 | 1 52 27 23 45 0 56 43 23 | 17 14 39 5 46 0 75 44 24 | 7 33 32 2 52 54 81 8 25 | 4 0 28 43 61 29 79 23 26 | 14 39 40 31 54 60 70 17 27 | 3 14 21 5 47 0 69 44 28 | 5 0 31 44 49 14 75 5 29 | 20 33 22 32 64 44 65 35 30 | 20 52 30 23 67 0 85 43 31 | 4 23 22 0 48 43 70 52 32 | 5 43 41 34 54 30 85 49 33 | 11 0 29 43 55 52 73 23 34 | 9 29 35 23 49 0 74 43 35 | 16 43 34 34 48 60 80 49 36 | 15 5 33 0 47 44 79 14 37 | 16 52 35 23 58 0 72 43 38 | 7 29 25 23 51 0 62 43 39 | 23 0 43 43 60 52 77 23 40 | 12 54 26 8 66 33 83 2 41 | 14 14 37 5 57 0 83 44 42 | 11 36 25 31 65 51 84 46 43 | 6 11 42 24 53 35 86 13 44 | 8 23 31 0 51 43 82 29 45 | 9 1 33 49 59 21 77 13 46 | 17 14 43 5 67 0 81 44 47 | 19 0 21 43 63 52 66 23 48 | -------------------------------------------------------------------------------- /matrices/KN/N572_K288_GF64_Beidou.txt: -------------------------------------------------------------------------------- 1 | 96 48 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 20 1 47 45 50 15 77 6 5 | 23 18 42 15 69 32 95 61 6 | 9 24 41 1 61 44 88 53 7 | 6 44 39 53 71 24 90 1 8 | 24 45 38 15 59 6 84 1 9 | 7 32 31 61 55 18 77 40 10 | 2 30 26 24 50 1 80 44 11 | 9 24 37 1 52 44 85 53 12 | 12 1 34 45 60 15 82 6 13 | 17 33 32 45 66 36 74 34 14 | 22 44 43 35 76 31 93 50 15 | 5 24 40 1 72 44 89 30 16 | 6 1 30 44 54 53 72 24 17 | 21 3 45 55 55 9 76 34 18 | 16 30 27 24 67 1 82 44 19 | 17 39 35 36 65 34 93 33 20 | 16 6 44 1 57 45 92 15 21 | 15 1 28 45 68 15 81 6 22 | 13 15 46 46 70 45 80 44 23 | 4 15 39 6 57 1 87 45 24 | 21 44 44 53 75 24 94 1 25 | 5 6 29 1 53 45 71 15 26 | 8 26 32 27 56 37 78 5 27 | 14 24 45 1 69 44 79 30 28 | 18 45 31 15 65 6 73 1 29 | 10 35 42 31 62 50 87 44 30 | 20 32 25 42 68 47 96 37 31 | 22 44 46 53 56 24 75 1 32 | 19 24 48 1 49 44 78 53 33 | 18 22 36 14 66 2 94 50 34 | 19 45 26 15 67 6 95 1 35 | 1 53 30 24 63 1 86 44 36 | 14 57 33 25 64 9 92 41 37 | 2 6 29 1 64 45 85 15 38 | 10 24 38 1 51 44 86 30 39 | 4 1 28 44 52 53 74 24 40 | 23 30 37 24 60 1 83 44 41 | 7 45 48 15 61 6 90 1 42 | 3 6 27 1 51 45 73 15 43 | 1 44 25 53 49 24 79 1 44 | 15 9 43 41 58 57 91 58 45 | 8 24 47 1 62 44 89 30 46 | 24 1 41 44 70 30 96 24 47 | 3 7 40 38 58 23 88 54 48 | 12 35 36 13 53 51 84 60 49 | 13 6 34 1 63 45 91 15 50 | 11 33 35 42 54 14 83 5 51 | 11 1 33 44 59 30 81 24 52 | -------------------------------------------------------------------------------- /matrices/KN/N576_K288_GF64.txt: -------------------------------------------------------------------------------- 1 | 96 48 64 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 | 6 | 1 29 25 38 49 3 73 51 7 | 2 52 26 30 50 4 74 39 8 | 3 29 27 44 51 16 75 7 9 | 4 36 28 45 52 10 76 58 10 | 5 6 29 32 53 41 74 54 11 | 6 20 30 11 54 33 75 48 12 | 7 39 31 52 55 30 76 4 13 | 8 59 32 50 56 9 73 24 14 | 9 31 33 57 57 16 77 3 15 | 10 60 34 25 58 10 78 51 16 | 11 60 35 23 59 45 79 32 17 | 12 49 36 23 60 8 80 58 18 | 13 3 37 51 61 29 81 38 19 | 14 5 38 18 62 59 82 33 20 | 15 48 39 39 63 61 83 13 21 | 16 28 40 54 64 13 84 0 22 | 5 21 41 30 63 58 85 43 23 | 6 25 42 16 64 53 86 38 24 | 7 16 43 25 61 53 87 38 25 | 8 40 44 62 62 14 88 49 26 | 45 11 60 20 87 33 17 48 27 | 46 17 57 8 88 30 18 45 28 | 47 59 58 24 85 50 19 9 29 | 48 49 59 12 86 21 20 34 30 | 9 20 30 55 65 46 89 5 31 | 10 4 31 41 66 26 90 13 32 | 11 33 32 59 67 18 91 5 33 | 12 33 29 59 68 5 92 18 34 | 1 48 41 61 69 39 90 13 35 | 2 46 42 9 70 31 91 18 36 | 3 11 43 26 71 52 92 61 37 | 4 30 44 43 72 21 89 58 38 | 21 52 38 43 69 17 77 2 39 | 22 22 39 59 70 31 78 44 40 | 23 51 40 36 71 14 79 23 41 | 24 43 37 52 72 17 80 2 42 | 21 54 48 41 55 32 93 6 43 | 22 42 45 16 56 1 94 51 44 | 23 15 46 6 53 43 95 28 45 | 24 11 47 26 54 52 96 61 46 | 13 47 35 25 49 62 96 34 47 | 14 51 36 25 50 10 93 60 48 | 15 6 33 32 51 41 94 54 49 | 16 18 34 53 52 44 95 3 50 | 25 53 65 3 84 18 17 44 51 | 26 47 66 60 81 12 18 38 52 | 27 0 67 26 82 48 19 35 53 | 28 35 68 7 83 20 20 61 -------------------------------------------------------------------------------- /matrices/KN/N576_K480_GF256.txt: -------------------------------------------------------------------------------- 1 | 72 12 256 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 | 12 12 12 12 12 12 12 12 12 12 12 12 5 | 6 | 1 209 7 26 19 245 25 120 31 227 37 77 43 251 49 5 55 83 61 155 67 68 13 142 7 | 2 249 8 66 20 144 26 57 32 234 38 240 44 131 50 216 56 198 62 72 68 15 14 109 8 | 3 20 9 79 21 218 27 5 33 57 39 14 45 197 51 182 57 146 63 164 69 188 15 92 9 | 1 160 10 108 16 117 21 123 28 182 34 249 38 195 46 30 52 36 55 12 64 66 70 45 10 | 2 39 11 252 17 113 19 216 29 54 35 91 39 180 47 48 53 126 56 222 65 231 71 198 11 | 3 32 12 23 18 182 20 236 30 75 36 38 37 164 48 110 54 206 57 215 66 200 72 97 12 | 4 233 12 56 22 254 28 128 31 218 40 224 47 50 50 115 58 182 64 93 69 41 13 200 13 | 5 130 10 109 23 224 29 172 32 4 41 58 48 181 51 187 59 76 65 246 67 94 14 100 14 | 6 236 11 206 24 38 30 23 33 97 42 182 46 32 49 110 60 215 66 164 68 75 15 200 15 | 4 26 8 50 16 174 24 80 27 8 36 59 41 131 43 209 53 44 58 196 63 122 71 137 16 | 5 138 9 33 17 66 22 181 25 51 34 87 42 144 44 15 54 203 59 216 61 57 72 129 17 | 6 70 7 28 18 157 23 253 26 85 35 144 40 79 45 229 52 7 60 247 62 211 70 122 -------------------------------------------------------------------------------- /matrices/KN/N576_K480_GF64.txt: -------------------------------------------------------------------------------- 1 | 96 16 64 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 | 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 5 | 6 | 1 44 9 23 25 35 33 29 41 6 49 52 57 50 65 18 73 38 81 12 89 0 17 58 7 | 2 50 10 48 26 36 34 61 42 27 50 10 58 21 66 42 74 56 82 33 90 4 18 16 8 | 3 51 11 45 27 19 35 59 43 53 51 1 59 13 67 30 75 39 83 24 91 36 19 7 9 | 4 0 12 42 28 25 36 48 44 31 52 8 60 57 68 36 76 2 84 51 92 13 20 19 10 | 1 40 13 26 21 34 27 0 37 57 45 32 50 51 61 17 69 45 76 5 85 20 93 11 11 | 2 58 14 52 22 44 28 35 38 12 46 18 51 6 62 23 70 29 73 38 86 0 94 50 12 | 3 52 15 37 23 14 25 58 39 3 47 43 52 46 63 20 71 8 74 31 87 60 95 26 13 | 4 5 16 36 24 53 26 59 40 24 48 11 49 62 64 19 72 47 75 13 88 42 96 30 14 | 5 31 13 16 29 43 38 45 44 56 53 51 63 22 66 37 77 28 88 5 89 62 19 11 15 | 6 2 14 4 30 59 39 27 41 50 54 15 64 21 67 10 78 33 85 38 90 44 20 53 16 | 7 36 15 19 31 13 40 51 42 2 55 25 61 57 68 59 79 42 86 7 91 45 17 30 17 | 8 36 16 50 32 27 37 48 43 56 56 21 62 10 65 33 80 4 87 42 92 16 18 61 18 | 5 20 10 8 23 43 32 52 36 26 45 46 55 60 57 14 72 37 78 58 83 31 94 3 19 | 6 50 11 61 24 48 29 33 33 27 46 56 56 10 58 36 69 21 79 16 84 4 95 42 20 | 7 23 12 17 21 11 30 40 34 0 47 34 53 61 59 6 70 55 80 49 81 29 96 46 21 | 8 14 9 1 22 49 31 20 35 52 48 37 54 43 60 58 71 9 77 32 82 3 93 26 -------------------------------------------------------------------------------- /matrices/KN/N600_K480_GF64.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/matrices/KN/N600_K480_GF64.txt -------------------------------------------------------------------------------- /matrices/KN/N720_K240_GF64.txt: -------------------------------------------------------------------------------- 1 | 120 80 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 | 1 0 6 21 11 37 5 | 2 0 7 21 12 37 6 | 3 0 8 21 13 37 7 | 4 0 9 21 14 37 8 | 5 0 10 21 15 37 9 | 16 0 21 37 26 21 10 | 17 0 22 37 27 21 11 | 18 0 23 37 28 21 12 | 19 0 24 37 29 21 13 | 20 0 25 37 30 21 14 | 31 37 36 0 41 21 15 | 32 37 37 0 42 21 16 | 33 37 38 0 43 21 17 | 34 37 39 0 44 21 18 | 35 37 40 0 45 21 19 | 46 0 51 37 56 21 20 | 47 0 52 37 57 21 21 | 48 0 53 37 58 21 22 | 49 0 54 37 59 21 23 | 50 0 55 37 60 21 24 | 1 0 33 37 61 21 25 | 2 0 34 37 62 21 26 | 3 0 35 37 63 21 27 | 4 0 31 37 64 21 28 | 5 0 32 37 65 21 29 | 49 0 65 21 66 37 30 | 50 0 61 21 67 37 31 | 46 0 62 21 68 37 32 | 47 0 63 21 69 37 33 | 48 0 64 21 70 37 34 | 17 0 71 0 76 0 35 | 18 0 72 0 77 0 36 | 19 0 73 0 78 0 37 | 20 0 74 0 79 0 38 | 16 0 75 0 80 0 39 | 36 0 71 35 81 21 40 | 37 0 72 35 82 21 41 | 38 0 73 35 83 21 42 | 39 0 74 35 84 21 43 | 40 0 75 35 85 21 44 | 6 21 52 37 86 0 45 | 7 21 53 37 87 0 46 | 8 21 54 37 88 0 47 | 9 21 55 37 89 0 48 | 10 21 51 37 90 0 49 | 43 21 91 0 96 37 50 | 44 21 92 0 97 37 51 | 45 21 93 0 98 37 52 | 41 21 94 0 99 37 53 | 42 21 95 0 100 37 54 | 76 0 101 21 106 37 55 | 77 0 102 21 107 37 56 | 78 0 103 21 108 37 57 | 79 0 104 21 109 37 58 | 80 0 105 21 110 37 59 | 21 37 94 1 102 26 60 | 22 37 95 1 103 26 61 | 23 37 91 1 104 26 62 | 24 37 92 1 105 26 63 | 25 37 93 1 101 26 64 | 12 37 106 46 111 0 65 | 13 37 107 46 112 0 66 | 14 37 108 46 113 0 67 | 15 37 109 46 114 0 68 | 11 37 110 46 115 0 69 | 87 0 100 2 115 47 70 | 88 0 96 2 111 47 71 | 89 0 97 2 112 47 72 | 90 0 98 2 113 47 73 | 86 0 99 2 114 47 74 | 26 21 66 37 116 0 75 | 27 21 67 37 117 0 76 | 28 21 68 37 118 0 77 | 29 21 69 37 119 0 78 | 30 21 70 37 120 0 79 | 56 21 81 12 119 60 80 | 57 21 82 12 120 60 81 | 58 21 83 12 116 60 82 | 59 21 84 12 117 60 83 | 60 21 85 12 118 60 84 | -------------------------------------------------------------------------------- /matrices/KN/N864_K720_GF64.txt: -------------------------------------------------------------------------------- 1 | 144 24 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 4 | 1 44 13 1 25 32 37 5 49 38 61 10 73 60 85 15 97 50 109 21 121 56 133 26 5 | 2 44 14 1 26 32 38 5 50 38 62 10 74 60 86 15 98 50 110 21 122 56 134 26 6 | 3 44 15 1 27 32 39 5 51 38 63 10 75 60 87 15 99 50 111 21 123 56 135 26 7 | 4 44 16 1 28 32 40 5 52 38 64 10 76 60 88 15 100 50 112 21 124 56 136 26 8 | 5 44 17 1 29 32 41 5 53 38 65 10 77 60 89 15 101 50 113 21 125 56 137 26 9 | 6 44 18 1 30 32 42 5 54 38 66 10 78 60 90 15 102 50 114 21 126 56 138 26 10 | 7 44 19 1 31 32 43 5 55 38 67 10 79 60 91 15 103 50 115 21 127 56 139 26 11 | 8 44 20 1 32 32 44 5 56 38 68 10 80 60 92 15 104 50 116 21 128 56 140 26 12 | 9 44 21 1 33 32 45 5 57 38 69 10 81 60 93 15 105 50 117 21 129 56 141 26 13 | 10 44 22 1 34 32 46 5 58 38 70 10 82 60 94 15 106 50 118 21 130 56 142 26 14 | 11 44 23 1 35 32 47 5 59 38 71 10 83 60 95 15 107 50 119 21 131 56 143 26 15 | 12 44 24 1 36 32 48 5 60 38 72 10 84 60 96 15 108 50 120 21 132 56 144 26 16 | 1 1 14 32 27 5 40 38 53 10 66 60 79 15 92 50 105 21 118 56 131 26 144 44 17 | 2 1 15 32 28 5 41 38 54 10 67 60 80 15 93 50 106 21 119 56 132 26 133 44 18 | 3 1 16 32 29 5 42 38 55 10 68 60 81 15 94 50 107 21 120 56 121 26 134 44 19 | 4 1 17 32 30 5 43 38 56 10 69 60 82 15 95 50 108 21 109 56 122 26 135 44 20 | 5 1 18 32 31 5 44 38 57 10 70 60 83 15 96 50 97 21 110 56 123 26 136 44 21 | 6 1 19 32 32 5 45 38 58 10 71 60 84 15 85 50 98 21 111 56 124 26 137 44 22 | 7 1 20 32 33 5 46 38 59 10 72 60 73 15 86 50 99 21 112 56 125 26 138 44 23 | 8 1 21 32 34 5 47 38 60 10 61 60 74 15 87 50 100 21 113 56 126 26 139 44 24 | 9 1 22 32 35 5 48 38 49 10 62 60 75 15 88 50 101 21 114 56 127 26 140 44 25 | 10 1 23 32 36 5 37 38 50 10 63 60 76 15 89 50 102 21 115 56 128 26 141 44 26 | 11 1 24 32 25 5 38 38 51 10 64 60 77 15 90 50 103 21 116 56 129 26 142 44 27 | 12 1 13 32 26 5 39 38 52 10 65 60 78 15 91 50 104 21 117 56 130 26 143 44 -------------------------------------------------------------------------------- /matrices/KN/N882_K294_GF64.txt: -------------------------------------------------------------------------------- 1 | 147 98 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 | 1 0 50 15 99 41 5 | 2 0 51 15 100 41 6 | 3 0 52 15 101 41 7 | 4 15 53 41 102 0 8 | 5 15 54 41 103 0 9 | 6 15 55 41 104 0 10 | 7 15 56 41 105 0 11 | 8 15 57 41 106 0 12 | 9 15 58 41 107 0 13 | 10 15 59 41 108 0 14 | 11 15 60 41 109 0 15 | 12 15 61 41 110 0 16 | 13 0 62 41 111 15 17 | 14 0 63 41 112 15 18 | 15 15 64 41 113 0 19 | 16 15 65 41 114 0 20 | 17 15 66 41 115 0 21 | 18 15 67 41 116 0 22 | 19 15 68 41 117 0 23 | 20 15 69 41 118 0 24 | 21 15 70 41 119 0 25 | 22 15 71 41 120 0 26 | 23 15 72 41 121 0 27 | 24 0 73 41 122 15 28 | 25 0 74 41 123 15 29 | 26 15 75 41 124 0 30 | 27 15 76 41 125 0 31 | 28 15 77 41 126 0 32 | 29 15 78 41 127 0 33 | 30 15 79 41 128 0 34 | 31 15 80 41 129 0 35 | 32 15 81 41 130 0 36 | 33 15 82 41 131 0 37 | 34 15 83 41 132 0 38 | 35 0 84 41 133 15 39 | 36 0 85 41 134 15 40 | 37 15 86 41 135 0 41 | 38 15 87 41 136 0 42 | 39 15 88 41 137 0 43 | 40 15 89 41 138 0 44 | 41 15 90 41 139 0 45 | 42 15 91 41 140 0 46 | 43 15 92 41 141 0 47 | 44 15 93 41 142 0 48 | 45 15 94 41 143 0 49 | 46 0 95 41 144 15 50 | 47 0 96 41 145 15 51 | 48 15 97 41 146 0 52 | 49 15 98 41 147 0 53 | 1 15 51 0 102 41 54 | 2 15 52 0 103 41 55 | 3 15 53 0 104 41 56 | 4 0 54 15 105 41 57 | 5 0 55 15 106 41 58 | 6 0 56 15 107 41 59 | 7 41 57 0 108 15 60 | 8 41 58 0 109 15 61 | 9 41 59 0 110 15 62 | 10 41 60 15 111 0 63 | 11 41 61 15 112 0 64 | 12 0 62 15 113 41 65 | 13 15 63 0 114 41 66 | 14 15 64 0 115 41 67 | 15 0 65 15 116 41 68 | 16 0 66 15 117 41 69 | 17 0 67 15 118 41 70 | 18 41 68 0 119 15 71 | 19 41 69 0 120 15 72 | 20 41 70 0 121 15 73 | 21 41 71 15 122 0 74 | 22 41 72 15 123 0 75 | 23 0 73 15 124 41 76 | 24 15 74 0 125 41 77 | 25 15 75 0 126 41 78 | 26 0 76 15 127 41 79 | 27 0 77 15 128 41 80 | 28 0 78 15 129 41 81 | 29 41 79 0 130 15 82 | 30 41 80 0 131 15 83 | 31 41 81 0 132 15 84 | 32 41 82 15 133 0 85 | 33 41 83 15 134 0 86 | 34 0 84 15 135 41 87 | 35 15 85 0 136 41 88 | 36 15 86 0 137 41 89 | 37 0 87 15 138 41 90 | 38 0 88 15 139 41 91 | 39 0 89 15 140 41 92 | 40 41 90 0 141 15 93 | 41 41 91 0 142 15 94 | 42 41 92 0 143 15 95 | 43 41 93 15 144 0 96 | 44 41 94 15 145 0 97 | 45 0 95 15 146 41 98 | 46 15 96 0 147 41 99 | 47 41 97 0 99 15 100 | 48 41 98 0 100 15 101 | 49 41 50 0 101 15 -------------------------------------------------------------------------------- /matrices/KN/N96_K48_GF256.txt: -------------------------------------------------------------------------------- 1 | 12 6 256 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 4 | 4 4 4 4 4 4 5 | 6 | 2 112 6 120 7 42 8 35 7 | 1 174 3 97 8 182 9 104 8 | 2 111 4 196 9 188 10 118 9 | 3 89 5 96 10 166 11 174 10 | 4 141 6 63 11 133 12 56 11 | 1 104 5 97 7 182 12 174 -------------------------------------------------------------------------------- /matrices/KN/N96_K48_GF64.txt: -------------------------------------------------------------------------------- 1 | 16 8 64 2 | 3 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 | 4 4 4 4 4 4 4 4 5 | 6 | 4 27 7 1 10 36 16 49 7 | 4 60 5 45 9 32 15 23 8 | 2 6 6 21 7 56 14 47 9 | 1 32 8 23 11 60 16 45 10 | 3 52 9 61 11 26 14 11 11 | 1 39 6 2 12 24 15 11 12 | 2 36 5 45 8 10 13 58 13 | 3 62 10 12 12 53 13 27 -------------------------------------------------------------------------------- /matrices/KN/N972_K486_GF64_BeiDou.txt: -------------------------------------------------------------------------------- 1 | 162 81 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 20 45 68 44 110 43 131 14 5 | 27 57 72 55 105 59 133 61 6 | 14 53 43 6 102 37 147 22 7 | 24 25 62 21 114 13 127 1 8 | 23 34 61 0 113 30 129 43 9 | 4 15 46 62 85 19 127 8 10 | 21 41 78 46 89 36 159 31 11 | 1 62 43 12 82 53 124 9 12 | 23 0 76 20 108 24 144 6 13 | 18 40 60 47 96 1 141 26 14 | 22 45 78 24 107 21 143 47 15 | 11 59 53 23 92 3 134 49 16 | 34 24 74 10 114 6 157 0 17 | 9 12 47 26 106 55 147 7 18 | 17 59 64 47 115 1 125 26 19 | 37 52 57 34 122 15 162 12 20 | 37 19 79 15 111 62 149 8 21 | 26 42 59 46 118 17 137 19 22 | 39 8 56 40 121 56 161 57 23 | 29 36 70 52 87 60 160 28 24 | 41 18 68 23 119 41 153 13 25 | 28 14 72 23 86 49 162 36 26 | 31 36 40 52 94 60 155 28 27 | 19 50 67 58 109 62 130 46 28 | 9 62 51 25 90 40 132 11 29 | 1 43 50 50 116 34 152 12 30 | 39 26 81 55 110 7 148 42 31 | 38 37 55 11 123 24 160 50 32 | 33 1 80 45 98 55 121 34 33 | 25 42 70 57 103 18 134 48 34 | 8 48 46 20 108 6 146 34 35 | 17 12 59 28 95 52 140 60 36 | 26 31 71 48 104 57 135 18 37 | 29 31 74 48 102 57 155 18 38 | 31 52 81 39 99 60 122 17 39 | 14 49 56 53 91 59 137 61 40 | 30 22 75 24 100 29 156 15 41 | 20 26 77 36 88 4 158 25 42 | 40 41 67 13 118 23 152 32 43 | 8 4 50 30 89 50 131 29 44 | 24 5 77 44 106 55 142 18 45 | 38 0 80 44 109 14 150 5 46 | 32 23 79 49 97 36 123 14 47 | 5 45 47 57 86 17 128 5 48 | 28 8 73 2 101 42 154 28 49 | 35 16 75 31 112 57 158 36 50 | 7 29 48 0 107 43 145 6 51 | 10 0 61 43 97 29 142 23 52 | 4 42 66 33 105 47 150 56 53 | 36 46 73 19 113 32 159 25 54 | 2 27 51 3 117 51 153 43 55 | 35 39 52 20 84 43 139 16 56 | 21 51 69 16 111 23 132 60 57 | 33 42 42 33 96 47 154 56 58 | 5 41 64 13 103 23 148 32 59 | 42 7 69 42 120 26 151 55 60 | 32 57 41 18 95 31 156 48 61 | 6 17 65 5 104 60 149 20 62 | 16 28 66 6 117 9 124 15 63 | 12 42 63 21 99 40 144 19 64 | 18 8 65 2 116 62 126 42 65 | 13 32 55 44 93 35 136 33 66 | 27 7 60 42 119 26 138 55 67 | 3 14 45 31 84 17 126 60 68 | 22 35 63 18 112 2 128 56 69 | 30 55 71 7 85 45 161 12 70 | 13 37 45 22 101 54 146 21 71 | 34 26 54 4 83 1 141 61 72 | 2 4 44 25 83 26 125 36 73 | 6 38 48 8 87 29 129 47 74 | 16 61 58 53 94 55 139 59 75 | 25 45 58 43 120 13 136 14 76 | 15 23 44 22 100 44 145 10 77 | 3 28 49 40 115 9 151 15 78 | 15 28 57 6 92 9 138 15 79 | 7 38 49 55 88 29 130 47 80 | 36 17 53 39 82 31 140 60 81 | 11 8 62 2 98 62 143 42 82 | 19 14 76 0 90 41 157 44 83 | 12 10 54 59 93 5 135 48 84 | 10 21 52 14 91 11 133 32 85 | -------------------------------------------------------------------------------- /matrices/KN/readme.txt.txt: -------------------------------------------------------------------------------- 1 | Matrice from Kaiserslautern 2 | 3 | http://www.uni-kl.de/channel-codes/channel-codes-database/non-binary-ldpc/ -------------------------------------------------------------------------------- /matrices/N1200_K600_GF64.txt: -------------------------------------------------------------------------------- 1 | 200 100 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 11 62 102 150 5 | 4 90 131 177 6 | 13 57 135 198 7 | 6 58 106 158 8 | 10 61 101 149 9 | 17 98 151 187 10 | 21 83 119 153 11 | 40 53 132 159 12 | 34 69 125 162 13 | 23 81 117 155 14 | 34 82 130 182 15 | 2 54 102 154 16 | 36 84 120 169 17 | 28 76 124 176 18 | 29 85 112 165 19 | 25 66 121 174 20 | 35 70 126 163 21 | 35 83 131 183 22 | 33 81 129 181 23 | 30 78 126 178 24 | 1 48 143 198 25 | 41 99 147 195 26 | 37 91 139 187 27 | 16 97 150 186 28 | 38 88 136 184 29 | 9 60 100 148 30 | 47 95 138 191 31 | 24 65 120 173 32 | 8 60 108 160 33 | 39 87 123 168 34 | 46 94 137 190 35 | 31 87 114 167 36 | 19 96 149 185 37 | 23 75 119 175 38 | 24 93 111 182 39 | 1 53 101 153 40 | 18 70 114 170 41 | 25 94 108 183 42 | 36 90 138 186 43 | 45 93 136 189 44 | 37 85 121 170 45 | 32 80 128 180 46 | 10 62 110 162 47 | 41 54 133 156 48 | 9 61 109 161 49 | 40 98 146 194 50 | 31 79 127 179 51 | 5 91 128 178 52 | 11 63 111 163 53 | 47 74 141 189 54 | 0 51 142 197 55 | 51 79 146 195 56 | 6 88 129 179 57 | 44 92 139 188 58 | 15 67 105 167 59 | 14 66 104 166 60 | 2 49 140 199 61 | 16 68 112 168 62 | 42 96 144 192 63 | 20 72 116 172 64 | 46 73 140 188 65 | 26 67 122 175 66 | 39 89 137 185 67 | 33 68 124 161 68 | 27 64 123 172 69 | 3 50 141 196 70 | 0 52 100 152 71 | 19 71 115 171 72 | 20 82 118 152 73 | 26 95 109 180 74 | 18 99 148 184 75 | 3 55 103 155 76 | 30 86 113 166 77 | 32 71 127 160 78 | 49 77 144 193 79 | 22 80 116 154 80 | 44 75 142 190 81 | 7 89 130 176 82 | 4 56 104 156 83 | 50 78 145 194 84 | 7 59 107 159 85 | 12 64 106 164 86 | 14 58 132 199 87 | 8 63 103 151 88 | 17 69 113 169 89 | 13 65 107 165 90 | 29 77 125 177 91 | 21 73 117 173 92 | 12 56 134 197 93 | 28 84 115 164 94 | 48 76 147 192 95 | 43 52 135 158 96 | 15 59 133 196 97 | 38 86 122 171 98 | 45 72 143 191 99 | 5 57 105 157 100 | 22 74 118 174 101 | 43 97 145 193 102 | 42 55 134 157 103 | 27 92 110 181 104 | 105 | 35 13 51 60 106 | 1 44 53 24 107 | 15 6 1 45 108 | 30 24 1 44 109 | 24 1 44 30 110 | 33 42 14 24 111 | 30 24 1 44 112 | 1 45 15 6 113 | 24 1 44 53 114 | 44 53 24 1 115 | 1 44 53 24 116 | 45 15 6 1 117 | 35 13 18 60 118 | 6 1 45 15 119 | 1 44 30 24 120 | 30 24 1 44 121 | 1 44 30 24 122 | 30 24 1 44 123 | 35 46 56 15 124 | 44 30 24 1 125 | 1 44 53 24 126 | 45 15 6 1 127 | 51 60 35 13 128 | 44 53 24 1 129 | 24 1 44 30 130 | 1 44 53 24 131 | 1 45 15 6 132 | 44 53 24 1 133 | 24 1 44 30 134 | 24 1 44 53 135 | 33 42 14 24 136 | 24 1 44 53 137 | 1 45 15 6 138 | 24 1 44 30 139 | 30 24 1 44 140 | 27 28 30 31 141 | 30 24 1 44 142 | 45 15 6 1 143 | 53 24 1 44 144 | 44 53 24 1 145 | 1 44 30 24 146 | 38 23 22 7 147 | 53 24 1 44 148 | 5 33 42 14 149 | 6 1 45 15 150 | 1 44 30 24 151 | 6 1 45 15 152 | 29 28 30 31 153 | 44 30 24 1 154 | 24 1 44 30 155 | 1 45 15 6 156 | 35 46 56 15 157 | 24 1 44 30 158 | 45 15 6 1 159 | 24 1 44 53 160 | 45 15 6 1 161 | 1 44 30 24 162 | 42 36 12 57 163 | 1 45 15 6 164 | 1 44 30 24 165 | 53 24 1 44 166 | 1 45 15 6 167 | 30 1 44 7 168 | 24 1 44 53 169 | 53 24 1 44 170 | 1 44 30 24 171 | 44 53 24 1 172 | 6 1 45 15 173 | 54 7 38 23 174 | 53 24 1 44 175 | 44 30 24 1 176 | 1 44 53 24 177 | 6 1 45 15 178 | 38 49 11 17 179 | 1 44 53 24 180 | 45 15 6 1 181 | 6 1 45 15 182 | 1 45 15 6 183 | 17 38 49 11 184 | 30 24 1 44 185 | 1 45 15 6 186 | 57 25 9 41 187 | 6 1 45 15 188 | 1 45 15 6 189 | 53 24 1 44 190 | 24 1 44 30 191 | 26 22 14 2 192 | 6 1 45 15 193 | 30 24 1 44 194 | 44 30 24 1 195 | 41 16 29 51 196 | 1 45 15 6 197 | 24 1 44 53 198 | 1 45 15 6 199 | 44 53 24 1 200 | 1 44 53 24 201 | 42 47 37 32 202 | 24 1 44 53 203 | 44 30 24 1 204 | 53 24 1 44 205 | -------------------------------------------------------------------------------- /matrices/N528_K264_GF64.txt: -------------------------------------------------------------------------------- 1 | 88 44 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 14 35 56 70 5 | 1 27 45 54 6 | 2 26 61 79 7 | 12 38 52 68 8 | 17 39 44 75 9 | 17 43 67 81 10 | 0 37 70 86 11 | 18 28 67 85 12 | 1 36 71 87 13 | 12 37 57 83 14 | 7 25 51 60 15 | 11 29 55 73 16 | 23 41 63 87 17 | 9 33 59 77 18 | 23 43 58 77 19 | 9 35 49 72 20 | 22 40 62 86 21 | 5 31 49 75 22 | 0 26 44 55 23 | 16 38 45 74 24 | 6 31 51 80 25 | 3 27 60 78 26 | 13 39 53 69 27 | 2 20 46 68 28 | 4 30 48 74 29 | 19 21 63 64 30 | 19 29 66 84 31 | 3 21 47 69 32 | 4 40 53 84 33 | 10 28 54 72 34 | 8 34 48 73 35 | 15 33 47 79 36 | 14 32 46 78 37 | 15 34 57 71 38 | 6 24 50 61 39 | 22 42 59 76 40 | 11 25 65 82 41 | 13 36 56 82 42 | 10 24 64 83 43 | 5 41 52 85 44 | 7 30 50 81 45 | 8 32 58 76 46 | 16 42 66 80 47 | 18 20 62 65 48 | 49 | 30 24 1 44 50 | 51 60 35 13 51 | 6 1 45 15 52 | 24 1 44 53 53 | 1 44 53 24 54 | 13 18 60 35 55 | 44 53 24 1 56 | 15 35 46 56 57 | 44 30 24 1 58 | 33 42 14 5 59 | 45 15 6 1 60 | 24 1 44 30 61 | 18 15 32 61 62 | 45 15 6 1 63 | 44 30 24 1 64 | 61 47 20 8 65 | 45 15 6 1 66 | 39 36 34 33 67 | 53 24 1 44 68 | 15 6 1 45 69 | 34 3 55 9 70 | 1 44 30 24 71 | 40 32 61 18 72 | 15 6 1 45 73 | 1 45 15 6 74 | 34 33 45 36 75 | 53 24 1 44 76 | 24 1 44 53 77 | 44 35 31 50 78 | 1 44 53 24 79 | 30 24 1 44 80 | 44 35 61 50 81 | 6 1 45 15 82 | 53 24 1 44 83 | 30 24 1 44 84 | 1 44 53 24 85 | 55 9 34 3 86 | 15 6 1 45 87 | 37 32 52 47 88 | 12 25 36 14 89 | 24 1 44 30 90 | 2 50 22 14 91 | 15 6 1 45 92 | 1 44 53 24 93 | -------------------------------------------------------------------------------- /matrices/N572_K288_GF64.txt: -------------------------------------------------------------------------------- 1 | 96 48 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 19 46 49 76 5 | 22 41 68 94 6 | 8 40 60 87 7 | 5 38 70 89 8 | 23 37 58 83 9 | 6 30 54 76 10 | 1 25 49 79 11 | 8 36 51 84 12 | 11 33 59 81 13 | 16 31 65 73 14 | 21 42 75 92 15 | 4 39 71 88 16 | 5 29 53 71 17 | 20 44 54 75 18 | 15 26 66 81 19 | 16 34 64 92 20 | 15 43 56 91 21 | 14 27 67 80 22 | 12 45 69 79 23 | 3 38 56 86 24 | 20 43 74 93 25 | 4 28 52 70 26 | 7 31 55 77 27 | 13 44 68 78 28 | 17 30 64 72 29 | 9 41 61 86 30 | 19 24 67 95 31 | 21 45 55 74 32 | 18 47 48 77 33 | 17 35 65 93 34 | 18 25 66 94 35 | 0 29 62 85 36 | 13 32 63 91 37 | 1 28 63 84 38 | 9 37 50 85 39 | 3 27 51 73 40 | 22 36 59 82 41 | 6 47 60 89 42 | 2 26 50 72 43 | 0 24 48 78 44 | 14 42 57 90 45 | 7 46 61 88 46 | 23 40 69 95 47 | 2 39 57 87 48 | 11 35 52 83 49 | 12 33 62 90 50 | 10 34 53 82 51 | 10 32 58 80 52 | 53 | 1 45 15 6 54 | 18 15 32 61 55 | 24 1 44 53 56 | 44 53 24 1 57 | 45 15 6 1 58 | 32 61 18 40 59 | 30 24 1 44 60 | 24 1 44 53 61 | 1 45 15 6 62 | 33 45 36 34 63 | 44 35 31 50 64 | 24 1 44 30 65 | 1 44 53 24 66 | 3 55 9 34 67 | 30 24 1 44 68 | 39 36 34 33 69 | 6 1 45 15 70 | 1 45 15 6 71 | 15 46 45 44 72 | 15 6 1 45 73 | 44 53 24 1 74 | 6 1 45 15 75 | 26 27 37 5 76 | 24 1 44 30 77 | 45 15 6 1 78 | 35 31 50 44 79 | 32 42 47 37 80 | 44 53 24 1 81 | 24 1 44 53 82 | 22 14 2 50 83 | 45 15 6 1 84 | 53 24 1 44 85 | 57 25 9 41 86 | 6 1 45 15 87 | 24 1 44 30 88 | 1 44 53 24 89 | 30 24 1 44 90 | 45 15 6 1 91 | 6 1 45 15 92 | 44 53 24 1 93 | 9 41 57 58 94 | 24 1 44 30 95 | 1 44 30 24 96 | 7 38 23 54 97 | 35 13 51 60 98 | 6 1 45 15 99 | 33 42 14 5 100 | 1 44 30 24 101 | -------------------------------------------------------------------------------- /matrices/N972_K486_GF64.txt: -------------------------------------------------------------------------------- 1 | 162 81 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 19 67 109 130 5 | 26 71 104 132 6 | 13 42 101 146 7 | 23 61 113 126 8 | 22 60 112 128 9 | 3 45 84 126 10 | 20 77 88 158 11 | 0 42 81 123 12 | 22 75 107 143 13 | 17 59 95 140 14 | 21 77 106 142 15 | 10 52 91 133 16 | 33 73 113 156 17 | 8 46 105 146 18 | 16 63 114 124 19 | 36 56 121 161 20 | 36 78 110 148 21 | 25 58 117 136 22 | 38 55 120 160 23 | 28 69 86 159 24 | 40 67 118 152 25 | 27 71 85 161 26 | 30 39 93 154 27 | 18 66 108 129 28 | 8 50 89 131 29 | 0 49 115 151 30 | 38 80 109 147 31 | 37 54 122 159 32 | 32 79 97 120 33 | 24 69 102 133 34 | 7 45 107 145 35 | 16 58 94 139 36 | 25 70 103 134 37 | 28 73 101 154 38 | 30 80 98 121 39 | 13 55 90 136 40 | 29 74 99 155 41 | 19 76 87 157 42 | 39 66 117 151 43 | 7 49 88 130 44 | 23 76 105 141 45 | 37 79 108 149 46 | 31 78 96 122 47 | 4 46 85 127 48 | 27 72 100 153 49 | 34 74 111 157 50 | 6 47 106 144 51 | 9 60 96 141 52 | 3 65 104 149 53 | 35 72 112 158 54 | 1 50 116 152 55 | 34 51 83 138 56 | 20 68 110 131 57 | 32 41 95 153 58 | 4 63 102 147 59 | 41 68 119 150 60 | 31 40 94 155 61 | 5 64 103 148 62 | 15 65 116 123 63 | 11 62 98 143 64 | 17 64 115 125 65 | 12 54 92 135 66 | 26 59 118 137 67 | 2 44 83 125 68 | 21 62 111 127 69 | 29 70 84 160 70 | 12 44 100 145 71 | 33 53 82 140 72 | 1 43 82 124 73 | 5 47 86 128 74 | 15 57 93 138 75 | 24 57 119 135 76 | 14 43 99 144 77 | 2 48 114 150 78 | 14 56 91 137 79 | 6 48 87 129 80 | 35 52 81 139 81 | 10 61 97 142 82 | 18 75 89 156 83 | 11 53 92 134 84 | 9 51 90 132 85 | 86 | 46 45 44 15 87 | 58 56 60 62 88 | 54 7 38 23 89 | 26 22 14 2 90 | 35 1 31 44 91 | 16 63 20 9 92 | 42 47 37 32 93 | 63 13 54 10 94 | 1 21 25 7 95 | 41 48 2 27 96 | 46 25 22 48 97 | 60 24 4 50 98 | 25 11 7 1 99 | 13 27 56 8 100 | 60 48 2 27 101 | 53 35 16 13 102 | 20 16 63 9 103 | 43 47 18 20 104 | 9 41 57 58 105 | 37 53 61 29 106 | 19 24 42 14 107 | 15 24 50 37 108 | 37 53 61 29 109 | 51 59 63 47 110 | 63 26 41 12 111 | 44 51 35 13 112 | 27 56 8 43 113 | 38 12 25 51 114 | 2 46 56 35 115 | 43 58 19 49 116 | 49 21 7 35 117 | 13 29 53 61 118 | 32 49 58 19 119 | 32 49 58 19 120 | 53 40 61 18 121 | 50 54 60 62 122 | 23 25 30 16 123 | 27 37 5 26 124 | 42 14 24 33 125 | 5 31 51 30 126 | 6 45 56 19 127 | 1 45 15 6 128 | 24 50 37 15 129 | 46 58 18 6 130 | 9 3 43 29 131 | 17 32 58 37 132 | 30 1 44 7 133 | 1 44 30 24 134 | 43 34 48 57 135 | 47 20 33 26 136 | 28 4 52 44 137 | 40 21 44 17 138 | 52 17 24 61 139 | 43 34 48 57 140 | 42 14 24 33 141 | 8 43 27 56 142 | 58 19 32 49 143 | 18 6 61 21 144 | 29 7 10 16 145 | 43 22 41 20 146 | 9 3 63 43 147 | 33 45 36 34 148 | 8 43 27 56 149 | 15 32 18 61 150 | 36 19 3 57 151 | 56 8 46 13 152 | 38 23 55 22 153 | 27 5 2 62 154 | 5 26 27 37 155 | 39 9 30 48 156 | 62 54 56 60 157 | 46 44 14 15 158 | 24 23 45 11 159 | 29 41 10 16 160 | 29 7 10 16 161 | 39 56 30 48 162 | 18 40 32 61 163 | 9 3 63 43 164 | 15 1 42 45 165 | 11 60 6 49 166 | 22 15 12 33 167 | 168 | -------------------------------------------------------------------------------- /matrices/NB_LDPC_matrix_format.md: -------------------------------------------------------------------------------- 1 | # NB-LDPC matrix format 2 | 3 | ## Introduction 4 | 5 | NB-LDPC matrices can be represented in many way. In this c program, we use 3 different format 6 | 7 | UBS, KN and BeiDou. They have their advantages and inconvenient but The advantage of the BeiDou format is that it is standardized. 8 | 9 | ## Header common to all format 10 | 11 | ### First line 12 | **N**: the number of symbol (number of columns in the parity check matrix) 13 | **M**: the number of Parity (number of lines in the parity check matrix) 14 | **GF**: the code order q=2^m 15 | ### Second line (sometime skipped) 16 | **d_v**: maximum variable node degree 17 | **d_c**: maximum check node degree 18 | 19 | ### Third line 20 | **d_v** of each variable node 21 | ### fourth line 22 | **d_c** of each check node 23 | 24 | ## UBS format 25 | 26 | Format used by Université de Bretatgne Sud (UBS) 27 | 28 | M lines, where each line defines the VNs connected to a CN. VNs numbered from 0 to N-1. 29 | one empty line. 30 | 31 | M lines, where the multiplicative coefficient associated to each connection is given by the power of the primitive element α +1. 32 | 33 | ## KN format 34 | 35 | Format used the university of Kaiserslautern 36 | 37 | http://www.uni-kl.de/channel-codes/channel-codes-database/non-binary-ldpc/ 38 | 39 | N lines (skipped in the c codes), where each line defines the CNs connected to a VN. CNs numbered from 1to M. The CN number is followed by the coefficient associated to connection defined as the power of the primitive element α 40 | one empty line 41 | 42 | M lines, where each line defines the VNs connected to a CN. VNs numbered from 1to N. The CN number is followed by the coefficient associated to connection defined as the power of the primitive element α 43 | 44 | 45 | 46 | ## BeiDou format 47 | 48 | Beidou Navigation Satellite System (BDS) defines NB-LDPC codes in its B1C open service signal [1], B2a signal [2] and B2b signal [3] 49 | 50 | M lines, where each line defines the VNs connected to a CN. VNs numbered from 0 to N-1. 51 | one empty line. 52 | 53 | M lines, where the multiplicative element associated to each connection is given by the decimal value of the vector representation of GF symbol 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | [1] “BeiDou Navigation Satellite System, Signal In Space, Interface Control Document, Open Service Signals B1C (Version 1.0) ” China Satellite Navigation Office , December, 2017 62 | http://en.beidou.gov.cn/SYSTEMS/Officialdocument/201806/P020180608525871869457.pdf 63 | 64 | [2] “BeiDou Navigation Satellite System, Signal In Space, Interface Control Document, Open Service Signals B2a (Version 1.0) ” China Satellite Navigation Office , December, 2017 65 | http://en.beidou.gov.cn/SYSTEMS/Officialdocument/201806/P020180608525870555377.pdf 66 | 67 | [3] “BeiDou Navigation Satellite System Signal In Space Interface Control Document Open Service Signal B2b (Version 1.0)” China Satellite Navigation Office, July, 2020 68 | http://en.beidou.gov.cn/SYSTEMS/Officialdocument/202008/P020200803544811195696.pdf -------------------------------------------------------------------------------- /matrices/alist.txt: -------------------------------------------------------------------------------- 1 | 88 44 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 14 35 56 70 5 | 1 27 45 54 6 | 2 26 61 79 7 | 12 38 52 68 8 | 17 39 44 75 9 | 17 43 67 81 10 | 0 37 70 86 11 | 18 28 67 85 12 | 1 36 71 87 13 | 12 37 57 83 14 | 7 25 51 60 15 | 11 29 55 73 16 | 23 41 63 87 17 | 9 33 59 77 18 | 23 43 58 77 19 | 9 35 49 72 20 | 22 40 62 86 21 | 5 31 49 75 22 | 0 26 44 55 23 | 16 38 45 74 24 | 6 31 51 80 25 | 3 27 60 78 26 | 13 39 53 69 27 | 2 20 46 68 28 | 4 30 48 74 29 | 19 21 63 64 30 | 19 29 66 84 31 | 3 21 47 69 32 | 4 40 53 84 33 | 10 28 54 72 34 | 8 34 48 73 35 | 15 33 47 79 36 | 14 32 46 78 37 | 15 34 57 71 38 | 6 24 50 61 39 | 22 42 59 76 40 | 11 25 65 82 41 | 13 36 56 82 42 | 10 24 64 83 43 | 5 41 52 85 44 | 7 30 50 81 45 | 8 32 58 76 46 | 16 42 66 80 47 | 18 20 62 65 48 | 49 | 30 24 1 44 50 | 51 60 35 13 51 | 6 1 45 15 52 | 24 1 44 53 53 | 1 44 53 24 54 | 13 18 60 35 55 | 44 53 24 1 56 | 15 35 46 56 57 | 44 30 24 1 58 | 33 42 14 5 59 | 45 15 6 1 60 | 24 1 44 30 61 | 18 15 32 61 62 | 45 15 6 1 63 | 44 30 24 1 64 | 61 47 20 8 65 | 45 15 6 1 66 | 39 36 34 33 67 | 53 24 1 44 68 | 15 6 1 45 69 | 34 3 55 9 70 | 1 44 30 24 71 | 40 32 61 18 72 | 15 6 1 45 73 | 1 45 15 6 74 | 34 33 45 36 75 | 53 24 1 44 76 | 24 1 44 53 77 | 44 35 31 50 78 | 1 44 53 24 79 | 30 24 1 44 80 | 44 35 61 50 81 | 6 1 45 15 82 | 53 24 1 44 83 | 30 24 1 44 84 | 1 44 53 24 85 | 55 9 34 3 86 | 15 6 1 45 87 | 37 32 52 47 88 | 12 25 36 14 89 | 24 1 44 30 90 | 2 50 22 14 91 | 15 6 1 45 92 | 1 44 53 24 93 | -------------------------------------------------------------------------------- /matrices/alist2matrix_nb.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/matrices/alist2matrix_nb.m -------------------------------------------------------------------------------- /matrices/alist_KN.txt: -------------------------------------------------------------------------------- 1 | 88 44 64 2 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 | 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 | 15 30 36 24 57 1 71 44 5 | 2 51 28 60 46 35 55 13 6 | 3 6 27 1 62 45 80 15 7 | 13 24 39 1 53 44 69 53 8 | 18 1 40 44 45 53 76 24 9 | 18 13 44 18 68 60 82 35 10 | 1 44 38 53 71 24 87 1 11 | 19 15 29 35 68 46 86 56 12 | 2 44 37 30 72 24 88 1 13 | 13 33 38 42 58 14 84 5 14 | 8 45 26 15 52 6 61 1 15 | 12 24 30 1 56 44 74 30 16 | 24 18 42 15 64 32 88 61 17 | 10 45 34 15 60 6 78 1 18 | 24 44 44 30 59 24 78 1 19 | 10 61 36 47 50 20 73 8 20 | 23 45 41 15 63 6 87 1 21 | 6 39 32 36 50 34 76 33 22 | 1 53 27 24 45 1 56 44 23 | 17 15 39 6 46 1 75 45 24 | 7 34 32 3 52 55 81 9 25 | 4 1 28 44 61 30 79 24 26 | 14 40 40 32 54 61 70 18 27 | 3 15 21 6 47 1 69 45 28 | 5 1 31 45 49 15 75 6 29 | 20 34 22 33 64 45 65 36 30 | 20 53 30 24 67 1 85 44 31 | 4 24 22 1 48 44 70 53 32 | 5 44 41 35 54 31 85 50 33 | 11 1 29 44 55 53 73 24 34 | 9 30 35 24 49 1 74 44 35 | 16 44 34 35 48 61 80 50 36 | 15 6 33 1 47 45 79 15 37 | 16 53 35 24 58 1 72 44 38 | 7 30 25 24 51 1 62 44 39 | 23 1 43 44 60 53 77 24 40 | 12 55 26 9 66 34 83 3 41 | 14 15 37 6 57 1 83 45 42 | 11 37 25 32 65 52 84 47 43 | 6 12 42 25 53 36 86 14 44 | 8 24 31 1 51 44 82 30 45 | 9 2 33 50 59 22 77 14 46 | 17 15 43 6 67 1 81 45 47 | 19 1 21 44 63 53 66 24 48 | -------------------------------------------------------------------------------- /matrices/matrix.mat: -------------------------------------------------------------------------------- 1 | # Created by Octave 5.2.0, Tue Jan 26 18:34:41 2021 GMT 2 | # name: matrix 3 | # type: matrix 4 | # rows: 44 5 | # columns: 88 6 | -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 30 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 24 -1 -1 -1 -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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 53 -1 -1 24 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 50 | 51 | 52 | -------------------------------------------------------------------------------- /matrices/matrix2alist_KN.m: -------------------------------------------------------------------------------- 1 | % matrix2alist_KN 2 | % matrix to alisk with KN format 3 | 4 | clear all; 5 | clc; 6 | 7 | load matrix.mat; 8 | 9 | fileID =fopen('alist_KN.txt','w'); 10 | fclose(fileID); 11 | 12 | H=matrix; 13 | 14 | H_bin = H; 15 | H_bin( H > -1 ) = 1; 16 | H_bin( H<0 ) = 0; 17 | 18 | 19 | [M,N] = size(H); 20 | dc = sum(H_bin,2); 21 | dv = sum(H_bin,1); 22 | dcmax = max(dc); 23 | dvmax = max(dv); 24 | 25 | [nlist,~] = find(H_bin); 26 | [mlist,~] = find(H_bin'); 27 | 28 | GF=64; 29 | 30 | %write in a file named alist_KN.txt 31 | fileID =fopen('alist_KN.txt','at'); 32 | fprintf(fileID,'%d %d %d \n ',N,M,GF); 33 | for i=1:N 34 | fprintf(fileID,'%d ',dv(i)); 35 | end 36 | fprintf(fileID,' \n '); 37 | for i=1:M 38 | fprintf(fileID,'%d ',dc(i)); 39 | end 40 | fprintf(fileID,' \n '); 41 | 42 | k=0; 43 | for i=1:M 44 | for j=1:dc(i) 45 | fprintf(fileID,'%d ',mlist(k + j )); 46 | fprintf(fileID,'%d ',H( i, mlist(k + j ))-1); 47 | end 48 | k=k+dc(i); 49 | fprintf(fileID,' \n '); 50 | end 51 | 52 | 53 | fclose(fileID); -------------------------------------------------------------------------------- /matrices/show_matrix.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/matrices/show_matrix.m -------------------------------------------------------------------------------- /obj/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lab-STICC-UBS/NB_LDPC_FB_public/9f69496670baa369dcac58ed1cb8f896ba5eca08/obj/.gitkeep -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | # la commande d'exécution est: 2 | # ./nom_du_fichier_binaire nombre_de_trame nombre_iteration nom_de_la_matrice EbN nm offset nombre_operation_dans_ecn 3 | # script to lunch multiple SNR 4 | # if edited in window, dos2linux file.sh, or dos2unix 5 | #! /bin/bash 6 | echo "Bash version ${BASH_VERSION}..." 7 | nb_frame=2000000000 8 | it=8 9 | matrix="./matrices/KN/N864_K720_GF64.txt " # Mat212_N480_M80 N96_K48_G64 or Mat24_N48_M24 10 | n_vc=16 11 | n_cv=16 12 | offset=0.3 13 | nb_oper=18 14 | 15 | LANG="en_US.utf8" #define us language to have floating point with point with a point 16 | 17 | echo "start multiple decoding" 18 | 19 | for SNR in $(seq 3.5 0.5 5.5) 20 | do 21 | echo "simulation with SNR= $SNR " 22 | xterm -xrm '*hold:true' -e ./essai $nb_frame $it ${matrix} $SNR $n_vc $n_vc $offset $nb_oper & 23 | done 24 | 25 | -------------------------------------------------------------------------------- /tools.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * \file tools.c 3 | * \brief tools for NB decoder 4 | * \author C.Marchand, A. Al-Ghouwahel, Oussama Abassi, L. Conde-Canencia, A. abdmoulah, E. Boutillon 5 | * \copyright BSD copyright 6 | * \date 03/03/2015 7 | 8 | 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "./include/struct.h" 15 | #include "./include/init.h" 16 | #include "./include/tools.h" 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | //// random generator: uniform distribution on [0,1] 26 | //float My_drand48 (void) 27 | //{ 28 | // return((float)(rand())/(float)(RAND_MAX+1.0)); 29 | //} 30 | 31 | 32 | // random generator: uniform distribution on [0,1] 33 | 34 | /*! 35 | * \fn My_drand48 36 | * \brief improved randum number generator working for linux and windows 37 | * return an uniformely distributed random number, for windows to replace drand48 of linux 38 | * \author C. Marchand 39 | *******************************************************************************/ 40 | float My_drand48(int *initialise) 41 | { 42 | 43 | 44 | #if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) 45 | 46 | static int s1, s2; 47 | int k, Z; 48 | 49 | if ( *initialise == -1 ) 50 | { 51 | s1 = (int)(( rand() % 2147483562 ) + 1); 52 | s2 = (int)(( rand() % 2147483398 ) + 1); 53 | *initialise = 0; 54 | } 55 | 56 | k = s1/53668; 57 | s1 = 40014*(s1 - k*53668) - k*12211; 58 | if (s1 < 0) 59 | s1 += 2147483563; 60 | 61 | k = s2/52774; 62 | s2 = 40692*(s2 - k*52774) - k*3791; 63 | if (s2 < 0) 64 | s2 += 2147483399; 65 | 66 | Z = s1 - s2; 67 | if (Z < 1) 68 | Z += 2147483562; 69 | 70 | return(Z/2147483563.0); 71 | 72 | #elif __linux__ 73 | 74 | return(drand48()); 75 | 76 | #endif 77 | 78 | 79 | } 80 | 81 | 82 | 83 | /*! 84 | * \fn Bin2GF 85 | * \brief compute a GF(q) symbol corresponding to a frame of log_2(GF) bits 86 | * Parameters : 87 | * Inputs : 88 | * - int *U : array representing logGF bits 89 | * - int logGF : size of the array U. logGF = log2 (GF) 90 | * - int GF : order of the field 91 | * - int ** BINGF: binary mapping table 92 | * Outputs : 93 | * - index of the non-binary symbol 94 | */ 95 | 96 | int Bin2GF(int *U,int GF,int logGF,int **BINGF) 97 | { 98 | int k; 99 | 100 | for (k=0; kmat : parity-check matrix 147 | * - table : lookup tables for computations in GF(q) 148 | * Outputs : 149 | * - code->matUT : Upper triangular matrix used for encoding 150 | * - code->Perm : Column permutation 151 | */ 152 | void GaussianElimination (code_t *code, table_t *table) 153 | { 154 | const int N = code->N; 155 | const int M = code->M; 156 | int n,m,k,m1,ind, buf; 157 | int temp[12]; 158 | int i; 159 | 160 | code->matUT = calloc((size_t)M,sizeof(int *)); 161 | code->matUT [0] = calloc((size_t)M*N,sizeof(int)); 162 | for (k=1; kmatUT[k] = code->matUT[0] + k*N; 163 | 164 | code->Perm = calloc(N,sizeof(int)); 165 | 166 | for (n=0; nPerm[n] = n; 167 | 168 | for (m=0; mrowDegree[m]; k++) 171 | { 172 | code->matUT[m][code->mat[m][k]] = code->matValue[m][k]; 173 | } 174 | } 175 | /* 176 | printf("\n mat UT start \n"); 177 | for (m=0; mN; k++) 180 | { 181 | printf("%d ",code->matUT[m][k] ); 182 | } 183 | printf("\n"); 184 | } 185 | getchar();*/ 186 | 187 | for (m=0; m-1; ind--) 190 | { 191 | if (code->matUT[m][ind]!=0) break; 192 | } 193 | if (ind==0) 194 | { 195 | printf("The matrix is not full rank (%d,%d)\n",m,ind); 196 | exit(EXIT_FAILURE); 197 | } 198 | 199 | // permute ind column with m column 200 | buf = code->Perm[ind]; 201 | code->Perm[ind] = code->Perm[N-m-1]; 202 | code->Perm[N-m-1] = buf; 203 | for (m1=0; m1matUT[m1][N-m-1]; 206 | code->matUT[m1][N-m-1] = code->matUT[m1][ind]; 207 | code->matUT[m1][ind] = buf; 208 | } 209 | 210 | 211 | // put zero at column N-m, from line m1 = m+1 to M 212 | for (m1=m+1; m1matUT[m1][N-m-1]!=0) 215 | { 216 | // update line m1 217 | buf=code->matUT[m1][N-m-1]; 218 | for (n=0; nmatUT[m1][n]!=0) 221 | code->matUT[m1][n] = table->DIVGF[code->matUT[m1][n]][buf]; 222 | } 223 | for (n=0; nmatUT[m1][n]!=0) 226 | code->matUT[m1][n] = table->MULGF[code->matUT[m1][n]][code->matUT[m][N-m-1]]; 227 | } 228 | for (n=0; nlogGF; i++) 231 | { 232 | temp[i] = (table->BINGF[code->matUT[m1][n]][i])^(table->BINGF[code->matUT[m][n]][i]); 233 | } 234 | code->matUT[m1][n] = Bin2GF(temp,code->GF,code->logGF,table->BINGF); 235 | 236 | //code->matUT[m1][n] = table->ADDGF[code->matUT[m1][n]][code->matUT[m][n]]; 237 | } 238 | } 239 | } 240 | } 241 | 242 | /* 243 | printf("\n mat UT constructed \n"); 244 | for (m=0; mN; k++) 247 | { 248 | printf("%d ",code->matUT[m][k] ); 249 | } 250 | printf("\n"); 251 | } 252 | getchar();*/ 253 | 254 | 255 | } 256 | 257 | 258 | 259 | 260 | 261 | 262 | /** 263 | * \fn Encoding 264 | * \brief Encode the information bits into a codeword. 265 | * matUT beeing upper triangular, the backsubstitution method is used. 266 | * The M first symbols in NSYMB are redundancy symbols (before deinterleaving) 267 | * Inputs 268 | * - KSYMB ( KSYMB are information symbols) 269 | * Outputs 270 | * - Codeword 271 | * - NBIN : binary copy of the codeword 272 | */ 273 | int Encoding(code_t *code, table_t *table, int *CodeWord, int **NBIN, int *KSYMB) 274 | { 275 | const int N = code->N; 276 | const int M = code->M; 277 | const int logGF = code->logGF; 278 | int k,n,m,q,buf; 279 | int NSYMB[N]; 280 | int temp[12]; 281 | int i; 282 | 283 | for (k=0 ; k=0; m--) 291 | { 292 | buf=0; 293 | for (n=0; nmatUT[m][n]!=0) 296 | { 297 | for(i=0; ilogGF; i++) 298 | { 299 | temp[i] = (table->BINGF[buf][i])^(table->BINGF[table->MULGF[code->matUT[m][n]][NSYMB[n]]][i]); 300 | } 301 | buf = Bin2GF(temp,code->GF,code->logGF,table->BINGF); 302 | // buf = table->ADDGF[buf][table->MULGF[code->matUT[m][n]][NSYMB[n]]]; 303 | } 304 | } 305 | /* Systematic codeword (interleaved) */ 306 | NSYMB[N-m-1] = table->DIVGF[buf][code->matUT[m][N-m-1]]; 307 | } 308 | 309 | /* De-interleaving */ 310 | for (n=0; nPerm[n]] = NSYMB[n]; 312 | 313 | /* Binary copy of the codeword: */ 314 | for (n=0; nBINGF[CodeWord[n]][q]; 319 | //printf("%d ",table->BINGF[CodeWord[n]][q]); 320 | } 321 | //printf("%d ",CodeWord[n]); 322 | } 323 | 324 | return(0); 325 | } 326 | 327 | 328 | 329 | 330 | 331 | /** 332 | * \fn Syndrom 333 | * \brief Compute the syndom of a message 334 | * Inputs 335 | * - code structure code_t 336 | * - table_t tableGF : lookup table 337 | * - message 338 | * Outputs 339 | * - synd is 0 iff. the decided message is a codeword 340 | * (the value of synd is not meaningful if synd != 0 ) 341 | */ 342 | int Syndrom (code_t *code, int *decide, table_t *tableGF) 343 | { 344 | int k,l; 345 | int synd; 346 | int temp[12]; 347 | int i; 348 | 349 | synd = 0; 350 | for (k=0; kM; k++) 351 | { 352 | for (l=0; lrowDegree[k]; l++) 353 | { 354 | 355 | for(i=0; ilogGF; i++) 356 | { 357 | temp[i] = (tableGF->BINGF[synd][i])^(tableGF->BINGF[tableGF->MULGF[code->matValue[k][l]][decide[code->mat[k][l]]]][i]); 358 | } 359 | synd = Bin2GF(temp,code->GF,code->logGF,tableGF->BINGF); 360 | //synd = tableGF->ADDGF[synd][tableGF->MULGF[code->matValue[k][l]][decide[code->mat[k][l]]]]; 361 | } 362 | 363 | if (synd != 0) 364 | break; 365 | } 366 | 367 | return (synd); 368 | } 369 | 370 | 371 | /** 372 | * \fn void Decision( int *decision,float **APP,int N,int GF) 373 | * \brief Make a hard decision given the APP 374 | * Inputs 375 | * - APP 376 | * - N 377 | * - GF 378 | * Outputs 379 | * - decision 380 | */ 381 | void Decision( int *decision,float **APP,int N,int GF) 382 | { 383 | int n,g,ind; 384 | float min; 385 | 386 | for (n=0; n