GNU Radio's IEEE802_11 Package
viterbi_decoder_x86.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Bastian Bloessl <bloessl@ccs-labs.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#ifndef INCLUDED_IEEE802_11_VITERBI_DECODER_X86_H
18#define INCLUDED_IEEE802_11_VITERBI_DECODER_X86_H
19
20#include "base.h"
21#include <xmmintrin.h>
22
23namespace gr {
24namespace ieee802_11 {
25
26/* This Viterbi decoder was taken from the gr-dvbt module of
27 * GNU Radio. It is an SSE2 version of the Viterbi Decoder
28 * created by Phil Karn. The SSE2 version was made by Bogdan
29 * Diaconescu. For more info see: gr-dvbt/lib/d_viterbi.h
30 */
31class viterbi_decoder : public base
32{
33public:
34 virtual uint8_t* decode(ofdm_param* ofdm, frame_param* frame, uint8_t* in);
35
36private:
37 union branchtab27 {
38 unsigned char c[32];
39 __m128i v[2];
40 } d_branchtab27_sse2[2];
41
42 alignas(16) __m128i d_metric0[4];
43 alignas(16) __m128i d_metric1[4];
44 alignas(16) __m128i d_path0[4];
45 alignas(16) __m128i d_path1[4];
46
47 virtual void reset();
48
49 void viterbi_chunks_init_sse2();
50 void viterbi_butterfly2_sse2(
51 unsigned char* symbols, __m128i m0[], __m128i m1[], __m128i p0[], __m128i p1[]);
52 unsigned char viterbi_get_output_sse2(__m128i* mm0,
53 __m128i* pp0,
54 int ntraceback,
55 unsigned char* outbuf);
56};
57
58} // namespace ieee802_11
59} // namespace gr
60
61#endif /* INCLUDED_IEEE802_11_VITERBI_DECODER_X86_H */
Definition utils.h:80
Definition viterbi_decoder/base.h:34
virtual void reset()=0
Definition viterbi_decoder_generic.h:31
virtual uint8_t * decode(ofdm_param *ofdm, frame_param *frame, uint8_t *in)
Definition utils.h:58
Definition chunks_to_symbols.h:24
Definition chunks_to_symbols.h:23