Commit 76f78409 authored by Sakthi's avatar Sakthi

bug fixes

parent 5e7ce26c
...@@ -51,7 +51,7 @@ void nr_modulation(uint32_t *in, ...@@ -51,7 +51,7 @@ void nr_modulation(uint32_t *in,
offset = (mod_order==2)? NR_MOD_TABLE_QPSK_OFFSET : (mod_order==4)? NR_MOD_TABLE_QAM16_OFFSET : \ offset = (mod_order==2)? NR_MOD_TABLE_QPSK_OFFSET : (mod_order==4)? NR_MOD_TABLE_QAM16_OFFSET : \
(mod_order==6)? NR_MOD_TABLE_QAM64_OFFSET: (mod_order==8)? NR_MOD_TABLE_QAM256_OFFSET : 0; (mod_order==6)? NR_MOD_TABLE_QAM64_OFFSET: (mod_order==8)? NR_MOD_TABLE_QAM256_OFFSET : 0;
LOG_I(PHY,"nr_modulation: length %d, mod_order %d\n",length,mod_order); LOG_D(PHY,"nr_modulation: length %d, mod_order %d\n",length,mod_order);
switch (mod_order) { switch (mod_order) {
......
...@@ -58,10 +58,11 @@ short nr_qpsk_mod_table[8] = {16384,16384,-16384,16384,16384,-16384,-16384,-1638 ...@@ -58,10 +58,11 @@ short nr_qpsk_mod_table[8] = {16384,16384,-16384,16384,16384,-16384,-16384,-1638
#endif #endif
//16QAM //16QAM
table = (short*) nr_16qam_byte_mod_table;
for (i=0; i<256; i++) { for (i=0; i<256; i++) {
for (j=0; j<2; j++) { for (j=0; j<2; j++) {
nr_16qam_byte_mod_table[i*4+(j*2)] = (short)((1-2*((i>>(j*4))&1))*(2-(1-2*((i>>(j*4+2))&1))))*val*sqrt10*sqrt2; table[i*4+(j*2)] = (short)((1-2*((i>>(j*4))&1))*(2-(1-2*((i>>(j*4+2))&1))))*val*sqrt10*sqrt2;
nr_16qam_byte_mod_table[i*4+(j*2)+1] = (short)((1-2*((i>>(j*4+1))&1))*(2-(1-2*((i>>(j*4+3))&1))))*val*sqrt10*sqrt2; table[i*4+(j*2)+1] = (short)((1-2*((i>>(j*4+1))&1))*(2-(1-2*((i>>(j*4+3))&1))))*val*sqrt10*sqrt2;
//printf("%d j%d\n",nr_16qam_byte_mod_table[i*4+(j*2)],nr_16qam_byte_mod_table[i*4+(j*2)+1]); //printf("%d j%d\n",nr_16qam_byte_mod_table[i*4+(j*2)],nr_16qam_byte_mod_table[i*4+(j*2)+1]);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment