Commit bcdb62e1 authored by gabrielC's avatar gabrielC

Optimisation of rx_pdcch : save some time by reading one symbol pdcch first...

Optimisation of rx_pdcch : save some time by reading one symbol pdcch first and read symbol 2 and 3 if needed
Optimisation of nb of candidate when searching DCI
parent 4ac34f7c
...@@ -653,7 +653,7 @@ void pdcch_channel_level(int32_t **dl_ch_estimates_ext, ...@@ -653,7 +653,7 @@ void pdcch_channel_level(int32_t **dl_ch_estimates_ext,
//clear average level //clear average level
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
avg128P = _mm_setzero_si128(); avg128P = _mm_setzero_si128();
dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][frame_parms->N_RB_DL*12]; dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][0];
#elif defined(__arm__) #elif defined(__arm__)
#endif #endif
...@@ -1699,49 +1699,51 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1699,49 +1699,51 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
uint8_t eNB_id_i=eNB_id+1;//add 1 to eNB_id to separate from wanted signal, chosen as the B/F'd pilots from the SeNB are shifted by 1 uint8_t eNB_id_i=eNB_id+1;//add 1 to eNB_id to separate from wanted signal, chosen as the B/F'd pilots from the SeNB are shifted by 1
#endif #endif
int32_t avgs,s; int32_t avgs;
uint8_t n_pdcch_symbols = 3; //pdcch_vars[eNB_id]->num_pdcch_symbols; uint8_t n_pdcch_symbols;
uint8_t mi = get_mi(frame_parms,subframe); uint8_t mi = get_mi(frame_parms,subframe);
//printf("In rx_pdcch, subframe %d, eNB_id %d, pdcch_vars %d \n",subframe,eNB_id,pdcch_vars); //printf("In rx_pdcch, subframe %d, eNB_id %d, pdcch_vars %d \n",subframe,eNB_id,pdcch_vars);
for (s=0; s<n_pdcch_symbols; s++) {
if (is_secondary_ue == 1) { // procress ofdm symbol 0
if (is_secondary_ue == 1) {
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF, pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id+1], //add 1 to eNB_id to compensate for the shifted B/F'd pilots from the SeNB common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id+1], //add 1 to eNB_id to compensate for the shifted B/F'd pilots from the SeNB
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s, 0,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF, pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id_i - 1],//subtract 1 to eNB_id_i to compensate for the non-shifted pilots from the PeNB common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id_i - 1],//subtract 1 to eNB_id_i to compensate for the non-shifted pilots from the PeNB
pdcch_vars[eNB_id_i]->rxdataF_ext,//shift by two to simulate transmission from a second antenna pdcch_vars[eNB_id_i]->rxdataF_ext,//shift by two to simulate transmission from a second antenna
pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,//shift by two to simulate transmission from a second antenna pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,//shift by two to simulate transmission from a second antenna
s, 0,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
#endif //MU_RECEIVER #endif //MU_RECEIVER
} else if (frame_parms->nb_antenna_ports_eNB>1) { } else if (frame_parms->nb_antenna_ports_eNB>1) {
pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF, pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id], common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s, 0,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
} else { } else {
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF, pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id], common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s, 0,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
}
} }
// compute channel level based on ofdm symbol 0
pdcch_channel_level(pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_channel_level(pdcch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms, frame_parms,
avgP, avgP,
...@@ -1762,86 +1764,86 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1762,86 +1764,86 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
T(T_UE_PHY_PDCCH_ENERGY, T_INT(eNB_id), T_INT(0), T_INT(frame%1024), T_INT(subframe), T(T_UE_PHY_PDCCH_ENERGY, T_INT(eNB_id), T_INT(0), T_INT(frame%1024), T_INT(subframe),
T_INT(avgP[0]), T_INT(avgP[1]), T_INT(avgP[2]), T_INT(avgP[3])); T_INT(avgP[0]), T_INT(avgP[1]), T_INT(avgP[2]), T_INT(avgP[3]));
#endif #endif
for (s=0; s<n_pdcch_symbols; s++) {
pdcch_channel_compensation(pdcch_vars[eNB_id]->rxdataF_ext, // compute LLRs for ofdm symbol 0 only
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_channel_compensation(pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->rxdataF_comp, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
(aatx>1) ? pdcch_vars[eNB_id]->rho : NULL, pdcch_vars[eNB_id]->rxdataF_comp,
frame_parms, (aatx>1) ? pdcch_vars[eNB_id]->rho : NULL,
s, frame_parms,
log2_maxh); // log2_maxh+I0_shift 0,
log2_maxh); // log2_maxh+I0_shift
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
if (subframe==5) if (subframe==5)
write_output("rxF_comp_d.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); write_output("rxF_comp_d.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
#endif #endif
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
if (is_secondary_ue) { if (is_secondary_ue) {
//get MF output for interfering stream //get MF output for interfering stream
pdcch_channel_compensation(pdcch_vars[eNB_id_i]->rxdataF_ext, pdcch_channel_compensation(pdcch_vars[eNB_id_i]->rxdataF_ext,
pdcch_vars[eNB_id_i]->dl_ch_estimates_ext, pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,
pdcch_vars[eNB_id_i]->rxdataF_comp, pdcch_vars[eNB_id_i]->rxdataF_comp,
(aatx>1) ? pdcch_vars[eNB_id_i]->rho : NULL, (aatx>1) ? pdcch_vars[eNB_id_i]->rho : NULL,
frame_parms, frame_parms,
s, 0,
log2_maxh); // log2_maxh+I0_shift log2_maxh); // log2_maxh+I0_shift
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
write_output("rxF_comp_i.m","rxF_c_i",&pdcch_vars[eNB_id_i]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); write_output("rxF_comp_i.m","rxF_c_i",&pdcch_vars[eNB_id_i]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
#endif #endif
pdcch_dual_stream_correlation(frame_parms, pdcch_dual_stream_correlation(frame_parms,
s, 0,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
pdcch_vars[eNB_id_i]->dl_ch_estimates_ext, pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,
pdcch_vars[eNB_id]->dl_ch_rho_ext, pdcch_vars[eNB_id]->dl_ch_rho_ext,
log2_maxh); log2_maxh);
} }
#endif //MU_RECEIVER #endif //MU_RECEIVER
if (frame_parms->nb_antennas_rx > 1) { if (frame_parms->nb_antennas_rx > 1) {
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
if (is_secondary_ue) { if (is_secondary_ue) {
pdcch_detection_mrc_i(frame_parms, pdcch_detection_mrc_i(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp, pdcch_vars[eNB_id]->rxdataF_comp,
pdcch_vars[eNB_id_i]->rxdataF_comp, pdcch_vars[eNB_id_i]->rxdataF_comp,
pdcch_vars[eNB_id]->rho, pdcch_vars[eNB_id]->rho,
pdcch_vars[eNB_id]->dl_ch_rho_ext, pdcch_vars[eNB_id]->dl_ch_rho_ext,
s); 0);
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
write_output("rxF_comp_d.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); write_output("rxF_comp_d.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
write_output("rxF_comp_i.m","rxF_c_i",&pdcch_vars[eNB_id_i]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); write_output("rxF_comp_i.m","rxF_c_i",&pdcch_vars[eNB_id_i]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
#endif #endif
} else } else
#endif //MU_RECEIVER #endif //MU_RECEIVER
pdcch_detection_mrc(frame_parms, pdcch_detection_mrc(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp, pdcch_vars[eNB_id]->rxdataF_comp,
s); 0);
}
}
if (mimo_mode == SISO) if (mimo_mode == SISO)
pdcch_siso(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,s); pdcch_siso(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,0);
else else
pdcch_alamouti(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,s); pdcch_alamouti(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,0);
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
if (is_secondary_ue) { if (is_secondary_ue) {
pdcch_qpsk_qpsk_llr(frame_parms, pdcch_qpsk_qpsk_llr(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp, pdcch_vars[eNB_id]->rxdataF_comp,
pdcch_vars[eNB_id_i]->rxdataF_comp, pdcch_vars[eNB_id_i]->rxdataF_comp,
pdcch_vars[eNB_id]->dl_ch_rho_ext, pdcch_vars[eNB_id]->dl_ch_rho_ext,
pdcch_vars[eNB_id]->llr16, //subsequent function require 16 bit llr, but output must be 8 bit (actually clipped to 4, because of the Viterbi decoder) pdcch_vars[eNB_id]->llr16, //subsequent function require 16 bit llr, but output must be 8 bit (actually clipped to 4, because of the Viterbi decoder)
pdcch_vars[eNB_id]->llr, pdcch_vars[eNB_id]->llr,
s); 0);
/* /*
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
if (subframe==5) { if (subframe==5) {
...@@ -1849,22 +1851,21 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1849,22 +1851,21 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
write_output("llr16_seq.m","llr16",&pdcch_vars[eNB_id]->llr16[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4); write_output("llr16_seq.m","llr16",&pdcch_vars[eNB_id]->llr16[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4);
} }
#endif*/ #endif*/
} else { } else {
#endif //MU_RECEIVER #endif //MU_RECEIVER
pdcch_llr(frame_parms, pdcch_llr(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp, pdcch_vars[eNB_id]->rxdataF_comp,
(char *)pdcch_vars[eNB_id]->llr, (char *)pdcch_vars[eNB_id]->llr,
s); 0);
/*#ifdef DEBUG_PHY /*#ifdef DEBUG_PHY
write_output("llr8_seq.m","llr8",&pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4); write_output("llr8_seq.m","llr8",&pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4);
#endif*/ #endif*/
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
} }
#endif //MU_RECEIVER #endif //MU_RECEIVER
}
#if T_TRACER #if T_TRACER
T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL), T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL),
...@@ -1872,7 +1873,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1872,7 +1873,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
T_BUFFER(pdcch_vars[eNB_id]->rxdataF_comp, frame_parms->N_RB_DL*12*n_pdcch_symbols* 4)); T_BUFFER(pdcch_vars[eNB_id]->rxdataF_comp, frame_parms->N_RB_DL*12*n_pdcch_symbols* 4));
#endif #endif
// decode pcfich here // decode pcfich here and find out pdcch ofdm symbol number
n_pdcch_symbols = rx_pcfich(frame_parms, n_pdcch_symbols = rx_pcfich(frame_parms,
subframe, subframe,
pdcch_vars[eNB_id], pdcch_vars[eNB_id],
...@@ -1888,6 +1889,147 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1888,6 +1889,147 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
printf("demapping: subframe %d, mi %d, tdd_config %d\n",subframe,get_mi(frame_parms,subframe),frame_parms->tdd_config); printf("demapping: subframe %d, mi %d, tdd_config %d\n",subframe,get_mi(frame_parms,subframe),frame_parms->tdd_config);
#endif #endif
// process pdcch ofdm symbol 1 and 2 if necessary
for (int s=1; s<n_pdcch_symbols; s++){
if (is_secondary_ue == 1) {
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id+1], //add 1 to eNB_id to compensate for the shifted B/F'd pilots from the SeNB
pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s,
high_speed_flag,
frame_parms);
#ifdef MU_RECEIVER
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id_i - 1],//subtract 1 to eNB_id_i to compensate for the non-shifted pilots from the PeNB
pdcch_vars[eNB_id_i]->rxdataF_ext,//shift by two to simulate transmission from a second antenna
pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,//shift by two to simulate transmission from a second antenna
s,
high_speed_flag,
frame_parms);
#endif //MU_RECEIVER
} else if (frame_parms->nb_antenna_ports_eNB>1) {
pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s,
high_speed_flag,
frame_parms);
} else {
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s,
high_speed_flag,
frame_parms);
}
pdcch_channel_compensation(pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
pdcch_vars[eNB_id]->rxdataF_comp,
(aatx>1) ? pdcch_vars[eNB_id]->rho : NULL,
frame_parms,
s,
log2_maxh); // log2_maxh+I0_shift
#ifdef DEBUG_PHY
if (subframe==5)
write_output("rxF_comp_d.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
#endif
#ifdef MU_RECEIVER
if (is_secondary_ue) {
//get MF output for interfering stream
pdcch_channel_compensation(pdcch_vars[eNB_id_i]->rxdataF_ext,
pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,
pdcch_vars[eNB_id_i]->rxdataF_comp,
(aatx>1) ? pdcch_vars[eNB_id_i]->rho : NULL,
frame_parms,
s,
log2_maxh); // log2_maxh+I0_shift
#ifdef DEBUG_PHY
write_output("rxF_comp_i.m","rxF_c_i",&pdcch_vars[eNB_id_i]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
#endif
pdcch_dual_stream_correlation(frame_parms,
s,
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,
pdcch_vars[eNB_id]->dl_ch_rho_ext,
log2_maxh);
}
#endif //MU_RECEIVER
if (frame_parms->nb_antennas_rx > 1) {
#ifdef MU_RECEIVER
if (is_secondary_ue) {
pdcch_detection_mrc_i(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp,
pdcch_vars[eNB_id_i]->rxdataF_comp,
pdcch_vars[eNB_id]->rho,
pdcch_vars[eNB_id]->dl_ch_rho_ext,
s);
#ifdef DEBUG_PHY
write_output("rxF_comp_d.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
write_output("rxF_comp_i.m","rxF_c_i",&pdcch_vars[eNB_id_i]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
#endif
} else
#endif //MU_RECEIVER
pdcch_detection_mrc(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp,
s);
}
if (mimo_mode == SISO)
pdcch_siso(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,s);
else
pdcch_alamouti(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,s);
#ifdef MU_RECEIVER
if (is_secondary_ue) {
pdcch_qpsk_qpsk_llr(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp,
pdcch_vars[eNB_id_i]->rxdataF_comp,
pdcch_vars[eNB_id]->dl_ch_rho_ext,
pdcch_vars[eNB_id]->llr16, //subsequent function require 16 bit llr, but output must be 8 bit (actually clipped to 4, because of the Viterbi decoder)
pdcch_vars[eNB_id]->llr,
s);
/*
#ifdef DEBUG_PHY
if (subframe==5) {
write_output("llr8_seq.m","llr8",&pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4);
write_output("llr16_seq.m","llr16",&pdcch_vars[eNB_id]->llr16[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4);
}
#endif*/
} else {
#endif //MU_RECEIVER
pdcch_llr(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp,
(char *)pdcch_vars[eNB_id]->llr,
s);
/*#ifdef DEBUG_PHY
write_output("llr8_seq.m","llr8",&pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4);
#endif*/
#ifdef MU_RECEIVER
}
#endif //MU_RECEIVER
}
pdcch_demapping(pdcch_vars[eNB_id]->llr, pdcch_demapping(pdcch_vars[eNB_id]->llr,
pdcch_vars[eNB_id]->wbar, pdcch_vars[eNB_id]->wbar,
frame_parms, frame_parms,
...@@ -2961,58 +3103,23 @@ uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue, ...@@ -2961,58 +3103,23 @@ uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue,
uint8_t format0_found=0,format_c_found=0; uint8_t format0_found=0,format_c_found=0;
uint8_t tmode = ue->transmission_mode[eNB_id]; uint8_t tmode = ue->transmission_mode[eNB_id];
uint8_t frame_type = frame_parms->frame_type; uint8_t frame_type = frame_parms->frame_type;
uint8_t format1A_size_bits=0,format1A_size_bytes=0;
uint8_t format1C_size_bits=0,format1C_size_bytes=0;
uint8_t format0_size_bits=0,format0_size_bytes=0; uint8_t format0_size_bits=0,format0_size_bytes=0;
uint8_t format1_size_bits=0,format1_size_bytes=0; uint8_t format1_size_bits=0,format1_size_bytes=0;
uint8_t format2_size_bits=0,format2_size_bytes=0;
uint8_t format2A_size_bits=0,format2A_size_bytes=0;
dci_detect_mode_t mode = dci_detect_mode_select(&ue->frame_parms,subframe); dci_detect_mode_t mode = dci_detect_mode_select(&ue->frame_parms,subframe);
switch (frame_parms->N_RB_DL) { switch (frame_parms->N_RB_DL) {
case 6: case 6:
if (frame_type == TDD) { if (frame_type == TDD) {
format1A_size_bits = sizeof_DCI1A_1_5MHz_TDD_1_6_t;
format1A_size_bytes = sizeof(DCI1A_1_5MHz_TDD_1_6_t);
format1C_size_bits = sizeof_DCI1C_1_5MHz_t;
format1C_size_bytes = sizeof(DCI1C_1_5MHz_t);
format0_size_bits = sizeof_DCI0_1_5MHz_TDD_1_6_t; format0_size_bits = sizeof_DCI0_1_5MHz_TDD_1_6_t;
format0_size_bytes = sizeof(DCI0_1_5MHz_TDD_1_6_t); format0_size_bytes = sizeof(DCI0_1_5MHz_TDD_1_6_t);
format1_size_bits = sizeof_DCI1_1_5MHz_TDD_t; format1_size_bits = sizeof_DCI1_1_5MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_1_5MHz_TDD_t); format1_size_bytes = sizeof(DCI1_1_5MHz_TDD_t);
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_1_5MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_2A_TDD_t);
format2A_size_bits = sizeof_DCI2A_1_5MHz_2A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_1_5MHz_2A_TDD_t);
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_1_5MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_4A_TDD_t);
format2A_size_bits = sizeof_DCI2A_1_5MHz_4A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_1_5MHz_4A_TDD_t);
}
} else { } else {
format1A_size_bits = sizeof_DCI1A_1_5MHz_FDD_t;
format1A_size_bytes = sizeof(DCI1A_1_5MHz_FDD_t);
format1C_size_bits = sizeof_DCI1C_1_5MHz_t;
format1C_size_bytes = sizeof(DCI1C_1_5MHz_t);
format0_size_bits = sizeof_DCI0_1_5MHz_FDD_t; format0_size_bits = sizeof_DCI0_1_5MHz_FDD_t;
format0_size_bytes = sizeof(DCI0_1_5MHz_FDD_t); format0_size_bytes = sizeof(DCI0_1_5MHz_FDD_t);
format1_size_bits = sizeof_DCI1_1_5MHz_FDD_t; format1_size_bits = sizeof_DCI1_1_5MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_1_5MHz_FDD_t); format1_size_bytes = sizeof(DCI1_1_5MHz_FDD_t);
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_1_5MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_2A_FDD_t);
format2A_size_bits = sizeof_DCI2A_1_5MHz_2A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_1_5MHz_2A_FDD_t);
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_1_5MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_4A_FDD_t);
format2A_size_bits = sizeof_DCI2A_1_5MHz_4A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_1_5MHz_4A_FDD_t);
}
} }
break; break;
...@@ -3020,141 +3127,46 @@ uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3020,141 +3127,46 @@ uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue,
case 25: case 25:
default: default:
if (frame_type == TDD) { if (frame_type == TDD) {
format1A_size_bits = sizeof_DCI1A_5MHz_TDD_1_6_t;
format1A_size_bytes = sizeof(DCI1A_5MHz_TDD_1_6_t);
format1C_size_bits = sizeof_DCI1C_5MHz_t;
format1C_size_bytes = sizeof(DCI1C_5MHz_t);
format0_size_bits = sizeof_DCI0_5MHz_TDD_1_6_t; format0_size_bits = sizeof_DCI0_5MHz_TDD_1_6_t;
format0_size_bytes = sizeof(DCI0_5MHz_TDD_1_6_t); format0_size_bytes = sizeof(DCI0_5MHz_TDD_1_6_t);
format1_size_bits = sizeof_DCI1_5MHz_TDD_t; format1_size_bits = sizeof_DCI1_5MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_5MHz_TDD_t); format1_size_bytes = sizeof(DCI1_5MHz_TDD_t);
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_5MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_2A_TDD_t);
format2A_size_bits = sizeof_DCI2A_5MHz_2A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_5MHz_2A_TDD_t);
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_5MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_4A_TDD_t);
format2A_size_bits = sizeof_DCI2A_5MHz_4A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_5MHz_4A_TDD_t);
}
} else { } else {
format1A_size_bits = sizeof_DCI1A_5MHz_FDD_t;
format1A_size_bytes = sizeof(DCI1A_5MHz_FDD_t);
format1C_size_bits = sizeof_DCI1C_5MHz_t;
format1C_size_bytes = sizeof(DCI1C_5MHz_t);
format0_size_bits = sizeof_DCI0_5MHz_FDD_t; format0_size_bits = sizeof_DCI0_5MHz_FDD_t;
format0_size_bytes = sizeof(DCI0_5MHz_FDD_t); format0_size_bytes = sizeof(DCI0_5MHz_FDD_t);
format1_size_bits = sizeof_DCI1_5MHz_FDD_t; format1_size_bits = sizeof_DCI1_5MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_5MHz_FDD_t); format1_size_bytes = sizeof(DCI1_5MHz_FDD_t);
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_5MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_2A_FDD_t);
format2A_size_bits = sizeof_DCI2A_5MHz_2A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_5MHz_2A_FDD_t);
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_5MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_4A_FDD_t);
format2A_size_bits = sizeof_DCI2A_5MHz_4A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_5MHz_4A_FDD_t);
}
} }
break; break;
case 50: case 50:
if (frame_type == TDD) { if (frame_type == TDD) {
format1A_size_bits = sizeof_DCI1A_10MHz_TDD_1_6_t;
format1A_size_bytes = sizeof(DCI1A_10MHz_TDD_1_6_t);
format1C_size_bits = sizeof_DCI1C_10MHz_t;
format1C_size_bytes = sizeof(DCI1C_10MHz_t);
format0_size_bits = sizeof_DCI0_10MHz_TDD_1_6_t; format0_size_bits = sizeof_DCI0_10MHz_TDD_1_6_t;
format0_size_bytes = sizeof(DCI0_10MHz_TDD_1_6_t); format0_size_bytes = sizeof(DCI0_10MHz_TDD_1_6_t);
format1_size_bits = sizeof_DCI1_10MHz_TDD_t; format1_size_bits = sizeof_DCI1_10MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_10MHz_TDD_t); format1_size_bytes = sizeof(DCI1_10MHz_TDD_t);
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_10MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_2A_TDD_t);
format2A_size_bits = sizeof_DCI2A_10MHz_2A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_10MHz_2A_TDD_t);
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_10MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_4A_TDD_t);
format2A_size_bits = sizeof_DCI2A_10MHz_4A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_10MHz_4A_TDD_t);
}
} else { } else {
format1A_size_bits = sizeof_DCI1A_10MHz_FDD_t;
format1A_size_bytes = sizeof(DCI1A_10MHz_FDD_t);
format1C_size_bits = sizeof_DCI1C_10MHz_t;
format1C_size_bytes = sizeof(DCI1C_10MHz_t);
format0_size_bits = sizeof_DCI0_10MHz_FDD_t; format0_size_bits = sizeof_DCI0_10MHz_FDD_t;
format0_size_bytes = sizeof(DCI0_10MHz_FDD_t); format0_size_bytes = sizeof(DCI0_10MHz_FDD_t);
format1_size_bits = sizeof_DCI1_10MHz_FDD_t; format1_size_bits = sizeof_DCI1_10MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_10MHz_FDD_t); format1_size_bytes = sizeof(DCI1_10MHz_FDD_t);
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_10MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_2A_FDD_t);
format2A_size_bits = sizeof_DCI2A_10MHz_2A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_10MHz_2A_FDD_t);
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_10MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_4A_FDD_t);
format2A_size_bits = sizeof_DCI2A_10MHz_4A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_10MHz_4A_FDD_t);
}
} }
break; break;
case 100: case 100:
if (frame_type == TDD) { if (frame_type == TDD) {
format1A_size_bits = sizeof_DCI1A_20MHz_TDD_1_6_t;
format1A_size_bytes = sizeof(DCI1A_20MHz_TDD_1_6_t);
format1C_size_bits = sizeof_DCI1C_20MHz_t;
format1C_size_bytes = sizeof(DCI1C_20MHz_t);
format0_size_bits = sizeof_DCI0_20MHz_TDD_1_6_t; format0_size_bits = sizeof_DCI0_20MHz_TDD_1_6_t;
format0_size_bytes = sizeof(DCI0_20MHz_TDD_1_6_t); format0_size_bytes = sizeof(DCI0_20MHz_TDD_1_6_t);
format1_size_bits = sizeof_DCI1_20MHz_TDD_t; format1_size_bits = sizeof_DCI1_20MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_20MHz_TDD_t); format1_size_bytes = sizeof(DCI1_20MHz_TDD_t);
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_20MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_2A_TDD_t);
format2A_size_bits = sizeof_DCI2A_20MHz_2A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_20MHz_2A_TDD_t);
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_20MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_4A_TDD_t);
format2A_size_bits = sizeof_DCI2A_20MHz_4A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_20MHz_4A_TDD_t);
}
} else { } else {
format1A_size_bits = sizeof_DCI1A_20MHz_FDD_t;
format1A_size_bytes = sizeof(DCI1A_20MHz_FDD_t);
format1C_size_bits = sizeof_DCI1C_20MHz_t;
format1C_size_bytes = sizeof(DCI1C_20MHz_t);
format0_size_bits = sizeof_DCI0_20MHz_FDD_t; format0_size_bits = sizeof_DCI0_20MHz_FDD_t;
format0_size_bytes = sizeof(DCI0_20MHz_FDD_t); format0_size_bytes = sizeof(DCI0_20MHz_FDD_t);
format1_size_bits = sizeof_DCI1_20MHz_FDD_t; format1_size_bits = sizeof_DCI1_20MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_20MHz_FDD_t); format1_size_bytes = sizeof(DCI1_20MHz_FDD_t);
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_20MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_2A_FDD_t);
format2A_size_bits = sizeof_DCI2A_20MHz_2A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_20MHz_2A_FDD_t);
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_20MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_4A_FDD_t);
format2A_size_bits = sizeof_DCI2A_20MHz_4A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_20MHz_4A_FDD_t);
}
} }
break; break;
......
...@@ -1521,6 +1521,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue, ...@@ -1521,6 +1521,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
int16_t eNB_id, int16_t eNB_id,
uint8_t subframe); uint8_t subframe);
uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue,
DCI_ALLOC_t *dci_alloc,
uint8_t DCIFormat,
uint8_t agregationLevel,
int16_t eNB_id,
uint8_t subframe);
uint16_t dci_decoding_procedure_emul(LTE_UE_PDCCH **lte_ue_pdcch_vars, uint16_t dci_decoding_procedure_emul(LTE_UE_PDCCH **lte_ue_pdcch_vars,
uint8_t num_ue_spec_dci, uint8_t num_ue_spec_dci,
......
...@@ -3080,11 +3080,9 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -3080,11 +3080,9 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
ue->high_speed_flag, ue->high_speed_flag,
ue->is_secondary_ue); ue->is_secondary_ue);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_OUT);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_IN);
start_meas(&ue->dlsch_decoding_stats[subframe_rx]);
//printf("Decode SIB frame param agregation + DCI %d %d \n",agregationLevel,dciFormat); //printf("Decode SIB frame param agregation + DCI %d %d \n",agregationLevel,dciFormat);
...@@ -3110,10 +3108,6 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -3110,10 +3108,6 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
subframe_rx); subframe_rx);
} }
stop_meas(&ue->dlsch_decoding_stats[subframe_rx]);
printf("subframe_rx %d dci_decoding procedure %5.3f\n",
subframe_rx,
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_OUT);
//LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d PHICH RX\n",ue->Mod_id,frame_rx,subframe_rx); //LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d PHICH RX\n",ue->Mod_id,frame_rx,subframe_rx);
...@@ -4307,10 +4301,15 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, ...@@ -4307,10 +4301,15 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
((pmch_flag==1)&(l==l2))) { ((pmch_flag==1)&(l==l2))) {
LOG_D(PHY,"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id); LOG_D(PHY,"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id);
//start_meas(&ue->rx_pdcch_stats[subframe_rx%RX_NB_TH]);
if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) { if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx); LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
return(-1); return(-1);
} }
//stop_meas(&ue->rx_pdcch_stats[subframe_rx%RX_NB_TH]);
//printf("subframe %d n_pdcch_sym %d pdcch procedures %5.3f \n",
// subframe_rx, ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols,
// (ue->rx_pdcch_stats[subframe_rx%RX_NB_TH].p_time)/(cpuf*1000.0));
LOG_D(PHY,"num_pdcch_symbols %d\n",ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols); LOG_D(PHY,"num_pdcch_symbols %d\n",ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols);
} }
} }
......
...@@ -332,6 +332,8 @@ void help (void) { ...@@ -332,6 +332,8 @@ void help (void) {
printf(" --external-clock tells hardware to use an external clock reference\n"); printf(" --external-clock tells hardware to use an external clock reference\n");
printf(" --usim-test use XOR autentication algo in case of test usim mode\n"); printf(" --usim-test use XOR autentication algo in case of test usim mode\n");
printf(" --single-thread-disable. Disables single-thread mode in lte-softmodem\n"); printf(" --single-thread-disable. Disables single-thread mode in lte-softmodem\n");
printf(" --AgregationLevel Choose the agregation level used by tghe eNB for the OAI use 1, it will save some time of processing the pdcch\n");
printf(" --DCIformat choose the DCI format (for the moment only valid for SISO DCI format 1\n");
printf(" -A Set timing_advance\n"); printf(" -A Set timing_advance\n");
printf(" -C Set the downlink frequency for all component carriers\n"); printf(" -C Set the downlink frequency for all component carriers\n");
printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n"); printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n");
......
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