Commit d71ce5a4 authored by Michele Paffetti's avatar Michele Paffetti

add some comment in the code for the integration week work

parent 7c647d15
......@@ -62,5 +62,8 @@ typedef struct {
DCI_ALLOC_NB_t dci_alloc[2] ;
} DCI_PDU_NB;
// to be created LTE_eNB_DLSCH_t --> is duplicated for each number of UE and then indexed in the table
/**@}*/
#endif
......@@ -307,7 +307,9 @@ typedef struct PHY_VARS_eNB_NB_s {
eNB_proc_NB_t proc;
NB_DL_FRAME_PARMS frame_parms;
//number of UE max = 1 // in fapy is udated dinamically each subframe and is no more a table
LTE_eNB_DLSCH_t *dlsch[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams
//how many ULSCH we keep???? should be more that 1 for sure
LTE_eNB_ULSCH_t *ulsch[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA
LTE_eNB_DLSCH_t *dlsch_SI,*dlsch_ra;
LTE_eNB_DLSCH_t *dlsch_MCH;
......
......@@ -617,11 +617,12 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
}
//ignore the PMCH part only do the generate PSS/SSS, note: Seperate MIB from here
NB_common_signal_procedures(eNB,proc);
while(!oai_exit)
{
//ignore the PMCH part only do the generate PSS/SSS, note: Seperate MIB from here
NB_common_signal_procedures(eNB,proc);
//Not test yet , mutex_l2, cond_l2, instance_cnt_l2
if(wait_on_condition(&proc->mutex_l2,&proc->cond_l2,&proc->instance_cnt_l2,"eNB_L2_thread") < 0)
......@@ -660,11 +661,14 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
if (Sched_Rsp->NB_DL.NB_DCI.DL_DCI.npdcch_pdu_rel13.rnti<= P_RNTI)
{
//is not system iformation but cound be paging
//in any case we generate dlsch for not system information
UE_id = find_ue((int16_t)Sched_Rsp->NB_DL.NB_DCI.DL_DCI.npdcch_pdu_rel13.rnti,eNB);
}
else
UE_id=0;
//inside we hve nFAPI to OAI parameters
NB_generate_eNB_dlsch_params(eNB,proc,Sched_Rsp,UE_id);
/* Apply physicalConfigDedicated if needed, don't know if needed in NB-IoT or not
......@@ -682,11 +686,13 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
/*If we have DCI to generate do it now TODO : have a generate dci top for NB_IoT */
//NB_generate_dci_top();
// what should be figurate this week
if(Sched_Rsp->NB_DL.NB_DLSCH.NPDSCH_pdu.segments)
{
/*TODO: MPDSCH procedures for NB-IoT*/
/*TODO: NPDSCH procedures for NB-IoT*/
//npdsch_procedures();
}
}
}
\ No newline at end of file
}
......@@ -400,11 +400,11 @@ int mac_init_global_param(void)
// Mac_rlc_xface->dl_phy_sync_success=dl_phy_sync_success;
#ifndef NB_IOT
LOG_I(MAC,"[MAIN] RLC interface setup and init\n");
rrc_init_global_param();
//MP: otherwise we call the initialization of the RRC NB-IoT module (see mac_init_global_param_NB)
#endif
#ifdef USER_MODE
pdcp_layer_init ();
......
......@@ -42,9 +42,9 @@ int mac_init_global_param_NB(void)
// Mac_rlc_xface = NULL;
// LOG_I(MAC,"[MAIN] CALLING RLC_MODULE_INIT...\n");
//
// if (rlc_module_init()!=0) {
// return(-1);
// }
if (rlc_module_init()!=0) {
return(-1);
}
//
// LOG_I(MAC,"[MAIN] RLC_MODULE_INIT OK, malloc16 for mac_rlc_xface...\n");
//
......@@ -69,12 +69,12 @@ int mac_init_global_param_NB(void)
rrc_init_global_param_NB();
// LOG_I(MAC,"[MAIN] PDCP layer init\n");
//#ifdef USER_MODE
// pdcp_layer_init ();
//#else
// pdcp_module_init ();
//#endif
LOG_I(MAC,"[MAIN] PDCP layer init\n");
#ifdef USER_MODE
pdcp_layer_init ();
#else
pdcp_module_init ();
#endif
//
// LOG_I(MAC,"[MAIN] Init Global Param Done\n");
......@@ -135,7 +135,7 @@ int mac_top_init_NB()
if (Is_rrc_nb_iot_registered == 1) {
LOG_I(MAC,"[MAIN] calling RRC NB-IoT\n");
#ifndef CELLULAR //nothing to be done yet for cellular
openair_rrc_top_init_NB();
openair_rrc_top_init_eNB_NB();
#endif
} else {
LOG_I(MAC,"[MAIN] Running without an RRC\n");
......
......@@ -181,6 +181,8 @@ int NB_rrc_mac_config_req_eNB(
//mac_top_init_eNB(); //TODO MP: to be included in the MAC/main.c
///to review with the Raymond implementation
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].mib_NB = mib_NB;
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].physCellId = physCellId;
eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].p_eNB = p_eNB;
......@@ -208,14 +210,15 @@ int NB_rrc_mac_config_req_eNB(
config_INFO->get_MIB = 1;
config_INFO->rnti = rntiP;
config_INFO->frequency_band_indicator = (uint8_t)eutra_band;
config_INFO->frequency_band_indicator = (uint8_t)eutra_band; // guarda raimon
config_INFO->sch_config.physical_cell_id.value = physCellId;
config_INFO->subframe_config.dl_cyclic_prefix_type.value = Ncp;
config_INFO->subframe_config.ul_cyclic_prefix_type.value = Ncp_UL;
config_INFO->rf_config.tx_antenna_ports.value = p_eNB;
config_INFO->rf_config.rx_antenna_ports.value = p_rx_eNB;
config_INFO->dl_CarrierFreq = dl_CarrierFreq;
config_INFO->ul_CarrierFreq = ul_CarrierFreq;
config_INFO->dl_CarrierFreq = dl_CarrierFreq; //guarda raymond is in rf_config
config_INFO->ul_CarrierFreq = ul_CarrierFreq; //guarda raymond
switch (mib_NB->message.operationModeInfo_r13.present)
{
......
......@@ -47,7 +47,7 @@ void rrc_config_buffer_NB(SRB_INFO_NB *srb_info, uint8_t Lchan_type, uint8_t Rol
int L3_xface_init_NB(void);
void openair_rrc_top_init_NB( char *uecap_xer);
void openair_rrc_top_init_eNB_NB(void);
//void rrc_top_cleanup(void); -->seems not to be used
......
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