MCPcopy Create free account
hub / github.com/F-Stack/f-stack / gen_qm2_llr

Function gen_qm2_llr

dpdk/app/test-bbdev/test_bbdev_perf.c:1772–1793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1770}
1771
1772static void
1773gen_qm2_llr(int8_t *llrs, uint32_t j, double N0, double llr_max)
1774{
1775 double b, b1, n;
1776 double coeff = 2.0 * sqrt(N0);
1777
1778 /* Ignore in vectors rare quasi null LLRs not to be saturated */
1779 if (llrs[j] < 8 && llrs[j] > -8)
1780 return;
1781
1782 /* Note don't change sign here */
1783 n = randn(j % 2);
1784 b1 = ((llrs[j] > 0 ? 2.0 : -2.0)
1785 + coeff * n) / N0;
1786 b = b1 * (1 << ldpc_llr_decimals);
1787 b = round(b);
1788 if (b > llr_max)
1789 b = llr_max;
1790 if (b < -llr_max)
1791 b = -llr_max;
1792 llrs[j] = (int8_t) b;
1793}
1794
1795/* Simple LLR generation assuming AWGN and QPSK */
1796static void

Callers 1

generate_llr_inputFunction · 0.85

Calls 1

randnFunction · 0.85

Tested by

no test coverage detected