GNU Radio's BLOCKSTREAM Package
turbo_decoder_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2017 <+YOU OR YOUR COMPANY+>.
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_BLOCKSAT_TURBO_DECODER_IMPL_H
22 #define INCLUDED_BLOCKSAT_TURBO_DECODER_IMPL_H
23 
24 #include <blocksat/turbo_decoder.h>
25 
26 #include "Tools/types.h"
27 #include "Module/Interleaver/LTE/Interleaver_LTE.hpp"
28 
29 #include "Module/Encoder/Turbo/Encoder_turbo.hpp"
30 #include "Module/Encoder/Encoder_sys.hpp"
31 #include "Module/Encoder/RSC/Encoder_RSC_generic_sys.hpp"
32 
33 #include "Module/Decoder/Turbo/Decoder_turbo.hpp"
34 #include "Module/Decoder/RSC/BCJR/Seq/Decoder_RSC_BCJR_seq_very_fast.hpp"
35 #include "Module/Decoder/Turbo/Decoder_turbo_fast.hpp"
36 
37 using namespace aff3ct;
38 
39 namespace gr {
40  namespace blocksat {
41 
43  {
44  private:
45  // Nothing to declare in this block.
46  module::Encoder_RSC_generic_sys<B_8> *sub_enc;
47  module::Decoder_RSC_BCJR_seq_very_fast
48  <B_8,Q_8,QD_8,tools::max<Q_8>,tools::max<QD_8>> * sub_dec;
49  module::Interleaver_LTE<int> *interleaver;
50  module::Decoder_turbo_fast<B_8,Q_8> *dec;
51  int d_input_size ;
52  int d_output_size ;
53 
54  public:
55  turbo_decoder_impl(int N, int K);
57 
58  // Where all the action really happens
59  //int work(int noutput_items,
60  // gr_vector_const_void_star &input_items,
61  // gr_vector_void_star &output_items);
62  int general_work(int noutput_items,
63  gr_vector_int& ninput_items,
64  gr_vector_const_void_star &input_items,
65  gr_vector_void_star &output_items);
66  int fixed_rate_ninput_to_noutput(int ninput);
67  int fixed_rate_noutput_to_ninput(int noutput);
68  void forecast(int noutput_items,
69  gr_vector_int& ninput_items_required);
70 
71  };
72 
73  } // namespace blocksat
74 } // namespace gr
75 
76 #endif /* INCLUDED_BLOCKSAT_TURBO_DECODER_IMPL_H */
77 
constexpr int32_t N()
Definition: mipp.h:431
int8_t B_8
Definition: types.h:11
&lt;+description of block+&gt;
Definition: turbo_decoder.h:36
Definition: turbo_decoder_impl.h:42
signed char Q_8
Definition: types.h:23
short QD_8
Definition: types.h:29