www.pudn.com > viterbi_wlan_c54.rar > test.h


//***************************************************************************** 
//  Filename:	 test.h 
//  Version:	 0.01 
//  Description:  
//  Author:	 LiuKai		vikingpro@163.com 
//***************************************************************************** 
 
#define METRIC_SZ 	128       // 2*STATES 
#define STATES 		64        // 2^(K-1) , K = 7 
 
#pragma DATA_SECTION(metrics,".metrics") 
int metrics[2*STATES];  
 
//test1 
#define FRAME_WORD_SZ 	2 
#define FRAME_BIT_SZ 	28 // 18 useful bits + 6 pads 
 
int frame[FRAME_WORD_SZ+1] ={ 
    // 2 words of packed input, 18 bits, backformation 
    // first  (8 + 6) bits padded with zeros 
          0x0000, //............pad|pad|pad|pad|pad|pad|bit[17]bit[16] 
          0x0c8d, //bit[15].....................................bit[0] 
          0x0000, 
}; 
 
int enc_out[2*FRAME_WORD_SZ]; 
 
int g0g1[2*FRAME_BIT_SZ];  
 
int dec_out[FRAME_WORD_SZ]; 
 
int trans[4*FRAME_BIT_SZ]; 
 
//test2 
#define FRAME_WORD_SZ_2 	12 
#define FRAME_BIT_SZ_2 	190 //24 	  // 18 useful bits + 6 pads 
int frame_2[FRAME_WORD_SZ_2 + 1] ={ 
    // 12 words of packed input, 189 bits,backformation 
    // first 3 bits padded with zeros 
          0x0067,  // pad|pad|pad|pad|pad|pad|pad|pad|...bit[176] 
          0xC0EF,  // bit[175]|bit[174]........................bit[160] 
          0x3456,  //... 
          0xFADE, 
          0xACDC, 
          0x2345, 
          0xBABE, 
          0x789A, 
          0xFADE, 
          0xC0DE, //.... 
          0xDEC1, //bit[31].....................................bit[16] 
          0x0c8d, //bit[15].....................................bit[0] 
          0x0000, 
}; 
 
int enc_out_2[2*FRAME_WORD_SZ_2]; 
 
int g0g1_2[2*FRAME_BIT_SZ_2];  
 
int dec_out_2[FRAME_WORD_SZ_2]; 
 
int trans_2[4*FRAME_BIT_SZ_2];