Commit 934373e1 authored by Raymond Knopp's avatar Raymond Knopp

bugfix in dci_tools_ue.c (check_format1_1a_coherency issue)

parent 7f2459ed
...@@ -943,7 +943,7 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, ...@@ -943,7 +943,7 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
} }
} }
if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) if (dci_format == format1a && ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)))
{ {
NPRB = (TPC&1) + 2; NPRB = (TPC&1) + 2;
switch (N_RB_DL) { switch (N_RB_DL) {
...@@ -960,8 +960,8 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, ...@@ -960,8 +960,8 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
RIV_max = RIV_max100; RIV_max = RIV_max100;
break; break;
} }
} }
else else if (dci_format == format1a)
{ {
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: case 6:
...@@ -996,13 +996,13 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, ...@@ -996,13 +996,13 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
} }
if(dci_format == format1) else if (dci_format == format1)
{ {
NPRB = conv_nprb(rah, rballoc, N_RB_DL); NPRB = conv_nprb(rah, rballoc, N_RB_DL);
} }
if(rballoc > RIV_max) if(dci_format == format1a && rballoc > RIV_max)
{ {
// LOG_I(PHY,"bad dci rballoc rballoc %d RIV_max %lld \n",rballoc, RIV_max); // LOG_I(PHY,"bad dci rballoc rballoc %d RIV_max %lld \n",rballoc, RIV_max);
// DCI false detection // DCI false detection
......
...@@ -287,9 +287,9 @@ typedef struct { ...@@ -287,9 +287,9 @@ typedef struct {
#ifndef malloc16 #ifndef malloc16
# ifdef __AVX2__ # ifdef __AVX2__
# define malloc16(x) memalign(32,x) # define malloc16(x) memalign(32,x+32)
# else # else
# define malloc16(x) memalign(16,x) # define malloc16(x) memalign(16,x+16)
# endif # endif
#endif #endif
#define free16(y,x) free(y) #define free16(y,x) free(y)
...@@ -306,9 +306,9 @@ typedef struct { ...@@ -306,9 +306,9 @@ typedef struct {
static inline void* malloc16_clear( size_t size ) static inline void* malloc16_clear( size_t size )
{ {
#ifdef __AVX2__ #ifdef __AVX2__
void* ptr = memalign(32, size); void* ptr = memalign(32, size+32);
#else #else
void* ptr = memalign(16, size); void* ptr = memalign(16, size+16);
#endif #endif
DevAssert(ptr); DevAssert(ptr);
memset( ptr, 0, size ); memset( ptr, 0, size );
......
...@@ -521,6 +521,7 @@ int main(int argc, char **argv) ...@@ -521,6 +521,7 @@ int main(int argc, char **argv)
int k,i,j,aa; int k,i,j,aa;
int re; int re;
int s,Kr,Kr_bytes; int s,Kr,Kr_bytes;
double SNR,snr0=-2.0,snr1,rate = 0; double SNR,snr0=-2.0,snr1,rate = 0;
...@@ -1306,7 +1307,9 @@ int main(int argc, char **argv) ...@@ -1306,7 +1307,9 @@ int main(int argc, char **argv)
} }
*/ */
UE->pdcch_vars[UE->current_thread_id[subframe]][0]->crnti = n_rnti; UE->pdcch_vars[UE->current_thread_id[subframe]][0]->crnti = n_rnti;
UE->n_connected_eNB = 1;
printf("Allocating %dx%d eNB->UE channel descriptor\n",eNB->frame_parms.nb_antennas_tx,UE->frame_parms.nb_antennas_rx); printf("Allocating %dx%d eNB->UE channel descriptor\n",eNB->frame_parms.nb_antennas_tx,UE->frame_parms.nb_antennas_rx);
eNB2UE[0] = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx, eNB2UE[0] = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
...@@ -1318,8 +1321,10 @@ int main(int argc, char **argv) ...@@ -1318,8 +1321,10 @@ int main(int argc, char **argv)
rx_sample_offset, rx_sample_offset,
0); 0);
reset_meas(&eNB2UE[0]->random_channel);
reset_meas(&eNB2UE[0]->interp_time);
if(num_rounds>1) { if(num_rounds>1) {
for(n=1; n<4; n++) for(n=1; n<4; n++) {
eNB2UE[n] = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx, eNB2UE[n] = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
UE->frame_parms.nb_antennas_rx, UE->frame_parms.nb_antennas_rx,
channel_model, channel_model,
...@@ -1328,8 +1333,11 @@ int main(int argc, char **argv) ...@@ -1328,8 +1333,11 @@ int main(int argc, char **argv)
forgetting_factor, forgetting_factor,
rx_sample_offset, rx_sample_offset,
0); 0);
reset_meas(&eNB2UE[n]->random_channel);
reset_meas(&eNB2UE[n]->interp_time);
}
} }
if (eNB2UE[0]==NULL) { if (eNB2UE[0]==NULL) {
printf("Problem generating channel model. Exiting.\n"); printf("Problem generating channel model. Exiting.\n");
exit(-1); exit(-1);
......
...@@ -39,7 +39,7 @@ eNBs = ...@@ -39,7 +39,7 @@ eNBs =
downlink_frequency = 2685000000L; downlink_frequency = 2685000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 50; N_RB_DL = 100;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antenna_ports = 1; nb_antenna_ports = 1;
nb_antennas_tx = 1; nb_antennas_tx = 1;
......
...@@ -39,7 +39,7 @@ eNBs = ...@@ -39,7 +39,7 @@ eNBs =
downlink_frequency = 2685000000L; downlink_frequency = 2685000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 50; N_RB_DL = 100;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antenna_ports = 1; nb_antenna_ports = 1;
nb_antennas_tx = 1; nb_antennas_tx = 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