Commit fa54a8ce authored by Raymond Knopp's avatar Raymond Knopp

full integration of MIB-SL processing

parent e8d6b1ef
......@@ -457,7 +457,7 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
/*
write_output("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
write_output("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
write_output("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);*/
write_output("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
write_output("primary_syncSL0.m","psyncSL0",primary_synch0SL_time,frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples,1,1);
write_output("primary_syncSL1.m","psyncSL1",primary_synch1SL_time,frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples,1,1);
......@@ -465,7 +465,7 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
write_output("primary_syncSL1rx.m","psyncSL1rx",primary_synch1SL_time_rx,2*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples),1,1);
write_output("primary_syncSL0rx.m","psyncSL0rx",primary_synch0SL_time_rx,2*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples),1,1);
write_output("kHz75.m","kHz75",kHz7_5ptr,2*1096,1,1);
*/
return (1);
}
......
......@@ -110,7 +110,7 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
return(-1);
}
LOG_I(PHY,"subframe %d, l %d, Msc_RS = %d, Msc_RS_idx = %d, u %d, v %d, cyclic_shift %d\n",subframe_rx,l,Msc_RS, Msc_RS_idx,u,v,cyclic_shift);
LOG_D(PHY,"subframe %d, l %d, Msc_RS = %d, Msc_RS_idx = %d, u %d, v %d, cyclic_shift %d\n",subframe_rx,l,Msc_RS, Msc_RS_idx,u,v,cyclic_shift);
#ifdef DEBUG_CH
if (l==pilot_pos1)
......@@ -429,7 +429,7 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
delta_phase = lte_ul_freq_offset_estimation(frame_parms,
ul_ch_estimates[aa],
N_rb_alloc);
LOG_I(PHY,"delta_phase = %d\n",delta_phase);
LOG_D(PHY,"delta_phase = %d\n",delta_phase);
}
} //for(aa=...
return(0);
......
......@@ -78,12 +78,12 @@ int initial_syncSL(PHY_VARS_UE *ue) {
0, // eNB_index
NULL, // pdu, NULL for MIB-SL
0, // len, 0 for MIB-SL
ue->slss_rx.slmib,
&ue->slss_rx,
&frame,
&subframe);
LOG_I(PHY,"RRC returns MIB-SL for frame %d, subframe %d\n");
return(-1);
LOG_I(PHY,"RRC returns MIB-SL for frame %d, subframe %d\n",frame,subframe);
return(0);
}
}
else {
......
......@@ -319,7 +319,7 @@ int rx_psbch(PHY_VARS_UE *ue) {
for (int i=0; i<(PSBCH_A>>3); i++)
decoded_output[(PSBCH_A>>3)-i-1] = slbch_a[i];
// for (int i=0; i<(PSBCH_A>>3); i++) printf("SLBCH %d : %x\n",i,decoded_output[i]);
LOG_I(PHY,"SLBCH : %x.%x.%x.%x.%x\n",decoded_output[0],decoded_output[1],decoded_output[2],decoded_output[3],decoded_output[4]);
#ifdef DEBUG_PSBCH
LOG_I(PHY,"PSBCH CRC %x : %x\n",
......
......@@ -609,8 +609,8 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
0);
}
else {
LOG_I(MAC, "[UE %d] Frame %d Sending MIBSL to RRC (LCID Id %d,len %d)\n",
module_idP, frameP, MIBSLCH, 5);
LOG_I(MAC, "[UE %d] Frame %d Sending MIBSL to RRC (LCID Id %d,len %d) : %x.%x.%x.%x.%x\n",
module_idP, frameP, MIBSLCH, 5, slss->slmib[0],slss->slmib[1],slss->slmib[2],slss->slmib[3],slss->slmib[4]);
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
SI_RNTI,
......
......@@ -276,7 +276,7 @@ mac_rrc_data_ind_ue(
if (srb_idP == MIBSLCH) {
LOG_I(RRC,"[UE %d] Received SDU for MIBSL\n");
if (decode_MIB_SL(&ctxt,sduP,5)>=0) LOG_E(RRC,"Received MIB_SL\n");
if (decode_MIB_SL(&ctxt,sduP,5)>=0) LOG_I(RRC,"Received MIB_SL: %x.%x.%x.%x.%x\n",sduP[0],sduP[1],sduP[2],sduP[3],sduP[4]);
else LOG_E(RRC,"Received bogus MIB_SL\n");
}
......
......@@ -6277,7 +6277,7 @@ int decode_MIB_SL( const protocol_ctxt_t* const ctxt_pP,
LOG_I(RRC,"Decoded MIBSL SFN.SF %d.%d, sl_Bandwidth_r12 %d, InCoverage %d\n",
BIT_STRING_to_uint32(&UE_rrc_inst[ctxt_pP->module_id].SL_mib[0]->message.directFrameNumber_r12), // indicates that there is no update in the frame number
UE_rrc_inst[ctxt_pP->module_id].SL_mib[0]->message.directSubframeNumber_r12, // /indicates that there isno update in the subframe number
&UE_rrc_inst[ctxt_pP->module_id].SL_mib[0]->message.sl_Bandwidth_r12,
UE_rrc_inst[ctxt_pP->module_id].SL_mib[0]->message.sl_Bandwidth_r12,
UE_rrc_inst[ctxt_pP->module_id].SL_mib[0]->message.inCoverage_r12);
rrc_mac_config_req_ue(ctxt_pP->module_id, 0, 0,
......
......@@ -730,6 +730,7 @@ static void *UE_thread_synchSL(void *arg)
UE->UE_scan_carrier = 0;
} else {
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
LOG_I(PHY,"Setting UE->is_synchronized to 1\n",UE->is_synchronized);
UE->is_synchronizedSL = 1;
AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), "");
}
......@@ -762,7 +763,8 @@ static void *UE_thread_synchSL(void *arg)
}
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synchSL), "");
UE->proc.instance_cnt_synchSL--;
UE->is_synchronizedSL = 0;
// Remove this to go to steady-state mode
UE->is_synchronizedSL=0;
AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synchSL), "");
}
}
......@@ -1728,6 +1730,7 @@ void *UE_threadSL(void *arg) {
LOG_D(PHY,"UHD Thread SL (is_synchronized %d, is_SynchRef %d\n",
is_synchronized,UE->is_SynchRef);
if (is_synchronized == 0 && UE->is_SynchRef == 0) {
if (instance_cnt_synch < 0) { // we can invoke the synch
// grab 40 ms of signal and wakeup synch thread
......@@ -1766,6 +1769,7 @@ void *UE_threadSL(void *arg) {
} // UE->is_synchronized==0 && UE->is_SynchRef==0
else {
LOG_I(PHY,"start_rx_stream %d\n",start_rx_stream);
if (start_rx_stream==0 && UE->is_SynchRef == 0) {
start_rx_stream=1;
if (UE->no_timing_correction==0) {
......
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