Commit 796c931a authored by Raymond Knopp's avatar Raymond Knopp

soft-beta version of polar decoder step 1

parent bad87bd1
...@@ -1088,6 +1088,7 @@ uint32_t polar_decoder_int16(int16_t *input, ...@@ -1088,6 +1088,7 @@ uint32_t polar_decoder_int16(int16_t *input,
memcpy((void*)&polarParams->tree.root->alpha[0],(void*)&d_tilde[0],sizeof(int16_t)*polarParams->N); memcpy((void*)&polarParams->tree.root->alpha[0],(void*)&d_tilde[0],sizeof(int16_t)*polarParams->N);
for (int iter=0;iter<4;iter++) {
generic_polar_decoder(polarParams,polarParams->tree.root); generic_polar_decoder(polarParams,polarParams->tree.root);
...@@ -1160,8 +1161,19 @@ uint32_t polar_decoder_int16(int16_t *input, ...@@ -1160,8 +1161,19 @@ uint32_t polar_decoder_int16(int16_t *input,
out[0]=Ar; out[0]=Ar;
return(crc^rxcrc);
for (int i=0;i<polarParams->N;i++) printf("alpha[%d]=%d, beta[%d]=%d\n",
i,
polarParams->tree.root->alpha[i],
i,
polarParams->tree.root->beta[i]);
if (crc==rxcrc) return(0);
memcpy((void*)&polarParams->tree.root->alpha[0],(void*)&polarParams->tree.root->beta[0],sizeof(int16_t)*polarParams->N);
}
return(-1);
} }
...@@ -70,6 +70,7 @@ typedef struct decoder_node_t_s { ...@@ -70,6 +70,7 @@ typedef struct decoder_node_t_s {
int all_frozen; int all_frozen;
int16_t *alpha; int16_t *alpha;
int16_t *beta; int16_t *beta;
int16_t *soft_beta;
} decoder_node_t; } decoder_node_t;
typedef struct decoder_tree_t_s { typedef struct decoder_tree_t_s {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment