23 | | //The modulation is specified as a vector with 192 4-bit elements |
24 | | //The indicies below represent the subcarrier index: |
25 | | // x[0:63] specify the full-rate modulation for antenna A |
26 | | // x[64:127] specify the full-rate modulation for antenna B |
27 | | // x[128:191] specify the base-rate modulation |
28 | | |
29 | | //When re-cast as a vector of unsigned ints, the subcarrier indicies are mapped like: |
30 | | // [ [7 6 5 4 3 2 1 0] [15 14 13 12 11 10 9 8] [23 22 21 20 19 18 17 16] ...] |
31 | | //Thus, |
32 | | // unsigned int modMasks_qpsk[24] = {0x02222220, 0x22222222, 0x22022222 ... |
33 | | //results in zeros at subcarriers 0, 7 and 21... |
34 | | |
35 | | //QPSK modulation on 48 subcarriers |
36 | | unsigned int modMasks_qpsk[24] = {0x02222220, 0x22222222, 0x22022222, 0x00000222, 0x22000000, 0x22220222, 0x22222222, 0x22222202, 0x02222220, 0x22222222, 0x22022222, 0x00000222, 0x22000000, 0x22220222, 0x22222222, 0x22222202, 0x02222220, 0x22222222, 0x22022222, 0x00000222, 0x22000000, 0x22220222, 0x22222222, 0x22222202}; |
37 | | |
38 | | //16-QAM on 48 subcarriers |
39 | | unsigned int modMasks_16qam[24] = {0x04444440, 0x44444444, 0x44044444, 0x00000444, 0x44000000, 0x44440444, 0x44444444, 0x44444404, 0x04444440, 0x44444444, 0x44044444, 0x00000444, 0x44000000, 0x44440444, 0x44444444, 0x44444404, 0x04444440, 0x44444444, 0x44044444, 0x00000444, 0x44000000, 0x44440444, 0x44444444, 0x44444404}; |
40 | | |
41 | | //64-QAM on 48 subcarriers |
42 | | unsigned int modMasks_64qam[24] = {0x06666660, 0x66666666, 0x66066666, 0x00000666, 0x66000000, 0x66660666, 0x66666666, 0x66666606, 0x06666660, 0x66666666, 0x66066666, 0x00000666, 0x66000000, 0x66660666, 0x66666666, 0x66666606, 0x06666660, 0x66666666, 0x66066666, 0x00000666, 0x66000000, 0x66660666, 0x66666666, 0x66666606}; |
43 | | |
44 | | unsigned char i; |
45 | | |
46 | | for(i=0; i<24; i++) |
47 | | { |
48 | | //Uncomment one of the following lines to select the modulation scheme at the Transmitter |
49 | | *((volatile unsigned int*)(XPAR_OFDM_TXRX_MIMO_OPBW_0_BASEADDR+ofdm_TxRx_mimo_SMWO_TxModulation_OFFSET+i*sizeof(int))) = modMasks_qpsk[i]; |
50 | | //*((volatile unsigned int*)(XPAR_OFDM_TXRX_MIMO_OPBW_0_BASEADDR+ofdm_TxRx_mimo_SMWO_TxModulation_OFFSET+i*sizeof(int))) = modMasks_16qam[i]; |
51 | | //*((volatile unsigned int*)(XPAR_OFDM_TXRX_MIMO_OPBW_0_BASEADDR+ofdm_TxRx_mimo_SMWO_TxModulation_OFFSET+i*sizeof(int))) = modMasks_64qam[i]; |
52 | | } |
53 | | |
54 | | for(i=0; i<24; i++) |
55 | | { |
56 | | //Uncomment one of the following lines to select the modulation scheme at the Receiver |
57 | | *((volatile unsigned int*)(XPAR_OFDM_TXRX_MIMO_OPBW_0_BASEADDR+ofdm_TxRx_mimo_SMWO_RxModulation_OFFSET+i*sizeof(int))) = modMasks_qpsk[i]; |
58 | | //*((volatile unsigned int*)(XPAR_OFDM_TXRX_MIMO_OPBW_0_BASEADDR+ofdm_TxRx_mimo_SMWO_RxModulation_OFFSET+i*sizeof(int))) = modMasks_16qam[i]; |
59 | | //*((volatile unsigned int*)(XPAR_OFDM_TXRX_MIMO_OPBW_0_BASEADDR+ofdm_TxRx_mimo_SMWO_RxModulation_OFFSET+i*sizeof(int))) = modMasks_64qam[i]; |
60 | | } |
61 | | } |
62 | | }}} |