Commit 212dff25 authored by Gabriel's avatar Gabriel

Merge remote-tracking branch 'origin/mimo_feature_ue_br' into develop_integration_w10

parents 5c375d3a 305ebf5c
...@@ -1034,6 +1034,7 @@ set(PHY_SRC ...@@ -1034,6 +1034,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c
......
...@@ -948,6 +948,11 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, ...@@ -948,6 +948,11 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
// fill cqi parameters for periodic CQI reporting // fill cqi parameters for periodic CQI reporting
get_cqipmiri_params(phy_vars_ue,eNB_id); get_cqipmiri_params(phy_vars_ue,eNB_id);
// disable MIB SIB decoding once we are on connected mode
LOG_I(PHY,"Disabling SIB MIB decoding \n");
phy_vars_ue->decode_SIB = 0;
phy_vars_ue->decode_MIB = 0;
} }
void phy_config_cba_rnti (module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups) void phy_config_cba_rnti (module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups)
...@@ -1306,6 +1311,10 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, ...@@ -1306,6 +1311,10 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
ue->high_speed_flag = 1; ue->high_speed_flag = 1;
ue->ch_est_alpha = 24576; ue->ch_est_alpha = 24576;
// enable MIB/SIB decoding by default
ue->decode_MIB = 1;
ue->decode_SIB = 1;
init_prach_tables(839); init_prach_tables(839);
......
...@@ -51,10 +51,10 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -51,10 +51,10 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
int uespec_pilot[300]; int uespec_pilot[300];
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms;
LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[eNB_id]; LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[(Ns>>1)&0x1][eNB_id];
LTE_DL_UE_HARQ_t *dlsch0_harq; LTE_DL_UE_HARQ_t *dlsch0_harq;
harq_pid = dlsch_ue[0]->current_harq_pid; harq_pid = dlsch_ue[0]->current_harq_pid;
dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) || if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) ||
......
This diff is collapsed.
This diff is collapsed.
...@@ -708,7 +708,7 @@ typedef struct { ...@@ -708,7 +708,7 @@ typedef struct {
int16_t sqrt_rho_a; int16_t sqrt_rho_a;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots /// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t sqrt_rho_b; int16_t sqrt_rho_b;
/// Current HARQ process id /// Current HARQ process id threadRx Odd and threadRx Even
uint8_t current_harq_pid; uint8_t current_harq_pid;
/// Current subband antenna selection /// Current subband antenna selection
uint32_t antenna_alloc; uint32_t antenna_alloc;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/defs.h"
//#define DEBUG_DLSCH_DECODING //#define DEBUG_DLSCH_DECODING
extern double cpuf;
void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
{ {
...@@ -270,7 +271,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -270,7 +271,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return(max_turbo_iterations); return(max_turbo_iterations);
}*/ }*/
/*harq_pid = dlsch->current_harq_pid; /*harq_pid = dlsch->current_harq_pid[subframe&0x1];
if (harq_pid >= 8) { if (harq_pid >= 8) {
printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid); printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid);
return(max_turbo_iterations); return(max_turbo_iterations);
...@@ -341,6 +342,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -341,6 +342,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
printf("Segmentation: C %d, Cminus %d, Kminus %d, Kplus %d\n",harq_process->C,harq_process->Cminus,harq_process->Kminus,harq_process->Kplus); printf("Segmentation: C %d, Cminus %d, Kminus %d, Kplus %d\n",harq_process->C,harq_process->Cminus,harq_process->Kminus,harq_process->Kplus);
#endif #endif
opp_enabled=1;
for (r=0; r<harq_process->C; r++) { for (r=0; r<harq_process->C; r++) {
...@@ -376,7 +379,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -376,7 +379,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
(r==0) ? harq_process->F : 0); (r==0) ? harq_process->F : 0);
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
LOG_I(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n", LOG_D(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n",
harq_pid,r, G, harq_pid,r, G,
Kr*3, Kr*3,
harq_process->TBS, harq_process->TBS,
...@@ -459,6 +462,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -459,6 +462,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#if 1 #if 1
if (err_flag == 0) { if (err_flag == 0) {
LOG_D(PHY, "turbo algo Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d maxIter %d\n",
Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,
harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round,dlsch->max_turbo_iterations);
if (llr8_flag) { if (llr8_flag) {
AssertFatal (Kr >= 256, "turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d\n", AssertFatal (Kr >= 256, "turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d\n",
Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round); Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round);
...@@ -605,6 +612,13 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -605,6 +612,13 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
/*printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n",
harq_process->C,
r,
dlsch_rate_unmatching_stats->p_time/(cpuf*1000.0),
dlsch_deinterleaving_stats->p_time/(cpuf*1000.0),
dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0));*/
} }
} }
} }
...@@ -636,25 +650,28 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -636,25 +650,28 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process->round++; harq_process->round++;
if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS);
}
// printf("Rate: [UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round); // printf("Rate: [UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
if (harq_process->round >= dlsch->Mdlharq) { if (harq_process->round >= dlsch->Mdlharq) {
harq_process->status = SCH_IDLE; harq_process->status = SCH_IDLE;
harq_process->round = 0;
}
if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, pid status %d, round %d/Max %d, TBS %d)\n",
phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->status,harq_process->round,dlsch->Mdlharq,harq_process->TBS);
} }
return((1+dlsch->max_turbo_iterations)); return((1+dlsch->max_turbo_iterations));
} else { } else {
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, round %d, subframe %d)\n",
phy_vars_ue->Mod_id, frame_rx_prev, subframe_rx_prev, harq_pid, harq_process->round, subframe);
harq_process->status = SCH_IDLE; harq_process->status = SCH_IDLE;
harq_process->round = 0; harq_process->round = 0;
dlsch->harq_ack[subframe].ack = 1; dlsch->harq_ack[subframe].ack = 1;
dlsch->harq_ack[subframe].harq_id = harq_pid; dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1; dlsch->harq_ack[subframe].send_harq_status = 1;
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, pid status %d, round %d, subframe %d)\n",
phy_vars_ue->Mod_id, frame_rx_prev, subframe_rx_prev, harq_pid, harq_process->status, harq_process->round, subframe);
if(is_crnti) if(is_crnti)
{ {
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS); LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS);
...@@ -908,7 +925,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -908,7 +925,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case PDSCH: // TB0 case PDSCH: // TB0
dlsch_ue = phy_vars_ue->dlsch[eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]); ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]);
DevAssert( ue_id != (uint32_t)-1 ); DevAssert( ue_id != (uint32_t)-1 );
...@@ -954,7 +971,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -954,7 +971,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case PDSCH1: { // TB1 case PDSCH1: { // TB1
dlsch_ue = phy_vars_ue->dlsch[eNB_id][1]; dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] ); int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] );
DevAssert( UE_id != -1 ); DevAssert( UE_id != -1 );
...@@ -1008,7 +1025,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -1008,7 +1025,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
default: default:
dlsch_ue = phy_vars_ue->dlsch[eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0];
LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id); LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id);
dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations; dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations;
return(1+dlsch_ue->max_turbo_iterations); return(1+dlsch_ue->max_turbo_iterations);
......
...@@ -8831,6 +8831,37 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -8831,6 +8831,37 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
len = (nb_rb*12) - pbch_pss_sss_adjust; len = (nb_rb*12) - pbch_pss_sss_adjust;
} }
#ifdef __AVX2__
// Round length up to multiple of 16 words
uint32_t len256i = ((len+16)>>4)*16;
int32_t *rxF_256i = (int32_t*) malloc16_clear(len256i*4);
int32_t *rxF_i_256i = (int32_t*) malloc16_clear(len256i*4);
int32_t *ch_mag_256i = (int32_t*) malloc16_clear(len256i*4);
int32_t *ch_mag_i_256i = (int32_t*) malloc16_clear(len256i*4);
int32_t *rho_256i = (int32_t*) malloc16_clear(len256i*4);
memcpy(rxF_256i, rxF, len*4);
memcpy(rxF_i_256i, rxF_i, len*4);
memcpy(ch_mag_256i, ch_mag, len*4);
memcpy(ch_mag_i_256i, ch_mag_i, len*4);
memcpy(rho_256i, rho, len*4);
qam64_qam64_avx2((int32_t *)rxF_256i,
(int32_t *)rxF_i_256i,
(int32_t *)ch_mag_256i,
(int32_t *)ch_mag_i_256i,
(int16_t *)llr16,
(int32_t *) rho_256i,
len);
free16(rxF_256i, sizeof(rxF_256i));
free16(rxF_i_256i, sizeof(rxF_i_256i));
free16(ch_mag_256i, sizeof(ch_mag_256i));
free16(ch_mag_i_256i, sizeof(ch_mag_i_256i));
free16(rho_256i, sizeof(rho_256i));
#else
qam64_qam64((short *)rxF, qam64_qam64((short *)rxF,
(short *)rxF_i, (short *)rxF_i,
(short *)ch_mag, (short *)ch_mag,
...@@ -8838,6 +8869,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -8838,6 +8869,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
(short *)llr16, (short *)llr16,
(short *)rho, (short *)rho,
len); len);
#endif
llr16 += (6*len); llr16 += (6*len);
*llr16p = (short *)llr16; *llr16p = (short *)llr16;
......
This diff is collapsed.
...@@ -107,9 +107,9 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length ...@@ -107,9 +107,9 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length
len += sprintf(&buffer[len], "[UE PROC] Po_PUCCH = %d dBm (Po_NOMINAL_PUCCH %d dBm, g_pucch %d dB)\n", len += sprintf(&buffer[len], "[UE PROC] Po_PUCCH = %d dBm (Po_NOMINAL_PUCCH %d dBm, g_pucch %d dB)\n",
get_PL(ue->Mod_id,ue->CC_id,0)+ get_PL(ue->Mod_id,ue->CC_id,0)+
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+ ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
ue->dlsch[0][0]->g_pucch, ue->dlsch[0][0][0]->g_pucch,
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH, ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
ue->dlsch[0][0]->g_pucch); ue->dlsch[0][0][0]->g_pucch);
} }
//for (eNB=0;eNB<NUMBER_OF_eNB_MAX;eNB++) { //for (eNB=0;eNB<NUMBER_OF_eNB_MAX;eNB++) {
for (eNB=0; eNB<1; eNB++) { for (eNB=0; eNB<1; eNB++) {
...@@ -482,24 +482,24 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length ...@@ -482,24 +482,24 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length
len += sprintf(&buffer[len], "[UE PROC] Mode 6 Wideband CQI eNB %d : %d dB\n",eNB,ue->measurements.precoded_cqi_dB[eNB][0]); len += sprintf(&buffer[len], "[UE PROC] Mode 6 Wideband CQI eNB %d : %d dB\n",eNB,ue->measurements.precoded_cqi_dB[eNB][0]);
for (harq_pid=0;harq_pid<8;harq_pid++) { for (harq_pid=0;harq_pid<8;harq_pid++) {
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0]->harq_processes[harq_pid]->mcs); len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][0]->harq_processes[harq_pid]->mcs);
for (round=0;round<8;round++) for (round=0;round<8;round++)
len+=sprintf(&buffer[len],"%d/%d ", len+=sprintf(&buffer[len],"%d/%d ",
ue->dlsch[0][0]->harq_processes[harq_pid]->errors[round], ue->dlsch[0][0][0]->harq_processes[harq_pid]->errors[round],
ue->dlsch[0][0]->harq_processes[harq_pid]->trials[round]); ue->dlsch[0][0][0]->harq_processes[harq_pid]->trials[round]);
len+=sprintf(&buffer[len],"\n"); len+=sprintf(&buffer[len],"\n");
} }
if (ue->dlsch[0] && ue->dlsch[0][0] && ue->dlsch[0][1]) { if (ue->dlsch[0][0] && ue->dlsch[0][0][0] && ue->dlsch[0][0][1]) {
len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0]->pmi_alloc),ue->dlsch[0][0]); len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0][0]->pmi_alloc),ue->dlsch[0][0][0]);
len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0]->harq_processes[0]->dl_power_off); len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0][0]->harq_processes[0]->dl_power_off);
for (harq_pid=0;harq_pid<8;harq_pid++) { for (harq_pid=0;harq_pid<8;harq_pid++) {
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][1]->harq_processes[0]->mcs); len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][1]->harq_processes[0]->mcs);
for (round=0;round<8;round++) for (round=0;round<8;round++)
len+=sprintf(&buffer[len],"%d/%d ", len+=sprintf(&buffer[len],"%d/%d ",
ue->dlsch[0][1]->harq_processes[harq_pid]->errors[round], ue->dlsch[0][0][1]->harq_processes[harq_pid]->errors[round],
ue->dlsch[0][1]->harq_processes[harq_pid]->trials[round]); ue->dlsch[0][0][1]->harq_processes[harq_pid]->trials[round]);
len+=sprintf(&buffer[len],"\n"); len+=sprintf(&buffer[len],"\n");
} }
} }
......
...@@ -704,6 +704,22 @@ void qam64_qam16(short *stream0_in, ...@@ -704,6 +704,22 @@ void qam64_qam16(short *stream0_in,
short *rho01, short *rho01,
int length); int length);
/** \brief This function computes the LLRs for ML (max-logsum approximation) dual-stream 64QAM/16QAM reception.
@param stream0_in Input from channel compensated (MR combined) stream 0
@param stream1_in Input from channel compensated (MR combined) stream 1
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param stream0_out Output from LLR unit for stream0
@param rho01 Cross-correlation between channels (MR combined)
@param length in complex channel outputs*/
void qam64_qam16_avx2(short *stream0_in,
short *stream1_in,
short *ch_mag,
short *ch_mag_i,
short *stream0_out,
short *rho01,
int length);
/** \brief This function perform LLR computation for dual-stream (64QAM/16QAM) transmission. /** \brief This function perform LLR computation for dual-stream (64QAM/16QAM) transmission.
@param frame_parms Frame descriptor structure @param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output @param rxdataF_comp Compensated channel output
...@@ -746,6 +762,22 @@ void qam64_qam64(short *stream0_in, ...@@ -746,6 +762,22 @@ void qam64_qam64(short *stream0_in,
short *rho01, short *rho01,
int length); int length);
/** \brief This function computes the LLRs for ML (max-logsum approximation) dual-stream 64QAM/64QAM reception.
@param stream0_in Input from channel compensated (MR combined) stream 0
@param stream1_in Input from channel compensated (MR combined) stream 1
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param stream0_out Output from LLR unit for stream0
@param rho01 Cross-correlation between channels (MR combined)
@param length in complex channel outputs*/
void qam64_qam64_avx2(int32_t *stream0_in,
int32_t *stream1_in,
int32_t *ch_mag,
int32_t *ch_mag_i,
int16_t *stream0_out,
int32_t *rho01,
int length);
/** \brief This function perform LLR computation for dual-stream (64QAM/64QAM) transmission. /** \brief This function perform LLR computation for dual-stream (64QAM/64QAM) transmission.
@param frame_parms Frame descriptor structure @param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output @param rxdataF_comp Compensated channel output
......
...@@ -233,7 +233,7 @@ uint32_t ulsch_encoding(uint8_t *a, ...@@ -233,7 +233,7 @@ uint32_t ulsch_encoding(uint8_t *a,
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
PHY_MEASUREMENTS *meas = &ue->measurements; PHY_MEASUREMENTS *meas = &ue->measurements;
LTE_UE_ULSCH_t *ulsch=ue->ulsch[eNB_id]; LTE_UE_ULSCH_t *ulsch=ue->ulsch[eNB_id];
LTE_UE_DLSCH_t **dlsch = ue->dlsch[eNB_id]; LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id];
uint16_t rnti = 0xffff; uint16_t rnti = 0xffff;
if (!ulsch) { if (!ulsch) {
...@@ -966,7 +966,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer, ...@@ -966,7 +966,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
{ {
LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id]; LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
LTE_UE_DLSCH_t **dlsch = ue->dlsch[eNB_id]; LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id];
PHY_MEASUREMENTS *meas = &ue->measurements; PHY_MEASUREMENTS *meas = &ue->measurements;
uint8_t tmode = ue->transmission_mode[eNB_id]; uint8_t tmode = ue->transmission_mode[eNB_id];
uint16_t rnti=ue->pdcch_vars[eNB_id]->crnti; uint16_t rnti=ue->pdcch_vars[eNB_id]->crnti;
......
...@@ -2066,7 +2066,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, ...@@ -2066,7 +2066,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc,
// get local ue's ack // get local ue's ack
if ((UE_index >= oai_emulation.info.first_ue_local) ||(UE_index <(oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local))) { if ((UE_index >= oai_emulation.info.first_ue_local) ||(UE_index <(oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local))) {
get_ack(&eNB->frame_parms, get_ack(&eNB->frame_parms,
PHY_vars_UE_g[UE_id][CC_id]->dlsch[0][0]->harq_ack, PHY_vars_UE_g[UE_id][CC_id]->dlsch[0][0][0]->harq_ack,
subframe, subframe,
eNB->ulsch[UE_index]->harq_processes[harq_pid]->o_ACK,0); eNB->ulsch[UE_index]->harq_processes[harq_pid]->o_ACK,0);
} else { // get remote UEs' ack } else { // get remote UEs' ack
......
...@@ -7,6 +7,7 @@ PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_coding.o ...@@ -7,6 +7,7 @@ PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_coding.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_modulation.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_modulation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_demodulation.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_demodulation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_llr_computation.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_llr_computation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/power_control.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/power_control.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_decoding.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_decoding.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_scrambling.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_scrambling.o
......
...@@ -510,16 +510,16 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -510,16 +510,16 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) { if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[eNB_id][0]->current_harq_pid; harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid;
if (harq_pid>=8) if (harq_pid>=8)
return; return;
mcs = phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->mcs; mcs = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs;
// Button 0 // Button 0
if(!phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) { if(!phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
// we are in TM5 // we are in TM5
fl_show_object(form->button_0); fl_show_object(form->button_0);
} }
...@@ -530,12 +530,12 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -530,12 +530,12 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
} }
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); // coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) { if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) {
coded_bits_per_codeword = get_G(frame_parms, coded_bits_per_codeword = get_G(frame_parms,
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->nb_rb, phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs), get_Qm(mcs),
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->Nl, phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols, num_pdcch_symbols,
frame, frame,
subframe, subframe,
......
...@@ -448,11 +448,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -448,11 +448,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int mcs1=0; int mcs1=0;
unsigned char harq_pid = 0; unsigned char harq_pid = 0;
int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) { if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[eNB_id][0]->current_harq_pid; harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid;
if (harq_pid>=8) if (harq_pid>=8)
return; return;
mcs0 = phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->mcs; mcs0 = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs;
// Button 0 // Button 0
/* /*
if(!phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) { if(!phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
...@@ -461,23 +461,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -461,23 +461,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
} }
*/ */
} }
if (phy_vars_ue->dlsch[eNB_id][1]!=NULL) { if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]!=NULL) {
harq_pid = phy_vars_ue->dlsch[eNB_id][1]->current_harq_pid; harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->current_harq_pid;
if (harq_pid>=8) if (harq_pid>=8)
return; return;
mcs1 = phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->mcs; mcs1 = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->mcs;
} }
if (phy_vars_ue->pdcch_vars[eNB_id]!=NULL) { if (phy_vars_ue->pdcch_vars[eNB_id]!=NULL) {
num_pdcch_symbols = phy_vars_ue->pdcch_vars[eNB_id]->num_pdcch_symbols; num_pdcch_symbols = phy_vars_ue->pdcch_vars[eNB_id]->num_pdcch_symbols;
} }
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); // coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) { if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) {
mod0 = get_Qm(mcs0); mod0 = get_Qm(mcs0);
coded_bits_per_codeword0 = get_G(frame_parms, coded_bits_per_codeword0 = get_G(frame_parms,
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->nb_rb, phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs0), get_Qm(mcs0),
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->Nl, phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols, num_pdcch_symbols,
frame, frame,
subframe, subframe,
...@@ -486,13 +486,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -486,13 +486,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
coded_bits_per_codeword0 = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); coded_bits_per_codeword0 = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
mod0=0; mod0=0;
} }
if (phy_vars_ue->dlsch[eNB_id][1]!=NULL) { if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]!=NULL) {
mod1 = get_Qm(mcs1); mod1 = get_Qm(mcs1);
coded_bits_per_codeword1 = get_G(frame_parms, coded_bits_per_codeword1 = get_G(frame_parms,
phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->nb_rb, phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even, phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs1), get_Qm(mcs1),
phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->Nl, phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols, num_pdcch_symbols,
frame, frame,
subframe, subframe,
......
...@@ -706,7 +706,7 @@ typedef struct { ...@@ -706,7 +706,7 @@ typedef struct {
LTE_DL_FRAME_PARMS frame_parms_before_ho; LTE_DL_FRAME_PARMS frame_parms_before_ho;
LTE_UE_COMMON common_vars; LTE_UE_COMMON common_vars;
LTE_UE_PDSCH *pdsch_vars[2][NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH *pdsch_vars[2][NUMBER_OF_CONNECTED_eNB_MAX+1]; // two RxTx Threads
LTE_UE_PDSCH_FLP *pdsch_vars_flp[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH_FLP *pdsch_vars_flp[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_SI[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH *pdsch_vars_SI[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_ra[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH *pdsch_vars_ra[NUMBER_OF_CONNECTED_eNB_MAX+1];
...@@ -715,7 +715,7 @@ typedef struct { ...@@ -715,7 +715,7 @@ typedef struct {
LTE_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PDCCH *pdcch_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PDCCH *pdcch_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch[NUMBER_OF_CONNECTED_eNB_MAX][2]; LTE_UE_DLSCH_t *dlsch[2][NUMBER_OF_CONNECTED_eNB_MAX][2]; // two RxTx Threads
LTE_UE_ULSCH_t *ulsch[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_ULSCH_t *ulsch[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch_SI[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_DLSCH_t *dlsch_SI[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch_ra[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_DLSCH_t *dlsch_ra[NUMBER_OF_CONNECTED_eNB_MAX];
...@@ -802,6 +802,8 @@ typedef struct { ...@@ -802,6 +802,8 @@ typedef struct {
uint8_t prach_cnt; uint8_t prach_cnt;
uint8_t prach_PreambleIndex; uint8_t prach_PreambleIndex;
// uint8_t prach_timer; // uint8_t prach_timer;
uint8_t decode_SIB;