From ca01d52a8658ed01301f14a4d294097d4db533cf Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 2 Mar 2020 19:42:36 +0100 Subject: Finishing up freq meas --- controller/fw/ldpc_decoder.c | 267 ------------------------------------------- 1 file changed, 267 deletions(-) delete mode 100644 controller/fw/ldpc_decoder.c (limited to 'controller/fw/ldpc_decoder.c') diff --git a/controller/fw/ldpc_decoder.c b/controller/fw/ldpc_decoder.c deleted file mode 100644 index fe59d77..0000000 --- a/controller/fw/ldpc_decoder.c +++ /dev/null @@ -1,267 +0,0 @@ - -#include -#include -#include -#include -#include - - -void gausselimination(size_t n, size_t k, int8_t *A, int8_t *b); - -void inner_logbp( - size_t m, size_t n, - size_t bits_count, size_t nodes_count, const uint32_t bits_values[], const uint32_t nodes_values[], - int8_t Lc[], - float Lq[], float Lr[], - unsigned int n_iter, - float L_posteriori_out[]); - -//decode(384, 6, 8, ...) -int decode(size_t n, size_t nodes_count, size_t bits_count, uint32_t bits[], int8_t y[], int8_t out[], unsigned int maxiter) { - const size_t m = n * nodes_count / bits_count; - float Lq[m*n]; - float Lr[m*n]; - float L_posteriori[n]; - - /* Calculate column bit positions from row bit positions */ - int32_t bits_transposed[nodes_count * n]; - for (size_t i=0; i 1000 && i/w > head_tail && i/w < m*n/w-head_tail) { - if (!ellipsis) { - ellipsis = true; - printf("\n ..."); - } - continue; - } - if (i) - printf(", "); - if (i%w == 0) - printf("\n "); - float outf = arrs[j][i]; - char *s = outf < 0 ? "\033[91m" : (outf > 0 ? "\033[92m" : "\033[94m"); - printf("%s% 012.6g\033[38;5;240m", s, outf); - } - printf("\n]\n"); - } - */ - - for (size_t i=0; i 0 ? "\033[92m" : "\033[94m"); - //printf("nij=%04u Lc=%s%3d\033[38;5;240m ", bits_values[q], s, lcv); - x *= tanhf(0.5f * Lc[bits_values[q]]); - } - } - - } else { - for (size_t q=bits_counter; q=0; i--) { - out[i] = x[i]; - - uint8_t sum = 0; - for (size_t j=i+1; j