Changeset 4096

Show
Ignore:
Timestamp:
06/02/07 15:45:30 (6 years ago)
Author:
jgaeddert
Message:

Fixing 16-QAM test in Demodulator component

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • experimental/components/Demodulator/atsrc/Demodulator_testsuite.h

    r4095 r4096  
    205205    } 
    206206 
    207     void xtest_Demodulate16QAM() { 
     207    void test_Demodulate16QAM() { 
    208208        short I[16] = { 
    209209            -15, -15, -15, -15, 
     
    218218        char * bits_out = new char[64]; 
    219219 
    220         SetModulationScheme( MOD_8PSK ); 
     220        SetModulationScheme( MOD_16QAM ); 
    221221        DemodulateSequence(I, Q, 16, bits_out); 
    222222 
    223223        TS_ASSERT_EQUALS( bits_out[0],  BIT0 ); 
    224224        TS_ASSERT_EQUALS( bits_out[1],  BIT0 ); 
    225         TS_ASSERT_EQUALS( bits_out[2],  BIT0 ); 
     225        TS_ASSERT_EQUALS( bits_out[2],  BIT1 ); 
    226226        TS_ASSERT_EQUALS( bits_out[3],  BIT0 ); 
    227227 
    228228        TS_ASSERT_EQUALS( bits_out[4],  BIT0 ); 
    229         TS_ASSERT_EQUALS( bits_out[5],  BIT1 ); 
     229        TS_ASSERT_EQUALS( bits_out[5],  BIT0 ); 
    230230        TS_ASSERT_EQUALS( bits_out[6],  BIT1 ); 
    231         TS_ASSERT_EQUALS( bits_out[7],  BIT0 ); 
    232  
    233         TS_ASSERT_EQUALS( bits_out[8],  BIT1 ); 
    234         TS_ASSERT_EQUALS( bits_out[9],  BIT1 ); 
     231        TS_ASSERT_EQUALS( bits_out[7],  BIT1 ); 
     232 
     233        TS_ASSERT_EQUALS( bits_out[8],  BIT0 ); 
     234        TS_ASSERT_EQUALS( bits_out[9],  BIT0 ); 
    235235        TS_ASSERT_EQUALS( bits_out[10], BIT0 ); 
    236         TS_ASSERT_EQUALS( bits_out[11], BIT0 ); 
    237  
    238         TS_ASSERT_EQUALS( bits_out[12], BIT1 ); 
    239         TS_ASSERT_EQUALS( bits_out[13], BIT1 ); 
     236        TS_ASSERT_EQUALS( bits_out[11], BIT1 ); 
     237 
     238        TS_ASSERT_EQUALS( bits_out[12], BIT0 ); 
     239        TS_ASSERT_EQUALS( bits_out[13], BIT0 ); 
    240240        TS_ASSERT_EQUALS( bits_out[14], BIT0 ); 
    241         TS_ASSERT_EQUALS( bits_out[15], BIT1 ); 
    242  
    243         TS_ASSERT_EQUALS( bits_out[16], BIT1 ); 
     241        TS_ASSERT_EQUALS( bits_out[15], BIT0 ); 
     242 
     243        TS_ASSERT_EQUALS( bits_out[16], BIT0 ); 
    244244        TS_ASSERT_EQUALS( bits_out[17], BIT1 ); 
    245         TS_ASSERT_EQUALS( bits_out[18], BIT0 ); 
    246         TS_ASSERT_EQUALS( bits_out[19], BIT1 ); 
    247  
    248         TS_ASSERT_EQUALS( bits_out[20], BIT1 ); 
    249         TS_ASSERT_EQUALS( bits_out[21], BIT0 ); 
     245        TS_ASSERT_EQUALS( bits_out[18], BIT1 ); 
     246        TS_ASSERT_EQUALS( bits_out[19], BIT0 ); 
     247 
     248        TS_ASSERT_EQUALS( bits_out[20], BIT0 ); 
     249        TS_ASSERT_EQUALS( bits_out[21], BIT1 ); 
    250250        TS_ASSERT_EQUALS( bits_out[22], BIT1 ); 
    251         TS_ASSERT_EQUALS( bits_out[23], BIT0 ); 
     251        TS_ASSERT_EQUALS( bits_out[23], BIT1 ); 
    252252 
    253253        TS_ASSERT_EQUALS( bits_out[24], BIT0 ); 
    254         TS_ASSERT_EQUALS( bits_out[25], BIT0 ); 
     254        TS_ASSERT_EQUALS( bits_out[25], BIT1 ); 
    255255        TS_ASSERT_EQUALS( bits_out[26], BIT0 ); 
    256         TS_ASSERT_EQUALS( bits_out[27], BIT0 ); 
     256        TS_ASSERT_EQUALS( bits_out[27], BIT1 ); 
    257257 
    258258        TS_ASSERT_EQUALS( bits_out[28], BIT0 ); 
    259         TS_ASSERT_EQUALS( bits_out[29], BIT0 ); 
     259        TS_ASSERT_EQUALS( bits_out[29], BIT1 ); 
    260260        TS_ASSERT_EQUALS( bits_out[30], BIT0 ); 
    261261        TS_ASSERT_EQUALS( bits_out[31], BIT0 ); 
    262262 
    263         TS_ASSERT_EQUALS( bits_out[32], BIT0 ); 
    264         TS_ASSERT_EQUALS( bits_out[33], BIT0 ); 
    265         TS_ASSERT_EQUALS( bits_out[34], BIT0 ); 
     263        TS_ASSERT_EQUALS( bits_out[32], BIT1 ); 
     264        TS_ASSERT_EQUALS( bits_out[33], BIT1 ); 
     265        TS_ASSERT_EQUALS( bits_out[34], BIT1 ); 
    266266        TS_ASSERT_EQUALS( bits_out[35], BIT0 ); 
    267267 
    268         TS_ASSERT_EQUALS( bits_out[36], BIT0 ); 
     268        TS_ASSERT_EQUALS( bits_out[36], BIT1 ); 
    269269        TS_ASSERT_EQUALS( bits_out[37], BIT1 ); 
    270270        TS_ASSERT_EQUALS( bits_out[38], BIT1 ); 
    271         TS_ASSERT_EQUALS( bits_out[39], BIT0 ); 
     271        TS_ASSERT_EQUALS( bits_out[39], BIT1 ); 
    272272 
    273273        TS_ASSERT_EQUALS( bits_out[40], BIT1 ); 
    274274        TS_ASSERT_EQUALS( bits_out[41], BIT1 ); 
    275275        TS_ASSERT_EQUALS( bits_out[42], BIT0 ); 
    276         TS_ASSERT_EQUALS( bits_out[43], BIT0 ); 
     276        TS_ASSERT_EQUALS( bits_out[43], BIT1 ); 
    277277 
    278278        TS_ASSERT_EQUALS( bits_out[44], BIT1 ); 
    279279        TS_ASSERT_EQUALS( bits_out[45], BIT1 ); 
    280280        TS_ASSERT_EQUALS( bits_out[46], BIT0 ); 
    281         TS_ASSERT_EQUALS( bits_out[47], BIT1 ); 
     281        TS_ASSERT_EQUALS( bits_out[47], BIT0 ); 
    282282 
    283283        TS_ASSERT_EQUALS( bits_out[48], BIT1 ); 
    284         TS_ASSERT_EQUALS( bits_out[49], BIT1 ); 
    285         TS_ASSERT_EQUALS( bits_out[50], BIT0 ); 
    286         TS_ASSERT_EQUALS( bits_out[51], BIT1 ); 
     284        TS_ASSERT_EQUALS( bits_out[49], BIT0 ); 
     285        TS_ASSERT_EQUALS( bits_out[50], BIT1 ); 
     286        TS_ASSERT_EQUALS( bits_out[51], BIT0 ); 
    287287 
    288288        TS_ASSERT_EQUALS( bits_out[52], BIT1 ); 
    289289        TS_ASSERT_EQUALS( bits_out[53], BIT0 ); 
    290290        TS_ASSERT_EQUALS( bits_out[54], BIT1 ); 
    291         TS_ASSERT_EQUALS( bits_out[55], BIT0 ); 
    292  
    293         TS_ASSERT_EQUALS( bits_out[56], BIT0 ); 
     291        TS_ASSERT_EQUALS( bits_out[55], BIT1 ); 
     292 
     293        TS_ASSERT_EQUALS( bits_out[56], BIT1 ); 
    294294        TS_ASSERT_EQUALS( bits_out[57], BIT0 ); 
    295295        TS_ASSERT_EQUALS( bits_out[58], BIT0 ); 
    296         TS_ASSERT_EQUALS( bits_out[59], BIT0 ); 
    297  
    298         TS_ASSERT_EQUALS( bits_out[60], BIT0 ); 
     296        TS_ASSERT_EQUALS( bits_out[59], BIT1 ); 
     297 
     298        TS_ASSERT_EQUALS( bits_out[60], BIT1 ); 
    299299        TS_ASSERT_EQUALS( bits_out[61], BIT0 ); 
    300300        TS_ASSERT_EQUALS( bits_out[62], BIT0 );