Commit d54ea501 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge branch 'nr-mimo-mode-clean' into 'develop-nr'

removing old mimo mode

See merge request oai/openairinterface5g!587
parents 7e99e1f6 7d29023c
...@@ -119,7 +119,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -119,7 +119,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
NR_DL_UE_HARQ_t *dlsch0_harq,*dlsch1_harq = 0; NR_DL_UE_HARQ_t *dlsch0_harq,*dlsch1_harq = 0;
uint8_t beamforming_mode; uint8_t beamforming_mode;
uint32_t *rballoc;
int32_t **rxdataF_comp_ptr; int32_t **rxdataF_comp_ptr;
int32_t **dl_ch_mag_ptr; int32_t **dl_ch_mag_ptr;
...@@ -250,25 +249,14 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -250,25 +249,14 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
return(-1); return(-1);
} }
if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) || if (dlsch0_harq->mimo_mode>NR_DUALSTREAM) {
((frame_parms->Ncp == EXTENDED) && (symbol>=6)))
rballoc = dlsch0_harq->rb_alloc_odd;
else
rballoc = dlsch0_harq->rb_alloc_even;
if (dlsch0_harq->mimo_mode>DUALSTREAM_PUSCH_PRECODING) {
LOG_E(PHY,"This transmission mode is not yet supported!\n"); LOG_E(PHY,"This transmission mode is not yet supported!\n");
return(-1); return(-1);
} }
if ((dlsch0_harq->mimo_mode==LARGE_CDD) || ((dlsch0_harq->mimo_mode>=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode<=DUALSTREAM_PUSCH_PRECODING))) { if (dlsch0_harq->mimo_mode==NR_DUALSTREAM) {
DevAssert(dlsch1_harq); DevAssert(dlsch1_harq);
if (eNB_id!=eNB_id_i) {
LOG_E(PHY,"TM3/TM4 requires to set eNB_id==eNB_id_i!\n");
return(-1);
}
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
...@@ -361,46 +349,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -361,46 +349,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
ue->high_speed_flag, ue->high_speed_flag,
frame_parms); frame_parms);
} /*else if(beamforming_mode>7) {
/*
if (rx_type==rx_IC_single_stream) {
if (eNB_id_i<ue->n_connected_eNB)
nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id_i],
pdsch_vars[eNB_id_i]->rxdataF_ext,
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc,
pdsch_vars[eNB_id_i]->pmi_ext,
rballoc,
symbol,
nr_tti_rx,
ue->high_speed_flag,
frame_parms);
else
nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id],
pdsch_vars[eNB_id_i]->rxdataF_ext,
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc,
pdsch_vars[eNB_id_i]->pmi_ext,
rballoc,
symbol,
nr_tti_rx,
ue->high_speed_flag,
frame_parms);
}*/
} /*else if (beamforming_mode==7) { //else if beamforming_mode == 7
nb_rb = dlsch_extract_rbs_TM7(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
pdsch_vars[eNB_id]->dl_bf_ch_estimates,
pdsch_vars[eNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext,
rballoc,
symbol,
nr_tti_rx,
ue->high_speed_flag,
frame_parms);
} else if(beamforming_mode>7) {
LOG_W(PHY,"dlsch_demodulation: beamforming mode not supported yet.\n"); LOG_W(PHY,"dlsch_demodulation: beamforming mode not supported yet.\n");
}*/ }*/
...@@ -436,20 +385,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -436,20 +385,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pilots, pilots,
nb_rb); nb_rb);
if ((dlsch0_harq->mimo_mode<DUALSTREAM_UNIFORM_PRECODING1) &&
(rx_type==rx_IC_single_stream) &&
(eNB_id_i==ue->n_connected_eNB) &&
(dlsch0_harq->dl_power_off==0)
) // TM5 two-user
{
nr_dlsch_scale_channel(pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
frame_parms,
dlsch,
symbol,
pilots,
nb_rb);
}
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[nr_tti_rx]][slot]); stop_meas(&ue->generic_stat_bis[ue->current_thread_id[nr_tti_rx]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
...@@ -464,7 +399,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -464,7 +399,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#endif #endif
if (first_symbol_flag==1) { if (first_symbol_flag==1) {
if (beamforming_mode==0){ if (beamforming_mode==0){
if (dlsch0_harq->mimo_mode<LARGE_CDD) { if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) {
nr_dlsch_channel_level(pdsch_vars[eNB_id]->dl_ch_estimates_ext, nr_dlsch_channel_level(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms, frame_parms,
avg, avg,
...@@ -478,9 +413,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -478,9 +413,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2)+1; pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2)+1;
} }
else if ((dlsch0_harq->mimo_mode == LARGE_CDD) || else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM)
((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) &&
(dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING)))
{ {
nr_dlsch_channel_level_median(pdsch_vars[eNB_id]->dl_ch_estimates_ext, nr_dlsch_channel_level_median(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
median, median,
...@@ -499,54 +432,16 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -499,54 +432,16 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1; // this might need to be tuned pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1; // this might need to be tuned
}/* }
else if (dlsch0_harq->mimo_mode<DUALSTREAM_UNIFORM_PRECODING1) {// single-layer precoding (TM5, TM6)
if ((rx_type==rx_IC_single_stream) && (eNB_id_i==ue->n_connected_eNB) && (dlsch0_harq->dl_power_off==0)) {
dlsch_channel_level_TM56(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms,
pdsch_vars[eNB_id]->pmi_ext,
avg,
symbol,
nb_rb);
avg[0] = log2_approx(avg[0]) - 13 + offset_mumimo_llr_drange[dlsch0_harq->mcs][(i_mod>>1)-1];
pdsch_vars[eNB_id]->log2_maxh = cmax(avg[0],0);
}
else if (dlsch0_harq->dl_power_off==1) { //TM6
nr_dlsch_channel_level(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms,
avg,
symbol,
nb_rb);
avgs = 0;
for (aatx=0;aatx<frame_parms->nb_antenna_ports_eNB;aatx++)
for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++)
avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1;
pdsch_vars[eNB_id]->log2_maxh++;
}
}
}
else if (beamforming_mode==7)
dlsch_channel_level_TM7(pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext,
frame_parms,
avg,
symbol,
nb_rb);*/
} }
//#ifdef UE_DEBUG_TRACE #ifdef UE_DEBUG_TRACE
LOG_I(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n", LOG_I(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n",
frame%1024,nr_tti_rx, pdsch_vars[eNB_id]->log2_maxh, frame%1024,nr_tti_rx, pdsch_vars[eNB_id]->log2_maxh,
pdsch_vars[eNB_id]->log2_maxh0, pdsch_vars[eNB_id]->log2_maxh0,
pdsch_vars[eNB_id]->log2_maxh1, pdsch_vars[eNB_id]->log2_maxh1,
avg[0],avgs); avg[0],avgs);
//LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode); //LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode);
//#endif #endif
//wait until pdcch is decoded //wait until pdcch is decoded
//proc->channel_level = 1; //proc->channel_level = 1;
...@@ -583,7 +478,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -583,7 +478,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
start_meas(&ue->generic_stat_bis[ue->current_thread_id[nr_tti_rx]][slot]); start_meas(&ue->generic_stat_bis[ue->current_thread_id[nr_tti_rx]][slot]);
#endif #endif
// Now channel compensation // Now channel compensation
if (dlsch0_harq->mimo_mode<LARGE_CDD) { if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) {
nr_dlsch_channel_compensation(pdsch_vars[eNB_id]->rxdataF_ext, nr_dlsch_channel_compensation(pdsch_vars[eNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[eNB_id]->dl_ch_estimates_ext,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
...@@ -634,8 +529,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -634,8 +529,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
}*/ }*/
} }
else if ((dlsch0_harq->mimo_mode == LARGE_CDD) || ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM){
(dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))){
nr_dlsch_channel_compensation_core(pdsch_vars[eNB_id]->rxdataF_ext, nr_dlsch_channel_compensation_core(pdsch_vars[eNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[eNB_id]->dl_ch_estimates_ext,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
...@@ -697,9 +591,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -697,9 +591,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#endif #endif
if (frame_parms->nb_antennas_rx > 1) { if (frame_parms->nb_antennas_rx > 1) {
if ((dlsch0_harq->mimo_mode == LARGE_CDD) || if (dlsch0_harq->mimo_mode == NR_DUALSTREAM){
((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) &&
(dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))){ // TM3 or TM4
nr_dlsch_detection_mrc_core(pdsch_vars[eNB_id]->rxdataF_comp0, nr_dlsch_detection_mrc_core(pdsch_vars[eNB_id]->rxdataF_comp0,
NULL, NULL,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
...@@ -718,33 +610,9 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -718,33 +610,9 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
} */ } */
} }
} }
#if 0
// printf("Combining");
if ((dlsch0_harq->mimo_mode == SISO) ||
((dlsch0_harq->mimo_mode >= UNIFORM_PRECODING11) &&
(dlsch0_harq->mimo_mode <= PUSCH_PRECODING0)) ||
(dlsch0_harq->mimo_mode == TM7)) {
/*
dlsch_siso(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp,
pdsch_vars[eNB_id_i]->rxdataF_comp,
symbol,
nb_rb);
*/
} else if (dlsch0_harq->mimo_mode == ALAMOUTI) {
dlsch_alamouti(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0,
symbol,
nb_rb);
}
#endif
//printf("start compute LLR\n"); //printf("start compute LLR\n");
if ((dlsch0_harq->mimo_mode == LARGE_CDD) || if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) {
((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) &&
(dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))) {
rxdataF_comp_ptr = pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round]; rxdataF_comp_ptr = pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round];
dl_ch_mag_ptr = pdsch_vars[eNB_id]->dl_ch_mag1[harq_pid][round]; dl_ch_mag_ptr = pdsch_vars[eNB_id]->dl_ch_mag1[harq_pid][round];
} }
...@@ -1974,7 +1842,7 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext, ...@@ -1974,7 +1842,7 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext,
#if defined(__x86_64__)||defined(__i386__) #if defined(__x86_64__)||defined(__i386__)
short rb; short rb;
unsigned char aatx,aarx,nre=12; unsigned char aatx,aarx;
__m128i *dl_ch128, avg128D; __m128i *dl_ch128, avg128D;
//nb_rb*nre = y * 2^x //nb_rb*nre = y * 2^x
......
...@@ -822,11 +822,11 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -822,11 +822,11 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
pllr_symbol += llr_offset; pllr_symbol += llr_offset;
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)]; ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*nb_rb*12)];
ch_magb = (__m128i*)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)]; ch_magb = (__m128i*)&dl_ch_magb[0][(symbol*nb_rb*12)];
#elif defined(__arm__) #elif defined(__arm__)
ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)]; ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*nb_rb*12)];
ch_magb = (int16x8_t*)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)]; ch_magb = (int16x8_t*)&dl_ch_magb[0][(symbol*nb_rb*12)];
#endif #endif
// printf("nr_dlsch_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); // printf("nr_dlsch_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
......
...@@ -273,7 +273,7 @@ typedef struct { ...@@ -273,7 +273,7 @@ typedef struct {
/// Redundancy-version of the current sub-frame /// Redundancy-version of the current sub-frame
uint8_t rvidx; uint8_t rvidx;
/// MIMO mode for this DLSCH /// MIMO mode for this DLSCH
MIMO_mode_t mimo_mode; MIMO_nrmode_t mimo_mode;
/// soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15) /// soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
int16_t w[MAX_NUM_NR_DLSCH_SEGMENTS][3*8448]; int16_t w[MAX_NUM_NR_DLSCH_SEGMENTS][3*8448];
/// for abstraction soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15) /// for abstraction soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
......
...@@ -704,6 +704,11 @@ typedef enum { ...@@ -704,6 +704,11 @@ typedef enum {
TM9_10=14 TM9_10=14
} MIMO_mode_t; } MIMO_mode_t;
typedef enum {
NR_SISO=0,
NR_DUALSTREAM=1
} MIMO_nrmode_t;
typedef enum { typedef enum {
/// MRT /// MRT
......
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