Commit 4b373dd1 authored by Hongzhi Wang's avatar Hongzhi Wang

more fixes for ue dlsch

parent 08f90879
......@@ -457,14 +457,14 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
break;
}
if( ((Ns%2) == 0) && (l == 0))
if( (Ns== 2) && (l == 0))
{
// do ifft of channel estimate
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx])
{
LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
LOG_D(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][0],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
}
......
......@@ -162,6 +162,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
dlsch[0]->harq_processes[harq_pid]->Qm = 2;
dlsch[0]->harq_processes[harq_pid]->mcs = 9;
dlsch[0]->harq_processes[harq_pid]->Nl=1;
dlsch[0]->harq_processes[harq_pid]->round=0;
dlsch[0]->harq_processes[harq_pid]->nb_rb = nb_rb_pdsch;
frame_parms->nushift = 0;
......@@ -1381,10 +1382,10 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
// get channel amplitude if not QPSK
mmtmpD0 = _mm_madd_epi16(dl_ch128[0],dl_ch128[0]);
mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift);
mmtmpD0 = _mm_srai_epi32(mmtmpD0,(output_shift-2));
mmtmpD1 = _mm_madd_epi16(dl_ch128[1],dl_ch128[1]);
mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift);
mmtmpD1 = _mm_srai_epi32(mmtmpD1,(output_shift-2));
mmtmpD0 = _mm_packs_epi32(mmtmpD0,mmtmpD1);
......@@ -1806,18 +1807,15 @@ void nr_dlsch_scale_channel(int **dl_ch_estimates_ext,
unsigned char aatx,aarx,pilots=0,symbol_mod;
__m128i *dl_ch128, ch_amp128;
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) {
if (frame_parms->nb_antenna_ports_eNB==1) // 10 out of 12 so don't reduce size
nb_rb=1+(5*nb_rb/6);
else
if (symbol==2){
nb_rb = nb_rb>>1;
pilots=1;
}
// Determine scaling amplitude based the symbol
ch_amp = ((pilots) ? (dlsch_ue[0]->sqrt_rho_b) : (dlsch_ue[0]->sqrt_rho_a));
ch_amp = 1024*8; //((pilots) ? (dlsch_ue[0]->sqrt_rho_b) : (dlsch_ue[0]->sqrt_rho_a));
LOG_D(PHY,"Scaling PDSCH Chest in OFDM symbol %d by %d, pilots %d nb_rb %d NCP %d symbol %d\n",symbol_mod,ch_amp,pilots,nb_rb,frame_parms->Ncp,symbol);
// printf("Scaling PDSCH Chest in OFDM symbol %d by %d\n",symbol_mod,ch_amp);
......@@ -1827,7 +1825,7 @@ ch_amp = ((pilots) ? (dlsch_ue[0]->sqrt_rho_b) : (dlsch_ue[0]->sqrt_rho_a));
for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*frame_parms->N_RB_DL*12];
dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*nb_rb*12];
for (rb=0;rb<nb_rb;rb++) {
......
......@@ -1014,6 +1014,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
NR_UE_DLSCH_t *dlsch,
NR_DL_UE_HARQ_t *harq_process,
uint32_t frame,
uint16_t nb_symb_sch,
uint8_t nr_tti_rx,
uint8_t harq_pid,
uint8_t is_crnti,
......
......@@ -3411,6 +3411,7 @@ void ue_pmch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc,int eNB_id,i
ue->dlsch_MCH[0],
ue->dlsch_MCH[0]->harq_processes[0],
frame_rx,
nb_symb_sch,
nr_tti_rx,
0,
0,1);
......@@ -3845,6 +3846,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
dlsch0,
dlsch0->harq_processes[harq_pid],
frame_rx,
nb_symb_sch,
nr_tti_rx,
harq_pid,
pdsch==PDSCH?1:0,
......@@ -3869,12 +3871,12 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
#if DISABLE_LOG_X
printf(" --> Unscrambling for CW0 %5.3f\n",
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
printf("AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n",
printf("AbsSubframe %d.%d --> LDPC Decoding for CW0 %5.3f\n",
frame_rx%1024, nr_tti_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[nr_tti_rx]].p_time)/(cpuf*1000.0));
#else
LOG_I(PHY, " --> Unscrambling for CW0 %5.3f\n",
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
LOG_I(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n",
LOG_I(PHY, "AbsSubframe %d.%d --> LDPC Decoding for CW0 %5.3f\n",
frame_rx%1024, nr_tti_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[nr_tti_rx]].p_time)/(cpuf*1000.0));
#endif
......@@ -3921,6 +3923,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
dlsch1,
dlsch1->harq_processes[harq_pid],
frame_rx,
nb_symb_sch,
nr_tti_rx,
harq_pid,
pdsch==PDSCH?1:0,
......
......@@ -446,7 +446,7 @@ static void *scope_thread(void *arg) {
//if (PHY_vars_UE_g[0][0]->is_synchronized == 1)
phy_scope_UE(form_ue[0],
PHY_vars_UE_g[0][0],
0,0,7);
0,0,1);
//else it is done in the synch thread
//printf("doing forms\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