bug fixes

This commit is contained in:
Sakthi
2020-08-10 19:22:53 +02:00
parent 5e7ce26c10
commit 76f7840961
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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 : \
(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) {
+3 -2
View File
@@ -58,10 +58,11 @@ short nr_qpsk_mod_table[8] = {16384,16384,-16384,16384,16384,-16384,-16384,-1638
#endif
//16QAM
table = (short*) nr_16qam_byte_mod_table;
for (i=0; i<256; i++) {
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;
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)] = (short)((1-2*((i>>(j*4))&1))*(2-(1-2*((i>>(j*4+2))&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]);
}
}