Changeset 3374
- Timestamp:
- 04/09/07 12:29:24 (6 years ago)
- Location:
- experimental/components/SymbolSyncPoly
- Files:
-
- 1 added
- 6 modified
-
SymbolSyncPoly.cpp (modified) (1 diff)
-
SymbolSyncPoly.h (modified) (1 diff)
-
SymbolSyncPolyDSP.cpp (modified) (3 diffs)
-
SymbolSyncPolyDSP.h (modified) (2 diffs)
-
autotest_sources (modified) (1 prop)
-
autotest_sources/.ignore (added)
-
main.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
experimental/components/SymbolSyncPoly/SymbolSyncPoly.cpp
r3330 r3374 1 1 /**************************************************************************** 2 2 3 Copyright 200 6Virginia Polytechnic Institute and State University3 Copyright 2007 Virginia Polytechnic Institute and State University 4 4 5 5 This file is part of the OSSIE SymbolSyncPoly. -
experimental/components/SymbolSyncPoly/SymbolSyncPoly.h
r3330 r3374 1 1 /**************************************************************************** 2 2 3 Copyright 200 6Virginia Polytechnic Institute and State University3 Copyright 2007 Virginia Polytechnic Institute and State University 4 4 5 5 This file is part of the OSSIE SymbolSyncPoly. -
experimental/components/SymbolSyncPoly/SymbolSyncPolyDSP.cpp
r3371 r3374 49 49 b = 0; 50 50 b_soft = 0.0f; 51 Npfb = 16; 51 Npfb = 0; 52 k = 0; 53 v = 0; 52 54 } 53 55 … … 77 79 } else { 78 80 std::cerr << "ERROR: SymbolSyncPolyDSP::CreateFilterBank() :" << std::endl 79 << " => unknown filter type " << type << std::endl;81 << " => unknown/unsupported filter type " << type << std::endl; 80 82 throw 0; 81 83 } 82 84 85 k = _k; 83 86 Npfb = (int) _Npfb; 84 87 } … … 107 110 } 108 111 112 // Main signal processing loop 113 void SymbolSyncPolyDSP::SynchronizeAndDecimate(short * I_in, 114 short * Q_in, 115 unsigned int N_in, 116 short *& I_out, 117 short *& Q_out, 118 unsigned int & N_out) 119 { 120 unsigned int i(0); 121 while ( i<N_in ) { 122 v++; 123 124 switch ( lc ) { 125 case SHIFT: 126 // Shift sample into state registers, normal operation 127 MF_i->PushInput( I_in[i] ); 128 dMF_i->PushInput( I_in[i] ); 129 MF_q->PushInput( Q_in[i] ); 130 dMF_q->PushInput( Q_in[i] ); 131 i++; 132 break; 133 case SKIP: 134 // 'Skip' input sample by incrementing index by two 135 136 if ( i < (N_in-1) ) { 137 for (unsigned int k=0; k<2; k++) { 138 MF_i->PushInput( I_in[i] ); 139 dMF_i->PushInput( I_in[i] ); 140 MF_q->PushInput( Q_in[i] ); 141 dMF_q->PushInput( Q_in[i] ); 142 i++; 143 } 144 } else { 145 // not enough samples in input buffer: save state and 146 // wait for more 147 /// \todo configure 148 return; 149 } 150 151 // return loop control to normal 'shift' state 152 lc = SHIFT; 153 break; 154 case STUFF: 155 // 'Stuff' (repeat) input sample by not incrementing index 156 // This effectively does not update filter states 157 158 // return loop control to normal 'shift' state 159 lc = SHIFT; 160 break; 161 default:; 162 } 163 164 if ( v>=k ) { 165 // Enable output 166 167 // Filter in-phase signal with MF and dMF with filter bank b 168 MF_i->ComputeOutput(mf_i, b); 169 dMF_i->ComputeOutput(dmf_i, b); 170 171 // Filter quadrature signal with MF and dMF with filter bank b 172 MF_q->ComputeOutput(mf_q, b); 173 dMF_q->ComputeOutput(dmf_q, b); 174 175 // Store result in output buffer 176 // I_out[x] = mf_i; 177 // Q_out[x] = mf_q; 178 179 GenerateErrorSignal(); 180 181 AdvanceLoopFilter(); 182 183 ComputeFilterBankIndex(); 184 } 185 186 } // while 187 } 109 188 110 189 190 -
experimental/components/SymbolSyncPoly/SymbolSyncPolyDSP.h
r3371 r3374 61 61 void SynchronizeAndDecimate(short * I_in, 62 62 short * Q_in, 63 int N_in,63 unsigned int N_in, 64 64 short *& I_out, 65 65 short *& Q_out, 66 int & N_out);66 unsigned int & N_out); 67 67 68 68 protected: … … 106 106 int Npfb; ///< number of filters in bank 107 107 108 unsigned int k; ///< samples per symbol 109 unsigned int v; ///< sample counter 110 108 111 flow_control lc; ///< loop flow control state 109 112 -
experimental/components/SymbolSyncPoly/autotest_sources
-
Property
svn:ignore set
to
*.swp
*.bak
-
Property
svn:ignore set
to
-
experimental/components/SymbolSyncPoly/main.cpp
r3326 r3374 1 1 /**************************************************************************** 2 2 3 Copyright 200 6Virginia Polytechnic Institute and State University3 Copyright 2007 Virginia Polytechnic Institute and State University 4 4 5 5 This file is part of the OSSIE SymbolSyncPoly.