Commit 304307df authored by Raymond Knopp's avatar Raymond Knopp

integration step 2

parent 5907b826
...@@ -1046,8 +1046,8 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra ...@@ -1046,8 +1046,8 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
(sci_rx_flip>>(63-1-7-5-11-8-RAbits+1))&255 (sci_rx_flip>>(63-1-7-5-11-8-RAbits+1))&255
); );
#endif #endif
// check group_id here // check group_id here (not done yet)
if (ue->slsch_rx.group_destination_id==0) ue->slsch_rx_sdu_active=1; ue->slsch_rx_sdu_active=1;
/* /*
write_output("rxsig0_input.m","rxs0_in",&ue->common_vars.rxdata[0][((subframe_rx<<1)+slot)*ue->frame_parms.samples_per_tti>>1],ue->frame_parms.samples_per_tti>>1,1,1); write_output("rxsig0_input.m","rxs0_in",&ue->common_vars.rxdata[0][((subframe_rx<<1)+slot)*ue->frame_parms.samples_per_tti>>1],ue->frame_parms.samples_per_tti>>1,1,1);
write_output("rxsig0_7_5kHz.m","rxs0_7_5kHz",rxdata_7_5kHz[0],ue->frame_parms.samples_per_tti,1,1); write_output("rxsig0_7_5kHz.m","rxs0_7_5kHz",rxdata_7_5kHz[0],ue->frame_parms.samples_per_tti,1,1);
...@@ -1105,7 +1105,10 @@ void rx_slcch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subframe_rx) ...@@ -1105,7 +1105,10 @@ void rx_slcch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subframe_rx)
absSF_modP = absSF_offset%P; absSF_modP = absSF_offset%P;
if (absSF_modP == 0) ue->slcch_received=0; if (absSF_modP == 0) {
ue->slcch_received=0;
ue->slsch_rx_sdu_active = 0;
}
// This is the condition for short SCCH bitmap (slsch->SubframeBitmapSL_length bits), check that the current subframe is for SCCH // This is the condition for short SCCH bitmap (slsch->SubframeBitmapSL_length bits), check that the current subframe is for SCCH
...@@ -1477,6 +1480,8 @@ void rx_slsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, int frame_rx,int subframe_rx ...@@ -1477,6 +1480,8 @@ void rx_slsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, int frame_rx,int subframe_rx
if (ue->slcch_received == 0) return; if (ue->slcch_received == 0) return;
if (ue->slsch_rx_sdu_active == 0) return;
absSF_offset = absSF-O; absSF_offset = absSF-O;
if (absSF < O) return; if (absSF < O) return;
...@@ -1486,9 +1491,10 @@ void rx_slsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, int frame_rx,int subframe_rx ...@@ -1486,9 +1491,10 @@ 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 // 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; if (absSF_modP < slsch->SubframeBitmapSL_length) return;
LOG_I(PHY,"Checking pssch for absSF %d (trp mask %d, rv %d)\n", LOG_I(PHY,"Checking pssch for absSF %d (trp mask %d, rv %d, slsch_decoded %d)\n",
absSF, trp8[slsch->time_resource_pattern][absSF_modP&7], absSF, trp8[slsch->time_resource_pattern][absSF_modP&7],
slsch->rvidx); slsch->rvidx,
ue->slsch_decoded);
// Note : this assumes Ntrp=8 for now // Note : this assumes Ntrp=8 for now
if (trp8[slsch->time_resource_pattern][absSF_modP&7]==0) return; if (trp8[slsch->time_resource_pattern][absSF_modP&7]==0) return;
// we have an opportunity in this subframe // we have an opportunity in this subframe
...@@ -1508,7 +1514,7 @@ void rx_slsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, int frame_rx,int subframe_rx ...@@ -1508,7 +1514,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 if (slsch->rvidx == 1) slsch->rvidx = 0;
else AssertFatal(1==0,"rvidx %d isn't possible\n",slsch->rvidx); else AssertFatal(1==0,"rvidx %d isn't possible\n",slsch->rvidx);
} }
LOG_I(PHY,"%d.%d : returning\n",frame_rx,subframe_rx);
} }
...@@ -2374,7 +2374,7 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) { ...@@ -2374,7 +2374,7 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
if (ue->sldch_active == 1) check_and_generate_psdch(ue,frame_tx,subframe_tx); if (ue->sldch_active == 1) check_and_generate_psdch(ue,frame_tx,subframe_tx);
AssertFatal(0==pthread_mutex_unlock(&ue->sldch_mutex),""); AssertFatal(0==pthread_mutex_unlock(&ue->sldch_mutex),"");
LOG_I(PHY,"%d.%d ULSCH (after sldch) generate_ul_signal %d : signal F energy %d dB (txdataF %p)\n",frame_tx,subframe_tx,ue->generate_ul_signal[subframe_tx][0],dB_fixed(signal_energy(&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size],14*ue->frame_parms.ofdm_symbol_size)),&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size]); //LOG_I(PHY,"%d.%d ULSCH (after sldch) generate_ul_signal %d : signal F energy %d dB (txdataF %p)\n",frame_tx,subframe_tx,ue->generate_ul_signal[subframe_tx][0],dB_fixed(signal_energy(&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size],14*ue->frame_parms.ofdm_symbol_size)),&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size]);
// check for SLSCH // check for SLSCH
AssertFatal(0==pthread_mutex_lock(&ue->slsch_mutex),""); AssertFatal(0==pthread_mutex_lock(&ue->slsch_mutex),"");
...@@ -2384,7 +2384,7 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) { ...@@ -2384,7 +2384,7 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
check_and_generate_pssch(ue,proc,frame_tx,subframe_tx); check_and_generate_pssch(ue,proc,frame_tx,subframe_tx);
} }
AssertFatal(0==pthread_mutex_unlock(&ue->slsch_mutex),""); AssertFatal(0==pthread_mutex_unlock(&ue->slsch_mutex),"");
LOG_I(PHY,"%d.%d ULSCH (after slsch) generate_ul_signal %d : signal F energy %d dB (txdataF %p)\n",frame_tx,subframe_tx,ue->generate_ul_signal[subframe_tx][0],dB_fixed(signal_energy(&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size],14*ue->frame_parms.ofdm_symbol_size)),&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size]); //LOG_I(PHY,"%d.%d ULSCH (after slsch) generate_ul_signal %d : signal F energy %d dB (txdataF %p)\n",frame_tx,subframe_tx,ue->generate_ul_signal[subframe_tx][0],dB_fixed(signal_energy(&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size],14*ue->frame_parms.ofdm_symbol_size)),&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size]);
LOG_D(PHY,"****** end Sidelink TX-Chain for AbsSubframe %d.%d (ul %d) ******\n", frame_tx, subframe_tx, LOG_D(PHY,"****** end Sidelink TX-Chain for AbsSubframe %d.%d (ul %d) ******\n", frame_tx, subframe_tx,
ue->generate_ul_signal[subframe_tx][0]); ue->generate_ul_signal[subframe_tx][0]);
...@@ -2392,7 +2392,7 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) { ...@@ -2392,7 +2392,7 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
LOG_I(PHY,"ULSCH %d.%d (generate_ul_signal %d): signal F energy %d dB (txdataF %p)\n",frame_tx,subframe_tx,ue->generate_ul_signal[subframe_tx][0],dB_fixed(signal_energy(&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size],14*ue->frame_parms.ofdm_symbol_size)),&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size]); // LOG_I(PHY,"ULSCH %d.%d (generate_ul_signal %d): signal F energy %d dB (txdataF %p)\n",frame_tx,subframe_tx,ue->generate_ul_signal[subframe_tx][0],dB_fixed(signal_energy(&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size],14*ue->frame_parms.ofdm_symbol_size)),&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size]);
ulsch_common_procedures(ue,frame_tx,subframe_tx, (ue->generate_ul_signal[subframe_tx][0] == 0)); ulsch_common_procedures(ue,frame_tx,subframe_tx, (ue->generate_ul_signal[subframe_tx][0] == 0));
...@@ -4801,6 +4801,8 @@ void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) { ...@@ -4801,6 +4801,8 @@ void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
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<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_slcch(ue,proc,frame_rx,subframe_rx);
rx_slsch(ue,proc,frame_rx,subframe_rx);
} }
int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
......
...@@ -275,6 +275,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti ...@@ -275,6 +275,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
&UE->proc.attr_ueSL, &UE->proc.attr_ueSL,
UE_threadSL, UE_threadSL,
(void*)UE), ""); (void*)UE), "");
} }
printf("UE threads created by %ld\n", gettid()); printf("UE threads created by %ld\n", gettid());
......
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