Commit 4fb8f839 authored by Roberto Louro Magueta's avatar Roberto Louro Magueta

PHY-simulators working fine for UL-2 layers with 16QAM and 64QAM

parent 93756a56
...@@ -757,13 +757,13 @@ void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t *harq_list, int number_of_process ...@@ -757,13 +757,13 @@ void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t *harq_list, int number_of_process
bzero(harq_list[i].d[r],(68*384)); bzero(harq_list[i].d[r],(68*384));
} }
harq_list[i].e = malloc16(14*num_rb*12*8); harq_list[i].e = malloc16(14*num_rb*12*16);
DevAssert(harq_list[i].e); DevAssert(harq_list[i].e);
bzero(harq_list[i].e,14*num_rb*12*8); bzero(harq_list[i].e,14*num_rb*12*16);
harq_list[i].f = malloc16(14*num_rb*12*8); harq_list[i].f = malloc16(14*num_rb*12*16);
DevAssert(harq_list[i].f); DevAssert(harq_list[i].f);
bzero(harq_list[i].f,14*num_rb*12*8); bzero(harq_list[i].f,14*num_rb*12*16);
harq_list[i].first_tx = 1; harq_list[i].first_tx = 1;
harq_list[i].round = 0; harq_list[i].round = 0;
......
...@@ -196,7 +196,6 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, ...@@ -196,7 +196,6 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
} }
#endif #endif
const uint8_t b_shift = pusch_pdu->nrOfLayers == 1;
for (int aarx=0; aarx<gNB->frame_parms.nb_antennas_rx; aarx++) { for (int aarx=0; aarx<gNB->frame_parms.nb_antennas_rx; aarx++) {
c16_t *rxdataF = (c16_t *)&gNB->common_vars.rxdataF[aarx][symbol_offset]; c16_t *rxdataF = (c16_t *)&gNB->common_vars.rxdataF[aarx][symbol_offset];
...@@ -228,7 +227,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, ...@@ -228,7 +227,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch=c32x16maddShift(*pil, ch=c32x16maddShift(*pil,
rxdataF[soffset + re_offset], rxdataF[soffset + re_offset],
ch, ch,
15+b_shift); 16);
pil++; pil++;
} }
...@@ -668,7 +667,7 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB, ...@@ -668,7 +667,7 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
/*------------------------------------------------------------------------------------------------------- */ /*------------------------------------------------------------------------------------------------------- */
/* 3) Compensated DMRS based estimated signal with PTRS estimation */ /* 3) Compensated DMRS based estimated signal with PTRS estimation */
/*--------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------*/
for(uint8_t i = *startSymbIndex; i< symbInSlot ; i++) { for(uint8_t i = *startSymbIndex; i < symbInSlot; i++) {
/* DMRS Symbol has 0 phase so no need to rotate the respective symbol */ /* DMRS Symbol has 0 phase so no need to rotate the respective symbol */
/* Skip rotation if the slot processing is wrong */ /* Skip rotation if the slot processing is wrong */
if((!is_dmrs_symbol(i,*dmrsSymbPos)) && (ret == 0)) { if((!is_dmrs_symbol(i,*dmrsSymbPos)) && (ret == 0)) {
......
...@@ -207,7 +207,7 @@ void nr_processULSegment(void* arg) { ...@@ -207,7 +207,7 @@ void nr_processULSegment(void* arg) {
//////////////////////////// ulsch_llr =====> ulsch_harq->e ////////////////////////////// //////////////////////////// ulsch_llr =====> ulsch_harq->e //////////////////////////////
/// code blocks after bit selection in rate matching for LDPC code (38.212 V15.4.0 section 5.4.2.1) /// code blocks after bit selection in rate matching for LDPC code (38.212 V15.4.0 section 5.4.2.1)
int16_t harq_e[3*8448]; int16_t harq_e[E];
nr_deinterleaving_ldpc(E, nr_deinterleaving_ldpc(E,
Qm, Qm,
...@@ -290,7 +290,7 @@ void nr_processULSegment(void* arg) { ...@@ -290,7 +290,7 @@ void nr_processULSegment(void* arg) {
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////// pl =====> llrProcBuf ////////////////////////////////// ////////////////////////////////// pl =====> llrProcBuf //////////////////////////////////
p_decoderParms->block_length = length_dec;
no_iteration_ldpc = nrLDPC_decoder(p_decoderParms, no_iteration_ldpc = nrLDPC_decoder(p_decoderParms,
(int8_t*)&pl[0], (int8_t*)&pl[0],
llrProcBuf, llrProcBuf,
...@@ -513,7 +513,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -513,7 +513,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
t_nrLDPC_time_stats procTime = {0}; t_nrLDPC_time_stats procTime = {0};
t_nrLDPC_time_stats *p_procTime = &procTime; t_nrLDPC_time_stats *p_procTime = &procTime;
/// code blocks after bit selection in rate matching for LDPC code (38.212 V15.4.0 section 5.4.2.1) /// code blocks after bit selection in rate matching for LDPC code (38.212 V15.4.0 section 5.4.2.1)
int16_t harq_e[3 * 8448]; int16_t harq_e[E];
nr_deinterleaving_ldpc(E, Qm, harq_e, ulsch_llr + r_offset); nr_deinterleaving_ldpc(E, Qm, harq_e, ulsch_llr + r_offset);
......
...@@ -1843,7 +1843,13 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(int **rxdataF_comp, ...@@ -1843,7 +1843,13 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(int **rxdataF_comp,
determ_fin_128[0]); determ_fin_128[0]);
rxdataF_comp128_0[0] = mmtmpD0; rxdataF_comp128_0[0] = mmtmpD0;
rxdataF_comp128_1[0] = mmtmpD1; if (mod_order > 2) {
// We need to check why it is a shift of 3
rxdataF_comp128_1[0] = _mm_srai_epi16(mmtmpD1, 3);
} else {
rxdataF_comp128_1[0] = mmtmpD1;
}
#ifdef DEBUG_DLSCH_DEMOD #ifdef DEBUG_DLSCH_DEMOD
printf("\n Rx signal after ZF l%d rb%d\n",symbol,rb); printf("\n Rx signal after ZF l%d rb%d\n",symbol,rb);
print_shorts(" Rx layer 1:",(int16_t*)&rxdataF_comp128_0[0]); print_shorts(" Rx layer 1:",(int16_t*)&rxdataF_comp128_0[0]);
...@@ -1954,7 +1960,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, ...@@ -1954,7 +1960,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
int off = ((rel15_ul->rb_size&1) == 1)? 4:0; int off = ((rel15_ul->rb_size&1) == 1)? 4:0;
uint32_t rxdataF_ext_offset = 0; uint32_t rxdataF_ext_offset = 0;
uint8_t ad_shift = 1 + log2_approx(frame_parms->nb_antennas_rx >> 2); uint8_t ad_shift = 1 + log2_approx(frame_parms->nb_antennas_rx >> 2) + (rel15_ul->nrOfLayers == 2);
for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols); symbol++) { for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols); symbol++) {
uint8_t dmrs_symbol_flag = (rel15_ul->ul_dmrs_symb_pos >> symbol) & 0x01; uint8_t dmrs_symbol_flag = (rel15_ul->ul_dmrs_symb_pos >> symbol) & 0x01;
...@@ -2057,18 +2063,21 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, ...@@ -2057,18 +2063,21 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
symbol, symbol,
rel15_ul->rb_size, rel15_ul->rb_size,
nb_re_pusch); nb_re_pusch);
if (rel15_ul->nrOfLayers == 2)//Apply zero forcing for 2 Tx layers //Apply zero forcing for 2 Tx layers
if (rel15_ul->nrOfLayers == 2) {
nr_ulsch_zero_forcing_rx_2layers(gNB->pusch_vars[ulsch_id]->rxdataF_comp, nr_ulsch_zero_forcing_rx_2layers(gNB->pusch_vars[ulsch_id]->rxdataF_comp,
gNB->pusch_vars[ulsch_id]->ul_ch_mag0, gNB->pusch_vars[ulsch_id]->ul_ch_mag0,
gNB->pusch_vars[ulsch_id]->ul_ch_magb0, gNB->pusch_vars[ulsch_id]->ul_ch_magb0,
gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext, gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext,
rel15_ul->rb_size, rel15_ul->rb_size,
frame_parms->nb_antennas_rx, frame_parms->nb_antennas_rx,
rel15_ul->qam_mod_order, rel15_ul->qam_mod_order,
gNB->pusch_vars[ulsch_id]->log2_maxh, gNB->pusch_vars[ulsch_id]->log2_maxh,
symbol, symbol,
nb_re_pusch); nb_re_pusch);
}
stop_meas(&gNB->ulsch_mrc_stats); stop_meas(&gNB->ulsch_mrc_stats);
if (rel15_ul->transform_precoding == transformPrecoder_enabled) { if (rel15_ul->transform_precoding == transformPrecoder_enabled) {
......
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