Commit d795f85f authored by Raymond Knopp's avatar Raymond Knopp

SLSCH reception ok. reduced logging

parent 868a4b97
......@@ -827,7 +827,7 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
if (amod<(slsch->N_SL_RB_SC>>1)) nprb = slsch->prb_Start_SC + amod;
else nprb = slsch->prb_End_SC-(slsch->N_SL_RB_SC>>1)+amod;
if (frame_rx < 100) LOG_I(PHY,"%d.%d: Running pscch decoding slot %d, nprb %d, a %d, amod %d,N_SL_RB_SC %d\n",frame_rx,subframe_rx,slot,nprb,a,amod,slsch->N_SL_RB_SC);
if (frame_rx < 100) LOG_D(PHY,"%d.%d: Running pscch decoding slot %d, nprb %d, a %d, amod %d,N_SL_RB_SC %d\n",frame_rx,subframe_rx,slot,nprb,a,amod,slsch->N_SL_RB_SC);
// slot FEP
if (proc->sl_fep_done == 0) {
RU_t ru_tmp;
......@@ -899,7 +899,7 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
log2_maxh = (log2_approx(avgs)/2)+ log2_approx(ue->frame_parms.nb_antennas_rx-1)+4;
LOG_I(PHY,"%d.%d: nprb %d slot %d, pssch log2_maxh %d\n",frame_rx,subframe_rx,nprb,slot,log2_maxh);
LOG_D(PHY,"%d.%d: nprb %d slot %d, pssch log2_maxh %d\n",frame_rx,subframe_rx,nprb,slot,log2_maxh);
for (int l=0; l<(ue->frame_parms.symbols_per_tti>>1)-slot; l++) {
int l2 = l + slot*(ue->frame_parms.symbols_per_tti>>1);
......@@ -1170,7 +1170,7 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
int32_t avgU[2];
LOG_I(PHY,"slsch_decoding %d.%d => lmod10 %d\n",frame_rx,subframe_rx,ljmod10);
LOG_D(PHY,"slsch_decoding %d.%d => lmod10 %d\n",frame_rx,subframe_rx,ljmod10);
// slot FEP
if (proc->sl_fep_done == 0) {
......@@ -1193,9 +1193,9 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
if (l<Nsymb-1) // skip last symbol in second slot
slot_fep_ul(&ru_tmp,l,(subframe_rx<<1)+1,0);
}
LOG_I(PHY,"SLSCH Slot FEP %d.%d\n",frame_rx,subframe_rx);
LOG_D(PHY,"SLSCH Slot FEP %d.%d\n",frame_rx,subframe_rx);
}
LOG_I(PHY,"SLSCH RBstart %d, L_CRBs %d\n",slsch->RB_start+slsch->prb_Start_data,slsch->L_CRBs);
LOG_D(PHY,"SLSCH RBstart %d, L_CRBs %d\n",slsch->RB_start+slsch->prb_Start_data,slsch->L_CRBs);
// extract symbols from slot
for (int l=0; l<Nsymb; l++) {
ulsch_extract_rbs_single((int32_t**)rxdataF,
......@@ -1231,7 +1231,7 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
uint32_t v = 0;
uint32_t cyclic_shift=(slsch->group_destination_id>>1)&7;
LOG_I(PHY,"SLSCH, u0 %d, cyclic_shift %d (ljmod10 %d)\n",u,cyclic_shift,ljmod10);
LOG_D(PHY,"SLSCH, u0 %d, cyclic_shift %d (ljmod10 %d)\n",u,cyclic_shift,ljmod10);
lte_ul_channel_estimation(&ue->frame_parms,
(int32_t**)drs_ch_estimates,
(int32_t**)NULL,
......@@ -1243,10 +1243,10 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
v,
cyclic_shift,
3,
1, // interpolation
0, // interpolation
0);
u = ue->gh[1+slsch->group_destination_id][1+(ljmod10<<1)];
LOG_I(PHY,"SLSCH, u1 %d\n",u);
LOG_D(PHY,"SLSCH, u1 %d\n",u);
lte_ul_channel_estimation(&ue->frame_parms,
(int32_t**)drs_ch_estimates,
......@@ -1259,7 +1259,7 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
v,
cyclic_shift,
10,
1, // interpolation
0, // interpolation
0);
ulsch_channel_level(drs_ch_estimates,
......@@ -1383,7 +1383,7 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
// unscrambling
uint32_t x1,x2=510+(((uint32_t)slsch->group_destination_id)<<14)+(ljmod10<<9);
LOG_I(PHY,"Setting seed (unscrambling) for SL to %x (%x,%d)\n",x2,slsch->group_destination_id,ljmod10);
LOG_D(PHY,"Setting seed (unscrambling) for SL to %x (%x,%d)\n",x2,slsch->group_destination_id,ljmod10);
uint32_t s = lte_gold_generic(&x1, &x2, 1);
int k=0;
......@@ -1452,7 +1452,9 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
0,
1);
// printf("slsch decoding round %d ret %d\n",ue->dlsch_rx_slsch->harq_processes[0]->round,ret);
LOG_D(PHY,"slsch decoding round %d ret %d (%d,%d)\n",(ue->dlsch_rx_slsch->harq_processes[0]->round+3)&3,ret,
dB_fixed(ue->pusch_slsch->ulsch_power[0]),
dB_fixed(ue->pusch_slsch->ulsch_power[1]));
if (ret<ue->dlsch_rx_slsch->max_turbo_iterations) {
ue->slsch_decoded=1;
LOG_D(PHY,"SLSCH received for group_id %d (L_CRBs %d, mcs %d,rvidx %d, iter %d)\n",
......@@ -1472,8 +1474,19 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
dB_fixed(ue->pusch_slsch->ulsch_power[1]));
ue->slsch_errors++;
}
else LOG_I(PHY,"sLSCH received in error for rvidx %d round %d (L_CRBs %d, mcs %d)\n",
slsch->rvidx,(ue->dlsch_rx_slsch->harq_processes[0]->round+3)&3,slsch->L_CRBs,slsch->mcs);
else {
LOG_D(PHY,"sLSCH received in error for rvidx %d round %d (L_CRBs %d, mcs %d)\n",
slsch->rvidx,(ue->dlsch_rx_slsch->harq_processes[0]->round+3)&3,slsch->L_CRBs,slsch->mcs);
/*
if (slsch->rvidx == 0) {
write_output("slsch_rxF_comp.m","slschrxF_comp",rxdataF_comp[0],ue->frame_parms.N_RB_UL*12*14,1,1);
write_output("slsch_rxF_ext.m","slschrxF_ext",rxdataF_ext[0],14*12*ue->frame_parms.N_RB_DL,1,1);
write_output("drs_ext0.m","drsest0",drs_ch_estimates[0],ue->frame_parms.N_RB_UL*12*14,1,1);
exit(-1);
}
*/
}
}
......@@ -1502,7 +1515,7 @@ void rx_slsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, int frame_rx,int subframe_rx
// This is the condition for short SCCH bitmap (slsch->SubframeBitmapSL_length bits), check that the current subframe is for SCCH
if (absSF_modP < slsch->SubframeBitmapSL_length) return;
LOG_I(PHY,"Checking pssch for absSF %d (trp mask %d, rv %d, slsch_decoded %d)\n",
LOG_D(PHY,"Checking pssch for absSF %d (trp mask %d, rv %d, slsch_decoded %d)\n",
absSF, trp8[slsch->time_resource_pattern][absSF_modP&7],
slsch->rvidx,
ue->slsch_decoded);
......@@ -1525,7 +1538,7 @@ void rx_slsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, int frame_rx,int subframe_rx
else if (slsch->rvidx == 1) slsch->rvidx = 0;
else AssertFatal(1==0,"rvidx %d isn't possible\n",slsch->rvidx);
}
LOG_I(PHY,"%d.%d : returning\n",frame_rx,subframe_rx);
LOG_D(PHY,"%d.%d : returning\n",frame_rx,subframe_rx);
}
......@@ -2398,8 +2398,11 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
}
if (frame_tx==0 && subframe_tx ==0)
if (frame_tx==0 && subframe_tx ==0)
for (int i=0;i<MAX_SLDCH;i++) if (ue->sldch_txcnt[i]>0) LOG_I(PHY,"n_psdch %d TX count %d\n",i,ue->sldch_txcnt[i]);
}
void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,runmode_t mode,relaying_type_t r_type) {
......@@ -4797,12 +4800,15 @@ void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
if (ue->is_SynchRef == 0 && frame_rx==0 && subframe_rx==0) LOG_I(PHY,"Connected with SyncRef UE (slbch errors %d/%d)\n",
ue->slbch_errors,ue->slbch_rxops);
if (frame_rx==0 && subframe_rx==0)
for (int i=0;i<MAX_SLDCH;i++) if (ue->sldch_rxcnt[i]>0) LOG_I(PHY,"n_psdch %d RX count %d\n",i,ue->sldch_rxcnt[i]);
rx_slcch(ue,proc,frame_rx,subframe_rx);
rx_slsch(ue,proc,frame_rx,subframe_rx);
if (frame_rx==0 && subframe_rx==0) {
for (int i=0;i<MAX_SLDCH;i++) if (ue->sldch_rxcnt[i]>0) LOG_I(PHY,"n_psdch %d RX count %d\n",i,ue->sldch_rxcnt[i]);
for (int i=0;i<4;i++) if (ue->slsch_rxcnt[i]>0) LOG_I(PHY,"n_pssch[%d] rx count %d\n",i,ue->slsch_rxcnt[i]);
}
}
int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
......
......@@ -3420,15 +3420,6 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
}
*/
const int prblist[6]={6,15,25,50,75,100};
int to_prb(int sl_Bandwidth_r12) {
AssertFatal(sl_Bandwidth_r12<6, "illegal bandwidth index %d\n",sl_Bandwidth_r12);
return(prblist[sl_Bandwidth_r12]);
}
extern const int trp8[TRP8_MAX+1][8];
SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP,int slsch_test) {
......@@ -3504,7 +3495,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
}
if (ue->sltx_active == 0) return((SLSCH_t*)NULL);
slsch->ljmod10 = 10; // note this will cause ljmod10 to be reset for first transmission of SLSCH
slsch->ljmod10 = 0;
slsch->rvidx = 1;
slsch->RB_start = RB_start;
slsch->L_CRBs = L_CRBs;
......
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