Commit 2e577b91 authored by lfarizav's avatar lfarizav

I will change eNB_id to all UE_rrc_inst

parent f77d01bc
...@@ -1116,7 +1116,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, ...@@ -1116,7 +1116,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
AssertFatal( ue->n_connected_eNB <= NUMBER_OF_CONNECTED_eNB_MAX, "n_connected_eNB is too large" ); AssertFatal( ue->n_connected_eNB <= NUMBER_OF_CONNECTED_eNB_MAX, "n_connected_eNB is too large" );
// do_ofdm_mod for frequency analysis // do_ofdm_mod for frequency analysis
int do_ofdm_mod = ue->do_ofdm_mod=0; int do_ofdm_mod = ue->do_ofdm_mod=1;
if (do_ofdm_mod==0) if (do_ofdm_mod==0)
{ {
......
...@@ -590,7 +590,7 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t su ...@@ -590,7 +590,7 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t su
int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint16_t Nf ) int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint16_t Nf )
{ {
printf("generate_prach: eNB_id %d, UE %d\n",eNB_id, ue->Mod_id);
lte_frame_type_t frame_type = ue->frame_parms.frame_type; lte_frame_type_t frame_type = ue->frame_parms.frame_type;
//uint8_t tdd_config = ue->frame_parms.tdd_config; //uint8_t tdd_config = ue->frame_parms.tdd_config;
uint16_t rootSequenceIndex = ue->frame_parms.prach_config_common.rootSequenceIndex; uint16_t rootSequenceIndex = ue->frame_parms.prach_config_common.rootSequenceIndex;
...@@ -1092,7 +1092,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -1092,7 +1092,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
} }
int32_t generate_prach_freq( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint16_t Nf ) int32_t generate_prach_freq( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint16_t Nf )
{ {
printf("generate_prach_freq: eNB_id %d, UE %d\n",eNB_id,ue->Mod_id);
lte_frame_type_t frame_type = ue->frame_parms.frame_type; lte_frame_type_t frame_type = ue->frame_parms.frame_type;
//uint8_t tdd_config = ue->frame_parms.tdd_config; //uint8_t tdd_config = ue->frame_parms.tdd_config;
uint16_t rootSequenceIndex = ue->frame_parms.prach_config_common.rootSequenceIndex; uint16_t rootSequenceIndex = ue->frame_parms.prach_config_common.rootSequenceIndex;
......
...@@ -1997,7 +1997,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) { ...@@ -1997,7 +1997,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
int frame = eNB->proc.frame_prach; int frame = eNB->proc.frame_prach;
uint8_t CC_id = eNB->CC_id; uint8_t CC_id = eNB->CC_id;
int do_ofdm_mod = PHY_vars_UE_g[0][0]->do_ofdm_mod; int do_ofdm_mod = PHY_vars_UE_g[0][0]->do_ofdm_mod;
//printf("prach_procedures: eNB_id %d\n",eNB->Mod_id);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,1);
memset(&preamble_energy_list[0],0,64*sizeof(uint16_t)); memset(&preamble_energy_list[0],0,64*sizeof(uint16_t));
memset(&preamble_delay_list[0],0,64*sizeof(uint16_t)); memset(&preamble_delay_list[0],0,64*sizeof(uint16_t));
......
...@@ -1836,7 +1836,7 @@ ue_scheduler( ...@@ -1836,7 +1836,7 @@ ue_scheduler(
const int CC_id) const int CC_id)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
printf("ue_scheduler: UE %d, eNB_indexp %d, PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id %d \n",module_idP,eNB_indexP,PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id); //printf("ue_scheduler: UE %d, eNB_indexp %d, PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id %d \n",module_idP,eNB_indexP,PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id);
int lcid; // lcid index int lcid; // lcid index
int TTI= 1; int TTI= 1;
int bucketsizeduration = -1; int bucketsizeduration = -1;
...@@ -2029,7 +2029,7 @@ ue_scheduler( ...@@ -2029,7 +2029,7 @@ ue_scheduler(
} }
//Check whether Regular BSR is triggered //Check whether Regular BSR is triggered
if (update_bsr(module_idP,txFrameP, txSubframeP,eNB_indexP) == TRUE) {//eNB_indexP change inside the function, so it is not necessary to change if (update_bsr(module_idP,txFrameP, txSubframeP,eNB_indexP) == TRUE) {//eNB_indexP change inside the function, so it is not necessary to change here
// call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp. This should implement the procedures // call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp. This should implement the procedures
// outlined in Sections 5.4.4 an 5.4.5 of 36.321 // outlined in Sections 5.4.4 an 5.4.5 of 36.321
UE_mac_inst[module_idP].scheduling_info.SR_pending= 1; UE_mac_inst[module_idP].scheduling_info.SR_pending= 1;
...@@ -2074,7 +2074,7 @@ ue_scheduler( ...@@ -2074,7 +2074,7 @@ ue_scheduler(
//LOG_D(MAC,"PHR normal operation %d active %d \n", UE_mac_inst[module_idP].scheduling_info.periodicPHR_SF, UE_mac_inst[module_idP].PHR_reporting_active); //LOG_D(MAC,"PHR normal operation %d active %d \n", UE_mac_inst[module_idP].scheduling_info.periodicPHR_SF, UE_mac_inst[module_idP].PHR_reporting_active);
if ((UE_mac_inst[module_idP].scheduling_info.prohibitPHR_SF <= 0) && if ((UE_mac_inst[module_idP].scheduling_info.prohibitPHR_SF <= 0) &&
((mac_xface->get_PL(module_idP,0,eNB_indexP) < UE_mac_inst[module_idP].scheduling_info.PathlossChange_db) ||/*eNB_indexP=0*/ ((mac_xface->get_PL(module_idP,0,eNB_indexP) < UE_mac_inst[module_idP].scheduling_info.PathlossChange_db) ||/*eNB_indexP=0*/
(UE_mac_inst[module_idP].power_backoff_db[/*eNB_indexP*/PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id] > UE_mac_inst[module_idP].scheduling_info.PathlossChange_db))) (UE_mac_inst[module_idP].power_backoff_db[eNB_indexP/*PHY_vars_UE_g[module_idP][0]->common_vars.eNb_id*/] > UE_mac_inst[module_idP].scheduling_info.PathlossChange_db)))
// trigger PHR and reset the timer later when the PHR report is sent // trigger PHR and reset the timer later when the PHR report is sent
{ {
UE_mac_inst[module_idP].PHR_reporting_active = 1; UE_mac_inst[module_idP].PHR_reporting_active = 1;
......
...@@ -1233,7 +1233,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv) ...@@ -1233,7 +1233,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %d bits (%d bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %d bits (%d bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
#endif #endif
printf("[UE] RRCConnectionRequest Encoded %d bits (%d bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
......
...@@ -439,6 +439,7 @@ static const char const nas_attach_req_guti[] = { ...@@ -439,6 +439,7 @@ static const char const nas_attach_req_guti[] = {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t Transaction_id ) static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t Transaction_id )
{ {
printf("rrc_ue_generate_RRCConnectionSetupComplete: eNB_index %d\n",eNB_index);
//eNB_index=ue->common_vars.enb_id //eNB_index=ue->common_vars.enb_id
uint8_t buffer[100]; uint8_t buffer[100];
uint8_t size; uint8_t size;
...@@ -473,6 +474,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t* c ...@@ -473,6 +474,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t* c
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void rrc_ue_generate_RRCConnectionReconfigurationComplete( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t Transaction_id ) static void rrc_ue_generate_RRCConnectionReconfigurationComplete( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t Transaction_id )
{ {
printf("rrc_ue_generate_RRCConnectionReconfigurationComplete: eNB_index %d\n",eNB_index);
//eNB_index=ue->common_vars.enb_id //eNB_index=ue->common_vars.enb_id
uint8_t buffer[32], size; uint8_t buffer[32], size;
size = do_RRCConnectionReconfigurationComplete(ctxt_pP, buffer, Transaction_id); size = do_RRCConnectionReconfigurationComplete(ctxt_pP, buffer, Transaction_id);
...@@ -643,7 +645,8 @@ rrc_ue_establish_srb1( ...@@ -643,7 +645,8 @@ rrc_ue_establish_srb1(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
// add descriptor from RRC PDU // add descriptor from RRC PDU
// eNb_id=0,1
printf("rrc_ue_establish_srb1: eNB_index %d\n",eNB_index);
uint8_t lchan_id = DCCH; uint8_t lchan_id = DCCH;
UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Active = 1; UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Active = 1;
...@@ -677,7 +680,8 @@ rrc_ue_establish_srb2( ...@@ -677,7 +680,8 @@ rrc_ue_establish_srb2(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
// add descriptor from RRC PDU // add descriptor from RRC PDU
//eNb_id=0,1
printf("rrc_ue_establish_srb2: eNB_index %d\n",eNB_index);
uint8_t lchan_id = DCCH1; uint8_t lchan_id = DCCH1;
UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Active = 1; UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Active = 1;
...@@ -710,6 +714,7 @@ rrc_ue_establish_drb( ...@@ -710,6 +714,7 @@ rrc_ue_establish_drb(
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
printf("rrc_ue_establish_drb: eNB_index %d\n",eNB_index);
// add descriptor from RRC PDU // add descriptor from RRC PDU
#ifdef PDCP_USE_NETLINK #ifdef PDCP_USE_NETLINK
int oip_ifup=0,ip_addr_offset3=0,ip_addr_offset4=0; int oip_ifup=0,ip_addr_offset3=0,ip_addr_offset4=0;
...@@ -783,7 +788,7 @@ rrc_ue_process_measConfig( ...@@ -783,7 +788,7 @@ rrc_ue_process_measConfig(
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
printf("rrc_ue_process_measConfig: eNB_index %d\n",eNB_index);
// This is the procedure described in 36.331 Section 5.5.2.1 // This is the procedure described in 36.331 Section 5.5.2.1
int i; int i;
long ind; long ind;
...@@ -973,6 +978,7 @@ rrc_ue_update_radioResourceConfigDedicated(RadioResourceConfigDedicated_t* radio ...@@ -973,6 +978,7 @@ rrc_ue_update_radioResourceConfigDedicated(RadioResourceConfigDedicated_t* radio
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t eNB_index) uint8_t eNB_index)
{ {
printf("rrc_ue_update_radioResourceConfigDedicated: eNB_index %d\n",eNB_index);
PhysicalConfigDedicated_t* physicalConfigDedicated2 = NULL; PhysicalConfigDedicated_t* physicalConfigDedicated2 = NULL;
physicalConfigDedicated2 = CALLOC(1,sizeof(*physicalConfigDedicated2)); physicalConfigDedicated2 = CALLOC(1,sizeof(*physicalConfigDedicated2));
...@@ -1194,6 +1200,7 @@ rrc_ue_process_radioResourceConfigDedicated( ...@@ -1194,6 +1200,7 @@ rrc_ue_process_radioResourceConfigDedicated(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
//eNB_index=ue->common_vars.enb_id //eNB_index=ue->common_vars.enb_id
printf("rrc_ue_process_radioResourceConfigDedicated: eNB_index %d\n",eNB_index);
long SRB_id,DRB_id; long SRB_id,DRB_id;
int i,cnt; int i,cnt;
LogicalChannelConfig_t *SRB1_logicalChannelConfig,*SRB2_logicalChannelConfig; LogicalChannelConfig_t *SRB1_logicalChannelConfig,*SRB2_logicalChannelConfig;
...@@ -1562,6 +1569,7 @@ rrc_ue_process_securityModeCommand( ...@@ -1562,6 +1569,7 @@ rrc_ue_process_securityModeCommand(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
//eNB_index=ue->common_vars.enb_id //eNB_index=ue->common_vars.enb_id
printf("rrc_ue_process_securityModeCommand: eNB_index %d\n",eNB_index);
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
UL_DCCH_Message_t ul_dcch_msg; UL_DCCH_Message_t ul_dcch_msg;
...@@ -1760,6 +1768,7 @@ rrc_ue_process_ueCapabilityEnquiry( ...@@ -1760,6 +1768,7 @@ rrc_ue_process_ueCapabilityEnquiry(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
//eNB_index=ue->common_vars.enb_id //eNB_index=ue->common_vars.enb_id
printf("rrc_ue_process_ueCapabilityEnquiry: eNB_index %d\n",eNB_index);
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
UL_DCCH_Message_t ul_dcch_msg; UL_DCCH_Message_t ul_dcch_msg;
...@@ -1868,6 +1877,7 @@ rrc_ue_process_rrcConnectionReconfiguration( ...@@ -1868,6 +1877,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
//eNB_index=ue->common_vars.enb_id //eNB_index=ue->common_vars.enb_id
printf("rrc_ue_process_rrcConnectionReconfiguration: eNB_index %d\n",eNB_index);
LOG_I(RRC,"[UE %d] Frame %d: Receiving from SRB1 (DL-DCCH), Processing RRCConnectionReconfiguration (eNB %d)\n", LOG_I(RRC,"[UE %d] Frame %d: Receiving from SRB1 (DL-DCCH), Processing RRCConnectionReconfiguration (eNB %d)\n",
ctxt_pP->module_id,ctxt_pP->frame,eNB_index); ctxt_pP->module_id,ctxt_pP->frame,eNB_index);
...@@ -1981,6 +1991,7 @@ rrc_ue_process_mobilityControlInfo( ...@@ -1981,6 +1991,7 @@ rrc_ue_process_mobilityControlInfo(
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
printf("rrc_ue_process_mobilityControlInfo: eNB_index %d\n",eNB_index);
/* /*
DRB_ToReleaseList_t* drb2release_list; DRB_ToReleaseList_t* drb2release_list;
DRB_Identity_t *lcid; DRB_Identity_t *lcid;
...@@ -2645,6 +2656,7 @@ int decode_BCCH_DLSCH_Message( ...@@ -2645,6 +2656,7 @@ int decode_BCCH_DLSCH_Message(
const uint8_t rsrp ) const uint8_t rsrp )
{ {
//printf("decode_BCCH_DLSCH_Message: eNB_index %d\n",eNB_index);//eNB_index=ue->common_vars.enb_id //printf("decode_BCCH_DLSCH_Message: eNB_index %d\n",eNB_index);//eNB_index=ue->common_vars.enb_id
printf("decode_BCCH_DLSCH_Message: eNB_index %d\n",eNB_index);
BCCH_DL_SCH_Message_t *bcch_message = NULL; BCCH_DL_SCH_Message_t *bcch_message = NULL;
SystemInformationBlockType1_t* sib1 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]; SystemInformationBlockType1_t* sib1 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index];
//int i; //int i;
...@@ -2773,7 +2785,7 @@ int decode_PCCH_DLSCH_Message( ...@@ -2773,7 +2785,7 @@ int decode_PCCH_DLSCH_Message(
{ {
PCCH_Message_t *pcch_message = NULL; PCCH_Message_t *pcch_message = NULL;
//int i; //int i;
printf("decode_PCCH_DLSCH_Message: eNB_index %d\n",eNB_index);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_PCCH, VCD_FUNCTION_IN ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_PCCH, VCD_FUNCTION_IN );
asn_dec_rval_t dec_rval = uper_decode_complete( NULL, asn_dec_rval_t dec_rval = uper_decode_complete( NULL,
...@@ -3791,6 +3803,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in ...@@ -3791,6 +3803,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void ue_meas_filtering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index ) void ue_meas_filtering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index )
{ {
printf("ue_meas_filtering: eNB_index %d\n",eNB_index);
float a = UE_rrc_inst[ctxt_pP->module_id].filter_coeff_rsrp; // 'a' in 36.331 Sec. 5.5.3.2 float a = UE_rrc_inst[ctxt_pP->module_id].filter_coeff_rsrp; // 'a' in 36.331 Sec. 5.5.3.2
float a1 = UE_rrc_inst[ctxt_pP->module_id].filter_coeff_rsrq; float a1 = UE_rrc_inst[ctxt_pP->module_id].filter_coeff_rsrq;
//float rsrp_db, rsrq_db; //float rsrp_db, rsrq_db;
...@@ -3869,7 +3882,7 @@ void ue_meas_filtering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_ ...@@ -3869,7 +3882,7 @@ void ue_meas_filtering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void rrc_ue_generate_MeasurementReport(protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index ) static void rrc_ue_generate_MeasurementReport(protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index )
{ {
printf("rrc_ue_generate_MeasurementReport: eNB_index %d\n",eNB_index);
uint8_t buffer[32], size; uint8_t buffer[32], size;
uint8_t i; uint8_t i;
uint8_t target_eNB_offset; uint8_t target_eNB_offset;
...@@ -3950,6 +3963,7 @@ static void rrc_ue_generate_MeasurementReport(protocol_ctxt_t* const ctxt_pP, ui ...@@ -3950,6 +3963,7 @@ static void rrc_ue_generate_MeasurementReport(protocol_ctxt_t* const ctxt_pP, ui
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void ue_measurement_report_triggering(protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index ) void ue_measurement_report_triggering(protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index )
{ {
//printf("ue_measurement_report_triggering: eNB_index %d\n",eNB_index);enb_id=0,1
uint8_t i,j; uint8_t i,j;
Hysteresis_t hys; Hysteresis_t hys;
TimeToTrigger_t ttt_ms; TimeToTrigger_t ttt_ms;
...@@ -4074,6 +4088,7 @@ static uint8_t check_trigger_meas_event( ...@@ -4074,6 +4088,7 @@ static uint8_t check_trigger_meas_event(
long a3_offset, long a3_offset,
TimeToTrigger_t ttt ) TimeToTrigger_t ttt )
{ {
printf("check_trigger_meas_event: eNB_index %d\n",eNB_index);
uint8_t eNB_offset; uint8_t eNB_offset;
uint8_t currentCellIndex = mac_xface->frame_parms->Nid_cell; uint8_t currentCellIndex = mac_xface->frame_parms->Nid_cell;
uint8_t tmp_offset; uint8_t tmp_offset;
...@@ -4129,7 +4144,7 @@ static uint8_t check_trigger_meas_event( ...@@ -4129,7 +4144,7 @@ static uint8_t check_trigger_meas_event(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t* const Sdu, const uint8_t Sdu_len, const uint8_t mbsfn_sync_area ) int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t* const Sdu, const uint8_t Sdu_len, const uint8_t mbsfn_sync_area )
{ {
printf("decode_MCCH_Message: eNB_index %d\n",eNB_index);
MCCH_Message_t *mcch=NULL; MCCH_Message_t *mcch=NULL;
MBSFNAreaConfiguration_r9_t** mcch_message=&UE_rrc_inst[ctxt_pP->module_id].mcch_message[eNB_index]; MBSFNAreaConfiguration_r9_t** mcch_message=&UE_rrc_inst[ctxt_pP->module_id].mcch_message[eNB_index];
...@@ -4191,6 +4206,7 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB ...@@ -4191,6 +4206,7 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, frame_t frameP, uint8_t mbsfn_sync_area ) static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, frame_t frameP, uint8_t mbsfn_sync_area )
{ {
printf("decode_MBSFNAreaConfiguration: eNB_index %d\n",eNB_index);
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
LOG_I(RRC,"[UE %d] Frame %d : Number of MCH(s) in the MBSFN Sync Area %d is %d\n", LOG_I(RRC,"[UE %d] Frame %d : Number of MCH(s) in the MBSFN Sync Area %d is %d\n",
...@@ -4303,7 +4319,8 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4303,7 +4319,8 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
case RRC_MAC_IN_SYNC_IND: case RRC_MAC_IN_SYNC_IND:
LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_IN_SYNC_IND (msg_p).frame, RRC_MAC_IN_SYNC_IND (msg_p).enb_index); RRC_MAC_IN_SYNC_IND (msg_p).frame, RRC_MAC_IN_SYNC_IND (msg_p).enb_index);
printf("[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_IN_SYNC_IND (msg_p).frame, RRC_MAC_IN_SYNC_IND (msg_p).enb_index);
UE_rrc_inst[ue_mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].N310_cnt = 0; UE_rrc_inst[ue_mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].N310_cnt = 0;
if (UE_rrc_inst[ue_mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].T310_active == 1) { if (UE_rrc_inst[ue_mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].T310_active == 1) {
...@@ -4315,13 +4332,14 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4315,13 +4332,14 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
case RRC_MAC_OUT_OF_SYNC_IND: case RRC_MAC_OUT_OF_SYNC_IND:
LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_OUT_OF_SYNC_IND (msg_p).frame, RRC_MAC_OUT_OF_SYNC_IND (msg_p).enb_index); RRC_MAC_OUT_OF_SYNC_IND (msg_p).frame, RRC_MAC_OUT_OF_SYNC_IND (msg_p).enb_index);
printf("[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_OUT_OF_SYNC_IND (msg_p).frame, RRC_MAC_OUT_OF_SYNC_IND (msg_p).enb_index);
UE_rrc_inst[ue_mod_id].Info[RRC_MAC_OUT_OF_SYNC_IND (msg_p).enb_index].N310_cnt ++; UE_rrc_inst[ue_mod_id].Info[RRC_MAC_OUT_OF_SYNC_IND (msg_p).enb_index].N310_cnt ++;
break; break;
case RRC_MAC_BCCH_DATA_IND: case RRC_MAC_BCCH_DATA_IND:
//printf("rrc_ue_task:[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name, printf("rrc_ue_task:[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name,
// RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index); RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index);
LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index); RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index);
...@@ -4339,7 +4357,8 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4339,7 +4357,8 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
case RRC_MAC_CCCH_DATA_CNF: case RRC_MAC_CCCH_DATA_CNF:
LOG_D(RRC, "[UE %d] Received %s: eNB %d\n", ue_mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index); RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index);
printf("[UE %d] Received %s: eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index);
// reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds) // reset the tx buffer to indicate RRC that ccch was successfully transmitted (for example if contention resolution succeeds)
UE_rrc_inst[ue_mod_id].Srb0[RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index].Tx_buffer.payload_size = 0; UE_rrc_inst[ue_mod_id].Srb0[RRC_MAC_CCCH_DATA_CNF (msg_p).enb_index].Tx_buffer.payload_size = 0;
break; break;
...@@ -4351,6 +4370,12 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4351,6 +4370,12 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
msg_name, msg_name,
RRC_MAC_CCCH_DATA_IND (msg_p).frame, RRC_MAC_CCCH_DATA_IND (msg_p).frame,
RRC_MAC_CCCH_DATA_IND (msg_p).enb_index); RRC_MAC_CCCH_DATA_IND (msg_p).enb_index);
printf("[UE %d] RNTI %x Received %s: frameP %d, eNB %d\n",
ue_mod_id,
RRC_MAC_CCCH_DATA_IND (msg_p).rnti,
msg_name,
RRC_MAC_CCCH_DATA_IND (msg_p).frame,
RRC_MAC_CCCH_DATA_IND (msg_p).enb_index);
srb_info_p = &UE_rrc_inst[ue_mod_id].Srb0[RRC_MAC_CCCH_DATA_IND (msg_p).enb_index]; srb_info_p = &UE_rrc_inst[ue_mod_id].Srb0[RRC_MAC_CCCH_DATA_IND (msg_p).enb_index];
...@@ -4369,6 +4394,8 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4369,6 +4394,8 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
case RRC_MAC_MCCH_DATA_IND: case RRC_MAC_MCCH_DATA_IND:
LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d, mbsfn SA %d\n", ue_mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d, mbsfn SA %d\n", ue_mod_id, msg_name,
RRC_MAC_MCCH_DATA_IND (msg_p).frame, RRC_MAC_MCCH_DATA_IND (msg_p).enb_index, RRC_MAC_MCCH_DATA_IND (msg_p).mbsfn_sync_area); RRC_MAC_MCCH_DATA_IND (msg_p).frame, RRC_MAC_MCCH_DATA_IND (msg_p).enb_index, RRC_MAC_MCCH_DATA_IND (msg_p).mbsfn_sync_area);
printf("[UE %d] Received %s: frameP %d, eNB %d, mbsfn SA %d\n", ue_mod_id, msg_name,
RRC_MAC_MCCH_DATA_IND (msg_p).frame, RRC_MAC_MCCH_DATA_IND (msg_p).enb_index, RRC_MAC_MCCH_DATA_IND (msg_p).mbsfn_sync_area);
//PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, M_RNTI, RRC_MAC_MCCH_DATA_IND (msg_p).frame, 0); //PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, M_RNTI, RRC_MAC_MCCH_DATA_IND (msg_p).frame, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, M_RNTI, RRC_MAC_MCCH_DATA_IND (msg_p).frame, 0,RRC_MAC_MCCH_DATA_IND (msg_p).enb_index); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, M_RNTI, RRC_MAC_MCCH_DATA_IND (msg_p).frame, 0,RRC_MAC_MCCH_DATA_IND (msg_p).enb_index);
...@@ -4396,6 +4423,18 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4396,6 +4423,18 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
msg_name, msg_name,
RRC_DCCH_DATA_IND (msg_p).dcch_index, RRC_DCCH_DATA_IND (msg_p).dcch_index,
RRC_DCCH_DATA_IND (msg_p).eNB_index); RRC_DCCH_DATA_IND (msg_p).eNB_index);
printf("[UE %d] Received %s: frameP %d, DCCH %d, eNB %d\n",
RRC_DCCH_DATA_IND (msg_p).module_id,
msg_name,
RRC_DCCH_DATA_IND (msg_p).frame,
RRC_DCCH_DATA_IND (msg_p).dcch_index,
RRC_DCCH_DATA_IND (msg_p).eNB_index);
printf("Received %s DCCH %d, eNB %d\n",
msg_name,
RRC_DCCH_DATA_IND (msg_p).dcch_index,
RRC_DCCH_DATA_IND (msg_p).eNB_index);
rrc_ue_decode_dcch ( rrc_ue_decode_dcch (
&ctxt, &ctxt,
RRC_DCCH_DATA_IND (msg_p).dcch_index, RRC_DCCH_DATA_IND (msg_p).dcch_index,
...@@ -4443,6 +4482,14 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4443,6 +4482,14 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MNCdigit2, NAS_CELL_SELECTION_REQ (msg_p).plmnID.MNCdigit2,
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MNCdigit3, NAS_CELL_SELECTION_REQ (msg_p).plmnID.MNCdigit3,
NAS_CELL_SELECTION_REQ (msg_p).rat); NAS_CELL_SELECTION_REQ (msg_p).rat);
printf("[UE %d] Received %s: state %d, plmnID (%d%d%d.%d%d%d), rat %x\n", ue_mod_id, msg_name, rrc_get_state(ue_mod_id),
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit1,
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit2,
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit3,
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MNCdigit1,
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MNCdigit2,
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MNCdigit3,
NAS_CELL_SELECTION_REQ (msg_p).rat);
if (rrc_get_state(ue_mod_id) == RRC_STATE_INACTIVE) { if (rrc_get_state(ue_mod_id) == RRC_STATE_INACTIVE) {
// have a look at MAC/main.c void dl_phy_sync_success(...) // have a look at MAC/main.c void dl_phy_sync_success(...)
...@@ -4517,6 +4564,16 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4517,6 +4564,16 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit1, NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit1,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit2, NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit2,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit3); NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit3);
printf("[UE %d] Received %s: cause %d, type %d, s_tmsi (mme code %"PRIu8", m-tmsi %"PRIu32"), plmnID (%d%d%d.%d%d%d)\n", ue_mod_id, msg_name, NAS_CONN_ESTABLI_REQ (msg_p).cause,
NAS_CONN_ESTABLI_REQ (msg_p).type,
NAS_CONN_ESTABLI_REQ (msg_p).s_tmsi.MMEcode,
NAS_CONN_ESTABLI_REQ (msg_p).s_tmsi.m_tmsi,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MCCdigit1,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MCCdigit2,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MCCdigit3,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit1,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit2,
NAS_CONN_ESTABLI_REQ (msg_p).plmnID.MNCdigit3);
//PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, 0, 0); //PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, 0, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, NOT_A_RNTI, 0, 0, PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, NOT_A_RNTI, 0, 0, PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id);
...@@ -4526,7 +4583,7 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4526,7 +4583,7 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
switch (rrc_get_state(ue_mod_id)) { switch (rrc_get_state(ue_mod_id)) {
case RRC_STATE_IDLE: { case RRC_STATE_IDLE: {
if (rrc_get_sub_state(ue_mod_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) { if (rrc_get_sub_state(ue_mod_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) {
rrc_ue_generate_RRCConnectionRequest(&ctxt, 0); rrc_ue_generate_RRCConnectionRequest(&ctxt, PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id);
LOG_D(RRC, "not sending connection request\n"); LOG_D(RRC, "not sending connection request\n");
rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_CONNECTING); rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_CONNECTING);
...@@ -4715,7 +4772,7 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR ...@@ -4715,7 +4772,7 @@ NAS_KENB_REFRESH_REQ,NAS_CELL_SELECTION_REQ,RRC_STATE_INACTIVE,RRC_STATE_IDLE,RR
case RRC_STATE_IDLE: { case RRC_STATE_IDLE: {
if (rrc_get_sub_state(ue_mod_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) { if (rrc_get_sub_state(ue_mod_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) {
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, UE_rrc_inst[ue_mod_id].Info[PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id].rnti, 0, 0, PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, ENB_FLAG_NO, UE_rrc_inst[ue_mod_id].Info[PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id].rnti, 0, 0, PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id);
rrc_ue_generate_RRCConnectionRequest(&ctxt, 0); rrc_ue_generate_RRCConnectionRequest(&ctxt, PHY_vars_UE_g[ue_mod_id][0]->common_vars.eNb_id);
LOG_D(RRC, "not sending connection request\n"); LOG_D(RRC, "not sending connection request\n");
rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_CONNECTING); rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_CONNECTING);
} }
......
...@@ -60,6 +60,7 @@ openair_rrc_on( ...@@ -60,6 +60,7 @@ openair_rrc_on(
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
//ok
unsigned short i; unsigned short i;
int CC_id; int CC_id;
...@@ -408,7 +409,7 @@ rrc_rx_tx( ...@@ -408,7 +409,7 @@ rrc_rx_tx(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
//uint8_t UE_id; //uint8_t UE_id;
printf("rrc_rx_tx: enb_indexP %d\n",enb_indexP); //printf("rrc_rx_tx: enb_indexP %d, ctxt_pP->module_id %d\n",enb_indexP,ctxt_pP->module_id);
int32_t current_timestamp_ms, ref_timestamp_ms; int32_t current_timestamp_ms, ref_timestamp_ms;
struct timeval ts; struct timeval ts;
struct rrc_eNB_ue_context_s *ue_context_p = NULL,*ue_to_be_removed = NULL; struct rrc_eNB_ue_context_s *ue_context_p = NULL,*ue_to_be_removed = NULL;
......
...@@ -102,6 +102,7 @@ void rrc_init_ch_req(unsigned char Mod_id, rrm_init_ch_req_t *smsg) ...@@ -102,6 +102,7 @@ void rrc_init_ch_req(unsigned char Mod_id, rrm_init_ch_req_t *smsg)
void rrc_init_mr_req(unsigned char Mod_id, rrci_init_mr_req_t *smsg) void rrc_init_mr_req(unsigned char Mod_id, rrci_init_mr_req_t *smsg)
{ {
//printf("UE_rrc_inst:\n");NOt
uint16_t Index; uint16_t Index;
MAC_CONFIG_REQ Mac_config_req; MAC_CONFIG_REQ Mac_config_req;
// MAC_MEAS_REQ Mac_meas_req; // MAC_MEAS_REQ Mac_meas_req;
......
...@@ -63,7 +63,7 @@ extern UE_MAC_INST *UE_mac_inst; ...@@ -63,7 +63,7 @@ extern UE_MAC_INST *UE_mac_inst;
void fn_rrc (void) void fn_rrc (void)
{ {
/******************************************************************************/ /******************************************************************************/
//printf("fn_rrc:\n");Not
msg_head_t *Header ; msg_head_t *Header ;
#ifdef USER_MODE #ifdef USER_MODE
char *Data; char *Data;
......
...@@ -841,7 +841,7 @@ static void *UE_thread_rxn_txnp4(void *arg) { ...@@ -841,7 +841,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
start_meas(&UE->generic_stat); start_meas(&UE->generic_stat);
#endif #endif
if (UE->mac_enabled==1) { if (UE->mac_enabled==1) {
printf("UE_thread_rxn_txnp4: eNB_id %d, common_vars.enb_id %d, UE %d\n",0,PHY_vars_UE_g[UE->Mod_id][0]->common_vars.eNb_id,UE->Mod_id); //printf("UE_thread_rxn_txnp4: eNB_id %d, common_vars.enb_id %d, UE %d\n",0,PHY_vars_UE_g[UE->Mod_id][0]->common_vars.eNb_id,UE->Mod_id);
ret = mac_xface->ue_scheduler(UE->Mod_id, ret = mac_xface->ue_scheduler(UE->Mod_id,
proc->frame_rx, proc->frame_rx,
proc->subframe_rx, proc->subframe_rx,
......
...@@ -1431,6 +1431,7 @@ void do_UL_sig_freq_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB ...@@ -1431,6 +1431,7 @@ void do_UL_sig_freq_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB
//for (int i=0;i<NB_UE_INST;i++) //for (int i=0;i<NB_UE_INST;i++)
// Compute RX signal for eNB = eNB_id // Compute RX signal for eNB = eNB_id
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) { for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
if (PHY_vars_UE_g[UE_id][CC_id]->common_vars.eNb_id!=eNB_id) continue;
lte_frame_type_t frame_type = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.frame_type; lte_frame_type_t frame_type = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.frame_type;
prach_ConfigIndex = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex; prach_ConfigIndex = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type); prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
......
...@@ -1066,6 +1066,7 @@ int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void * ...@@ -1066,6 +1066,7 @@ int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void *
//count++; //count++;
int ret = nsamps; int ret = nsamps;
int eNB_id = device->Mod_id; int eNB_id = device->Mod_id;
//printf("eNB_id %d\n",eNB_id);
int CC_id = device->CC_id; int CC_id = device->CC_id;
int UE_id = 0; int UE_id = 0;
...@@ -1130,8 +1131,7 @@ int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void * ...@@ -1130,8 +1131,7 @@ int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void *
if (do_ofdm_mod) if (do_ofdm_mod)
{ {
for (UE_id=0; UE_id<NB_UE_INST; UE_id++){ for (UE_id=0; UE_id<NB_UE_INST; UE_id++){
if (eNB_id!=PHY_vars_UE_g[UE_id][CC_id]->common_vars.eNb_id) if (eNB_id!=PHY_vars_UE_g[UE_id][CC_id]->common_vars.eNb_id) continue;
continue;
if (is_prach_subframe(&PHY_vars_UE_g[UE_id][CC_id]->frame_parms,frame,subframe) && PHY_vars_UE_g[UE_id][CC_id]->generate_prach) if (is_prach_subframe(&PHY_vars_UE_g[UE_id][CC_id]->frame_parms,frame,subframe) && PHY_vars_UE_g[UE_id][CC_id]->generate_prach)
{ {
//clock_t start=clock(); //clock_t start=clock();
......
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