00001 /* 00002 * SPUC - Signal processing using C++ - A DSP library 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2, or (at your option) 00007 * any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 // 00019 //#include <stdio.h> 00020 //#include <stdlib.h> 00021 #include <math.h> 00022 #include <complex.h> 00023 #include <max_pn.h> 00024 #include <noise.h> 00025 #include "bpsk_ber_test.h" 00026 #include <fading_channel.h> 00027 #include <mle.h> 00028 namespace SPUC { 00037 class baud_eq_env 00038 { 00039 public: 00040 00041 bpsk_ber_test* BER_mon; 00042 max_pn* tx_data_source; 00043 noise* n; 00044 mle<complex<double> >* DUT; 00045 fading_channel* multipaths; 00046 00047 long num; 00048 double var; 00049 double snr; 00050 long data; // output of equalizer 00051 long output_delay; // Equalizer output delay (for paths to merge) 00052 long eq_type; // type of equalizer used 00053 // 0 MLSE, 1 DDFSE 00054 00055 complex<double> base; 00056 complex<double> main; 00057 complex<double> b_noise; // Noise 00058 long rcv_symbols; // Number of symbols decoded 00059 long count; // index of sample number at input rate 00060 long paths; // Number of multipaths in channel model 00061 long phase_acc; 00062 00063 baud_eq_env(long paths=1); 00064 void loop_init(long eq_type, long data_delay, double dly_spread); 00065 void step(void); 00066 void loop_end(void); 00067 }; 00068 }