short lift_size[51]={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384};
short lift_size[51]={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384};
@@ -70,7 +72,7 @@ int test_ldpc(short No_iteration,
...
@@ -70,7 +72,7 @@ int test_ldpc(short No_iteration,
double rate,
double rate,
double SNR,
double SNR,
unsigned char qbits,
unsigned char qbits,
unsigned int block_length,
short block_length,
unsigned int ntrials,
unsigned int ntrials,
unsigned int *errors,
unsigned int *errors,
unsigned int *crc_misses)
unsigned int *crc_misses)
...
@@ -81,8 +83,9 @@ int test_ldpc(short No_iteration,
...
@@ -81,8 +83,9 @@ int test_ldpc(short No_iteration,
opp_enabled=1;
opp_enabled=1;
cpu_freq_GHz = get_cpu_freq_GHz();
cpu_freq_GHz = get_cpu_freq_GHz();
short test_input[block_length];
//short test_input[block_length];
short *c; //padded codeword
short *test_input;
//short *c; //padded codeword
short *esimated_output;
short *esimated_output;
short *channel_input;
short *channel_input;
double *channel_output;
double *channel_output;
...
@@ -90,40 +93,43 @@ int test_ldpc(short No_iteration,
...
@@ -90,40 +93,43 @@ int test_ldpc(short No_iteration,
short *channel_output_fixed;
short *channel_output_fixed;
unsigned int i,trial=0;
unsigned int i,trial=0;
/*
short *Gen_shift_values, *no_shift_values, *pointer_shift_values;
short *Gen_shift_values, *no_shift_values, *pointer_shift_values;
short BG,Zc,Kb,nrows,ncols;
short BG,Zc,Kb,nrows,ncols,channel_temp;
int i1,i2,i3,i4,i5,i6,t,temp,k;
int i1,i2,i3,i4,i5,i6,t,temp,temp_prime,k;
int no_punctured_columns; //new
//Table of possible lifting sizes
//Table of possible lifting sizes
short lift_size[51]={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384};
short lift_size[51]={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384};