GNU Radio's DVBS2RX Package
ldpc_decoder_bb_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2018,2019,2023 Ahmet Inan, Ron Economos, Igor Freire.
4 *
5 * This file is part of gr-dvbs2rx.
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 */
9
10#ifndef INCLUDED_DVBS2RX_LDPC_DECODER_BB_IMPL_H
11#define INCLUDED_DVBS2RX_LDPC_DECODER_BB_IMPL_H
12
13
14#include "dvb_defines.h"
15#include "dvb_s2_tables.hh"
16#include "dvb_s2x_tables.hh"
17#include "dvb_t2_tables.hh"
18#include "ldpc_decoder/ldpc.hh"
20
21namespace gr {
22namespace dvbs2rx {
23
25{
26private:
27 const int d_debug_level; /**< Debug level for logs */
28 unsigned int d_nldpc; /**< Codeword length in bits */
29 unsigned int d_nldpc_bytes; /**< Codeword length in bytes */
30 unsigned int d_kldpc; /**< Message length in bits */
31 unsigned int d_kldpc_bytes; /**< Message length in bytes */
32 unsigned int d_output_mode; /**< Output full codeword or just message */
33 uint64_t d_frame_cnt; /**< Frame count */
34 uint64_t d_batch_cnt; /**< Frame batch count */
35 unsigned int d_total_trials; /**< Total LDPC decoding trials */
36 int d_max_trials; /**< Max decoding trials per frame */
37 LDPCInterface* d_ldpc;
38 int d_simd_size; /**< Number of bytes on the SIMD register */
39 int8_t* d_soft;
40 void* d_aligned_buffer;
41 int (*decode)(void*, int8_t*, int);
42 pmt::pmt_t d_pdu_meta;
43 const pmt::pmt_t d_pdu_port_id = pmt::mp("llr_pdu");
44
45public:
47 dvb_framesize_t framesize,
48 dvb_code_rate_t rate,
49 dvb_constellation_t constellation,
50 dvb_outputmode_t outputmode,
51 dvb_infomode_t infomode,
52 int max_trials,
53 int debug_level);
55
56 void forecast(int noutput_items, gr_vector_int& ninput_items_required);
57
58 int general_work(int noutput_items,
59 gr_vector_int& ninput_items,
60 gr_vector_const_void_star& input_items,
61 gr_vector_void_star& output_items);
62
63 unsigned int get_average_trials() { return d_total_trials / d_batch_cnt; }
64};
65
66} // namespace dvbs2rx
67} // namespace gr
68
69#endif /* INCLUDED_DVBS2RX_LDPC_DECODER_BB_IMPL_H */
Definition ldpc_decoder_bb_impl.h:25
unsigned int get_average_trials()
Get the average number of LDPC decoding iterations per frame.
Definition ldpc_decoder_bb_impl.h:63
ldpc_decoder_bb_impl(dvb_standard_t standard, dvb_framesize_t framesize, dvb_code_rate_t rate, dvb_constellation_t constellation, dvb_outputmode_t outputmode, dvb_infomode_t infomode, int max_trials, int debug_level)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
<+description of block+>
Definition ldpc_decoder_bb.h:27
dvb_infomode_t
Definition dvb_config.h:118
dvb_framesize_t
Definition dvb_config.h:74
dvb_constellation_t
Definition dvb_config.h:80
dvb_outputmode_t
Definition dvb_config.h:113
dvb_code_rate_t
Definition dvb_config.h:20
dvb_standard_t
Definition dvb_config.h:15
Fixed-length double-ended queue with contiguous volk-aligned elements.
Definition gr_bch.h:22