- Added new Viterbi convolutional decoder to the OFDM Decode Mac block replacing the former IT++ version. This new decoder uses
SSE2 and improves the performance significantly. The decoder was taken from the gr-dvbt module from GNU Radio. - Disabled some logging functions in the ofdm_mac and ofdm_decode_signal blocks that were degrading the performance significantly. [Gonzalo Arcos | Rodrigo Ferreri]
This commit is contained in:
committed by
Bastian Bloessl
parent
74ae445143
commit
0f56254df3
+65
@@ -23,6 +23,9 @@
|
||||
#include <cinttypes>
|
||||
#include <iostream>
|
||||
|
||||
// Needed for the SSE2 Viterbi decoder
|
||||
#include <xmmintrin.h>
|
||||
|
||||
const int MAX_SYM = 520; // enough for 1500 byte BPSK 1/2
|
||||
const int MAX_BITS = 1550 * 8 * 2;
|
||||
|
||||
@@ -120,4 +123,66 @@ void split_symbols(const char *input, char *out, tx_param &tx, ofdm_param &ofdm)
|
||||
|
||||
void generate_bits(const char *psdu, char *data_bits, tx_param &tx);
|
||||
|
||||
/* New functions for the SSE2 Convolutional Decoder */
|
||||
|
||||
/* This Viterbi decoder was taken from the gr-dvbt module of
|
||||
* GNU Radio. It is an SSE2 version of the Viterbi Decoder
|
||||
* created by Phil Karn. The SSE2 version was made by Bogdan
|
||||
* Diaconescu. For more info see: gr-dvbt/lib/d_viterbi.h
|
||||
*/
|
||||
|
||||
|
||||
struct viterbi_state {
|
||||
unsigned long path; /* Decoded path to this state */
|
||||
long metric; /* Cumulative metric to this state */
|
||||
|
||||
/* vector implementation */
|
||||
__m128i pp; /* Decoded path to this state */
|
||||
__m128i mm; /* Cumulative metric to this state */
|
||||
};
|
||||
|
||||
int d_gen_met(int mettab[2][256], /* Metric table */
|
||||
int amp, /* Signal amplitude */
|
||||
double esn0, /* Es/N0 ratio in dB */
|
||||
double bias, /* Metric bias */
|
||||
int scale); /* Scale factor */
|
||||
|
||||
unsigned char
|
||||
d_encode(unsigned char *symbols, unsigned char *data,
|
||||
unsigned int nbytes,unsigned char encstate);
|
||||
|
||||
void
|
||||
d_viterbi_chunks_init(struct viterbi_state* state);
|
||||
|
||||
void
|
||||
d_viterbi_chunks_init_sse2(__m128i *mm0, __m128i *pp0);
|
||||
|
||||
void
|
||||
d_viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1);
|
||||
|
||||
void
|
||||
d_viterbi_butterfly2_sse2(unsigned char *symbols, __m128i m0[], __m128i m1[], __m128i p0[], __m128i p1[]);
|
||||
|
||||
void
|
||||
d_viterbi_butterfly_sse2(unsigned char *symbols, __m128i m0[], __m128i m1[], __m128i p0[], __m128i p1[]);
|
||||
|
||||
unsigned char
|
||||
d_viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf);
|
||||
|
||||
unsigned char
|
||||
d_viterbi_get_output_sse2(__m128i *mm0, __m128i *pp0, int ntraceback, unsigned char *outbuf);
|
||||
|
||||
|
||||
int
|
||||
d_viterbi(unsigned long *metric, /* Final path metric (returned value) */
|
||||
unsigned char *data, /* Decoded output data */
|
||||
unsigned char *symbols, /* Raw deinterleaved input symbols */
|
||||
unsigned int nbits, /* Number of output bits */
|
||||
int mettab[2][256] /* Metric table, [sent sym][rx symbol] */
|
||||
);
|
||||
|
||||
|
||||
/* End of added functions */
|
||||
|
||||
|
||||
#endif /* INCLUDED_IEEE802_11_OFDM_UTILS_H */
|
||||
|
||||
Reference in New Issue
Block a user