-
Notifications
You must be signed in to change notification settings - Fork 152
/
Copy pathpre_decoder_vcvc_impl.h
133 lines (111 loc) · 4.04 KB
/
pre_decoder_vcvc_impl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* -*- c++ -*- */
/*
* Copyright 2014 Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT)
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef INCLUDED_LTE_PRE_DECODER_VCVC_IMPL_H
#define INCLUDED_LTE_PRE_DECODER_VCVC_IMPL_H
#include <lte/pre_decoder_vcvc.h>
namespace gr {
namespace lte {
class pre_decoder_vcvc_impl : public pre_decoder_vcvc
{
private:
int d_N_ant;
int d_rxant;
int d_vlen;
std::string d_style;
void handle_msg(pmt::pmt_t msg);
void decode_1_ant(gr_complex* out, const gr_complex* rx, const gr_complex* h, int len);
void prepare_2_ant_vectors(gr_complex* h0,
gr_complex* h1,
gr_complex* r0,
gr_complex* r1,
const gr_complex* rx,
const gr_complex* ce0,
const gr_complex* ce1,
int len);
void decode_2_ant(gr_complex* out0,
gr_complex* out1,
gr_complex* h0,
gr_complex* h1,
gr_complex* r0,
gr_complex* r1,
const gr_complex* rx,
const gr_complex* ce0,
const gr_complex* ce1,
int len);
void prepare_4_ant_vectors(gr_complex* rx0,
const gr_complex* rx,
int len);
void decode_4_ant(gr_complex* out0,
gr_complex* out1,
gr_complex* out2,
gr_complex* out3,
gr_complex* h0,
gr_complex* h1,
gr_complex* r0,
gr_complex* r1,
gr_complex* rx_buf,
gr_complex* ce0_buf,
gr_complex* ce1_buf,
gr_complex* ce2_buf,
gr_complex* ce3_buf,
const gr_complex* rx,
const gr_complex* ce0,
const gr_complex* ce1,
const gr_complex* ce2,
const gr_complex* ce3,
int len);
void combine_output(gr_complex* out,
gr_complex* out0,
gr_complex* out1,
int len);
gr_complex* d_h0;
gr_complex* d_h1;
gr_complex* d_r0;
gr_complex* d_r1;
gr_complex* d_out;
gr_complex* d_out0;
gr_complex* d_out1;
gr_complex* d_out2;
gr_complex* d_out3;
gr_complex* d_mult0;
gr_complex* d_mult1;
gr_complex* d_rx0;
gr_complex* d_ce0;
gr_complex* d_ce1;
gr_complex* d_ce2;
gr_complex* d_ce3;
float* d_mag;
float* d_mag_h;
void setup_volk_vectors(int len);
public:
pre_decoder_vcvc_impl(int rxant, int N_ant, int vlen, std::string style);
~pre_decoder_vcvc_impl();
// Where all the action really happens
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
void set_N_ant(int N_ant);
int get_N_ant(){return d_N_ant;}
void set_decoding_style(std::string style);
std::string get_decoding_style(){return d_style;}
};
} // namespace lte
} // namespace gr
#endif /* INCLUDED_LTE_PRE_DECODER_VCVC_IMPL_H */