Commit c6df27ba authored by Michele Paffetti's avatar Michele Paffetti

commit before pull nick version

parent 6bc94248
...@@ -37,17 +37,20 @@ ...@@ -37,17 +37,20 @@
#endif #endif
/*brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB-NB decoding + primary/secondary synch).*/ /*brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB-NB decoding + primary/secondary synch).*/
void NB_phy_config_mib_eNB(int Mod_id, void NB_phy_config_mib_eNB(
int CC_id, int Mod_id,
int eutra_band, int CC_id,
int Nid_cell, int eutra_band,
int Ncp, int Nid_cell,
int Ncp_UL, int Ncp,
int p_eNB, int Ncp_UL,
uint32_t dl_CarrierFreq, int p_eNB,
uint32_t ul_CarrierFreq); uint32_t dl_CarrierFreq,
//struct MasterInformationBlock_NB__operationModeInfo_r13 operationModeInfo); uint32_t ul_CarrierFreq,
uint16_t prb_index, // NB_IoT_RB_ID,
uint16_t operating_mode,
uint16_t control_region_size,
uint16_t eutra_NumCRS_ports);
/*NB_phy_config_sib1_eNB is not needed since NB-IoT use only FDD mode*/ /*NB_phy_config_sib1_eNB is not needed since NB-IoT use only FDD mode*/
......
...@@ -53,7 +53,12 @@ void NB_phy_config_mib_eNB( ...@@ -53,7 +53,12 @@ void NB_phy_config_mib_eNB(
int Ncp_UL, int Ncp_UL,
int p_eNB, int p_eNB,
uint32_t dl_CarrierFreq, uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq) { uint32_t ul_CarrierFreq,
uint16_t prb_index, // NB_IoT_RB_ID,
uint16_t operating_mode,
uint16_t control_region_size,
uint16_t eutra_NumCRS_ports)
{
/*Not sure if phy parameters should be initial here or not*/ /*Not sure if phy parameters should be initial here or not*/
/*the phy_config_mib_eNB as the entry point to allocate the context for L1. The RC contains the context for L1,L2. If RC.eNB is NULL, it hasn't been allocated earlier so we allocate it there.*/ /*the phy_config_mib_eNB as the entry point to allocate the context for L1. The RC contains the context for L1,L2. If RC.eNB is NULL, it hasn't been allocated earlier so we allocate it there.*/
...@@ -78,7 +83,7 @@ void NB_phy_config_mib_eNB( ...@@ -78,7 +83,7 @@ void NB_phy_config_mib_eNB(
fp = &RC.eNB[Mod_id][CC_id]->frame_parms; */ fp = &RC.eNB[Mod_id][CC_id]->frame_parms; */
NB_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms; //MP: PHY_VARS_eNB still to be modified NB_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms_nb_iot;
LOG_I(PHY,"Configuring MIB-NB for instance %d, CCid %d : (band %d,Nid_cell %d,p %d,DL freq %u)\n", LOG_I(PHY,"Configuring MIB-NB for instance %d, CCid %d : (band %d,Nid_cell %d,p %d,DL freq %u)\n",
Mod_id, CC_id, eutra_band, Nid_cell, p_eNB,dl_CarrierFreq); Mod_id, CC_id, eutra_band, Nid_cell, p_eNB,dl_CarrierFreq);
...@@ -91,11 +96,11 @@ void NB_phy_config_mib_eNB( ...@@ -91,11 +96,11 @@ void NB_phy_config_mib_eNB(
fp->nb_antenna_ports_eNB = p_eNB; //tx antenna port fp->nb_antenna_ports_eNB = p_eNB; //tx antenna port
fp->dl_CarrierFreq = dl_CarrierFreq; fp->dl_CarrierFreq = dl_CarrierFreq;
fp->ul_CarrierFreq = ul_CarrierFreq; fp->ul_CarrierFreq = ul_CarrierFreq;
//fp->operating mode (in-band, guard-band, out-of-band) fp->operating_mode = operating_mode; //see how are defined by FAPI structure
fp->NB_IoT_RB_ID = prb_index; //XXX to be better understand how should be managed
//fp->nb_rx_antenna_ports_eNB //fp->nb_rx_antenna_ports_eNB
//fp->prb_index (applicable only in guard band or in-band operating mode) indicates the prb index with regard to the middle prb in LTE system / delivered by MIB-NB fp->control_region_size = control_region_size; //(assume that this value is negative if not used)
//fp->eutraControlRegionSize (only if in-band operating mode) fp->eutra_NumCRS_ports = eutra_NumCRS_ports //(valid only for in-band operating mode with different PCI)
//fp->nb_CRS_ports (valid only for in-band operating mode with different PCI)
//TODO //TODO
......
...@@ -105,7 +105,14 @@ uint8_t generate_dci_top_NB(uint8_t Num_dci, ...@@ -105,7 +105,14 @@ uint8_t generate_dci_top_NB(uint8_t Num_dci,
if (dci_alloc[i].firstCCE>=0) { if (dci_alloc[i].firstCCE>=0) {
//encoding //encoding
e_ptr = generate_dci0(dci_alloc[i].dci_pdu,e+(72*dci_alloc[i].firstCCE),dci_alloc[i].dci_length,dci_alloc[i].L,dci_alloc[i].rnti); e_ptr = generate_dci0(
dci_alloc[i].dci_pdu, //we should pass the two DCI pdu (if exist)
//second pdu
//aggregation level
e+(72*dci_alloc[i].firstCCE),
dci_alloc[i].dci_length,
dci_alloc[i].L,
dci_alloc[i].rnti);
//new NB-IoT //new NB-IoT
npdcch_encoding_NB_IoT( npdcch_encoding_NB_IoT(
...@@ -131,11 +138,12 @@ uint8_t generate_dci_top_NB(uint8_t Num_dci, ...@@ -131,11 +138,12 @@ uint8_t generate_dci_top_NB(uint8_t Num_dci,
//NB-IoT-------------------------- //NB-IoT--------------------------
/* /*
* switch(npdcch_start_index) * switch(npdcch_start_index) (see mail)
*
* case 0 * case 0
* G = 272 * G = 304
* case 1 * case 1
* G = 248 * G = 240
* case 2 * case 2
* G = 224 * G = 224
* case 3 * case 3
...@@ -145,10 +153,10 @@ uint8_t generate_dci_top_NB(uint8_t Num_dci, ...@@ -145,10 +153,10 @@ uint8_t generate_dci_top_NB(uint8_t Num_dci,
npdcch_scrambling_NB_IoT( npdcch_scrambling_NB_IoT(
frame_parms, frame_parms,
npdcch, npdcch,
//G, //G,
//q = nf mod 2 (TS 36.211 ch 10.2.3.1) with nf = number of frame //q = nf mod 2 (TS 36.211 ch 10.2.3.1) with nf = number of frame
//slot_id //slot_id
); );
...@@ -174,6 +182,7 @@ uint8_t generate_dci_top_NB(uint8_t Num_dci, ...@@ -174,6 +182,7 @@ uint8_t generate_dci_top_NB(uint8_t Num_dci,
// This is the REG allocation algorithm from 36-211, second part of Section 6.8.5 // This is the REG allocation algorithm from 36-211, second part of Section 6.8.5
// there is a function to do the resource mapping function // there is a function to do the resource mapping function
//already done in the modulation in our NB-IoT implementaiton
return 0; return 0;
} }
...@@ -664,13 +664,41 @@ typedef struct PHY_VARS_eNB_s { ...@@ -664,13 +664,41 @@ typedef struct PHY_VARS_eNB_s {
//------------------------ //------------------------
// NB-IoT // NB-IoT
//------------------------ //------------------------
/*
* NUMBER_OF_UE_MAX_NB_IoT maybe in the future should be dynamic because could be very large and the memory may explode
* (is almost the indication of the number of UE context that we are storing at PHY layer)
*
* reasoning: the following data structure (ndlsch, nulsch ecc..) are used to store the context that should be transmitted in at least n+4 subframe later
* (the minimum interval between NPUSCH and the ACK for this)
* the problem is that in NB_IoT the ACK for the UPLINK is contained in the DCI through the NDI field (if this value change from the previous one then it means ACK)
* but may we could schedule this DCI long time later so may lots of contents shuld be stored (there is no concept of phich channel in NB-IoT)
* For the DL transmission the UE send a proper ACK/NACK message
*
* *the HARQ process should be killed when the NDI change
*
* *In the Structure for nulsch we should also store the information related to the subframe (because each time we should read it and understand what should be done
* in that subframe)
*
*/
/*
* TIMING
* the entire transmission and scheduling are done for the "subframe" concept but the subframe = proc->subframe_tx (that in reality is the subframe_rx +4)
* (see USER/lte-enb/wakeup_rxtx )
*
* Related to FAPI:
* DCI and DL_CONFIG.request (also more that 1) and MAC_PDU are transmitted in the same subframe (our assumption) so will be all contained in the schedule_response getting from the scheduler
* DCI0 and UL_CONFIG.request are transmitted in the same subframe (our assumption) so contained in the schedule_response
*
*/
NB_IoT_eNB_NPBCH npbch; NB_IoT_eNB_NPBCH npbch;
NB_IoT_eNB_NPDCCH_t *npdcch[NUMBER_OF_UE_MAX_NB_IoT]; //check the max size of this array NB_IoT_eNB_NPDCCH_t *npdcch[NUMBER_OF_UE_MAX_NB_IoT]; //check the max size of this array
NB_IoT_eNB_NDLSCH_t *ndlsch[NUMBER_OF_UE_MAX_NB_IoT]; NB_IoT_eNB_NDLSCH_t *ndlsch[NUMBER_OF_UE_MAX_NB_IoT];
NB_IoT_eNB_NULSCH_t *nulsch[NUMBER_OF_UE_MAX_NB_IoT+1] //nulsch[0] contains the RAR NB_IoT_eNB_NULSCH_t *nulsch[NUMBER_OF_UE_MAX_NB_IoT+1]; //nulsch[0] contains the RAR
NB_IoT_eNB_NDLSCH_t *dlsch_SI_NB,*dlsch_ra_NB;
NB_IoT_eNB_NDLSCH_t *dlsch_SI_NB,*dlsch_ra_NB;
NB_DL_FRAME_PARMS frame_parms_nb_iot; NB_DL_FRAME_PARMS frame_parms_nb_iot;
DCI_PDU_NB DCI_pdu; DCI_PDU_NB DCI_pdu;
......
...@@ -299,25 +299,6 @@ typedef struct eNB_proc_NB_t_s { ...@@ -299,25 +299,6 @@ typedef struct eNB_proc_NB_t_s {
} eNB_proc_NB_t; } eNB_proc_NB_t;
/// Top-level PHY Data Structure for eNB
typedef struct PHY_VARS_eNB_NB_s {
/// Module ID indicator for this instance
module_id_t Mod_id;
uint8_t CC_id;
eNB_proc_NB_t proc;
NB_DL_FRAME_PARMS frame_parms;
NB_IoT_eNB_NPBCH npbch;
//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;
} PHY_VARS_eNB_NB;
#include "PHY/INIT/defs.h" #include "PHY/INIT/defs.h"
#include "PHY/LTE_REFSIG/defs.h" #include "PHY/LTE_REFSIG/defs.h"
......
...@@ -587,8 +587,6 @@ typedef struct { ...@@ -587,8 +587,6 @@ typedef struct {
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[MAX_MBSFN_AREA]; struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[MAX_MBSFN_AREA];
//NB-iot to be transfer in the new structure
unsigned short NB_IoT_RB_ID;
} LTE_DL_FRAME_PARMS; } LTE_DL_FRAME_PARMS;
......
...@@ -226,6 +226,40 @@ typedef struct { ...@@ -226,6 +226,40 @@ typedef struct {
// CE level to determine the NPRACH Configuration (one CE for each NPRACH config.) // CE level to determine the NPRACH Configuration (one CE for each NPRACH config.)
uint8_t CE; uint8_t CE;
/*
* index of the PRB assigned to NB-IoT carrier in in-band/guard-band operating mode
*/
unsigned short NB_IoT_RB_ID;
/*Following FAPI approach:
* 0 = in-band with same PCI
* 1 = in-band with diff PCI
* 2 = guard band
* 3 =stand alone
*/
uint16_t operating_mode;
/*
* Only for In-band operating mode with same PCI
* its measured in number of OFDM symbols
* allowed values:
* 1, 2, 3, 4(this value is written in FAPI specs but not exist in TS 36.331 v14.2.1 pag 587)
* -1 (we put this value when is not defined - other operating mode)
*/
uint16_t control_region_size;
/*Number of EUTRA CRS antenna ports (AP)
* valid only for in-band different PCI mode
* value 0 = indicates the same number of AP as NRS APs
* value 1 = four CRS APs
*/
uint16_t eutra_NumCRS_ports;
} NB_DL_FRAME_PARMS; } NB_DL_FRAME_PARMS;
#define NPBCH_A 34 #define NPBCH_A 34
......
...@@ -78,4 +78,7 @@ extern fifo_dump_emos_eNB emos_dump_eNB; ...@@ -78,4 +78,7 @@ extern fifo_dump_emos_eNB emos_dump_eNB;
#endif #endif
*/ */
extern Sched_Rsp_t* Sched_Rsp;
#endif /*__SCHED_EXTERN_H__ */ #endif /*__SCHED_EXTERN_H__ */
...@@ -911,7 +911,13 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC ...@@ -911,7 +911,13 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC
T_INT(dci_alloc->firstCCE)); T_INT(dci_alloc->firstCCE));
} }
void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *dlsch, LTE_eNB_DLSCH_t *dlsch1,LTE_eNB_UE_stats *ue_stats,int ra_flag,int num_pdcch_symbols) { void pdsch_procedures(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
LTE_eNB_DLSCH_t *dlsch,
LTE_eNB_DLSCH_t *dlsch1,
LTE_eNB_UE_stats *ue_stats,
int ra_flag,
int num_pdcch_symbols) {
int frame=proc->frame_tx; int frame=proc->frame_tx;
int subframe=proc->subframe_tx; int subframe=proc->subframe_tx;
...@@ -1017,6 +1023,11 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d ...@@ -1017,6 +1023,11 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
*/ */
/*this for MSG3*/
//the problem of OAI is that i don't have any DCI0 for scheduling the info for getting Msg3 (because is direclty given in RAR)
//so i should gather the information directly form RAR before sending it
//In FAPI style apporach so we directly get it from the next UL-config given in the Sched_rsp
//so most probably i don't care about it because i will receive all the information for get Msg3
generate_eNB_ulsch_params_from_rar(DLSCH_pdu, generate_eNB_ulsch_params_from_rar(DLSCH_pdu,
frame, frame,
subframe, subframe,
...@@ -1432,7 +1443,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1432,7 +1443,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
// Check for SI activity // Check for SI activity
//MP: eNB->dlsch_SI->active is set by the function generate_dlsch_params_from_dci (depending on the DCI content)
if ((eNB->dlsch_SI) && (eNB->dlsch_SI->active == 1)) { if ((eNB->dlsch_SI) && (eNB->dlsch_SI->active == 1)) {
pdsch_procedures(eNB,proc,eNB->dlsch_SI,(LTE_eNB_DLSCH_t*)NULL,(LTE_eNB_UE_stats*)NULL,0,num_pdcch_symbols); pdsch_procedures(eNB,proc,eNB->dlsch_SI,(LTE_eNB_DLSCH_t*)NULL,(LTE_eNB_UE_stats*)NULL,0,num_pdcch_symbols);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define SCH_PAYLOAD_SIZE_MAX 4096 #define SCH_PAYLOAD_SIZE_MAX 4096
#define BCCH_PAYLOAD_SIZE_MAX 128 #define BCCH_PAYLOAD_SIZE_MAX 128
#define NUMBER_OF_UE_MAX 20
// P5 FAPI-like configuration structures // P5 FAPI-like configuration structures
...@@ -60,6 +60,10 @@ typedef struct{ ...@@ -60,6 +60,10 @@ typedef struct{
int get_COMMON; int get_COMMON;
int get_DEDICATED; int get_DEDICATED;
//ID of the Resource Block dedicated to NB-IoT
//For Nb-IoT only a restricted values of PRB indexes are allowed (see Rhode&Shwartz pag9)
//unsigned short NB_IoT_RB_ID; (should coincide with PRB index)
//In FAPI specs --> is inside the nb_iot_rssi_request (P4 Network Monitor Mode procedure) //In FAPI specs --> is inside the nb_iot_rssi_request (P4 Network Monitor Mode procedure)
//In OAI is called eutra_band //In OAI is called eutra_band
uint8_t frequency_band_indicator; //parameter carried by the SIB1-NB, is and index of the Table 5.5-1 TS 36.101 uint8_t frequency_band_indicator; //parameter carried by the SIB1-NB, is and index of the Table 5.5-1 TS 36.101
......
...@@ -154,11 +154,9 @@ int NB_rrc_mac_config_req_eNB( ...@@ -154,11 +154,9 @@ int NB_rrc_mac_config_req_eNB(
LogicalChannelConfig_NB_r13_t *logicalChannelConfig //FIXME: decide how to use it LogicalChannelConfig_NB_r13_t *logicalChannelConfig //FIXME: decide how to use it
) )
{ {
//no ul_Bandwidth
//------------ /*to review with the Raymond implementation*/
PHY_Config_t *config_INFO; //TODO should be seen as a global variable (who initialize this???)
//------------
int UE_id = -1; int UE_id = -1;
//eNB_MAC_INST_NB *eNB = &eNB_mac_inst_NB[Mod_idP]; //eNB_MAC_INST_NB *eNB = &eNB_mac_inst_NB[Mod_idP];
...@@ -181,7 +179,6 @@ int NB_rrc_mac_config_req_eNB( ...@@ -181,7 +179,6 @@ int NB_rrc_mac_config_req_eNB(
//mac_top_init_eNB(); //TODO MP: to be included in the MAC/main.c //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].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].physCellId = physCellId;
...@@ -225,28 +222,37 @@ int NB_rrc_mac_config_req_eNB( ...@@ -225,28 +222,37 @@ int NB_rrc_mac_config_req_eNB(
//FAPI specs pag 135 //FAPI specs pag 135
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13: case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13:
config_INFO->nb_iot_config.operating_mode.value = 0; config_INFO->nb_iot_config.operating_mode.value = 0;
config_INFO->nb_iot_config.prb_index.value = mib_NB->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13; config_INFO->nb_iot_config.prb_index.value = mib_NB->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13; //see TS 36.213 ch 16.0
config_INFO->nb_iot_config.assumed_crs_aps.value = -1; //is not defined so we put a negative value config_INFO->nb_iot_config.assumed_crs_aps.value = -1; //is not defined so we put a negative value
if(eutraControlRegionSize == NULL) if(eutraControlRegionSize == NULL)
LOG_E(RRC, "NB_rrc_mac_config_req_eNB: operation mode is in-band but eutraControlRegionSize is not defined"); LOG_E(RRC, "NB_rrc_mac_config_req_eNB: operation mode is in-band but eutraControlRegionSize is not defined");
else else
config_INFO->nb_iot_config.control_region_size.value = *eutraControlRegionSize; config_INFO->nb_iot_config.control_region_size.value = *eutraControlRegionSize;
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13: case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13:
config_INFO->nb_iot_config.operating_mode.value = 1; config_INFO->nb_iot_config.operating_mode.value = 1;
//XXX problem: fapi think to define also eutra_CRS_sequenceInfo also for in band with different PCI but the problem is that we don-t have it
//config_INFO->nb_iot_config.prb_index.value = mib_NB->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13 XXX (see FAPI specs pag 135) //config_INFO->nb_iot_config.prb_index.value = mib_NB->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13 XXX (see FAPI specs pag 135)
config_INFO->nb_iot_config.assumed_crs_aps.value = mib_NB->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13.eutra_NumCRS_Ports_r13; config_INFO->nb_iot_config.assumed_crs_aps.value = mib_NB->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13.eutra_NumCRS_Ports_r13;
if(eutraControlRegionSize == NULL) if(eutraControlRegionSize == NULL)
LOG_E(RRC, "NB_rrc_mac_config_req_eNB: operation mode is in-band but eutraControlRegionSize is not defined"); LOG_E(RRC, "NB_rrc_mac_config_req_eNB: operation mode is in-band but eutraControlRegionSize is not defined");
else else
config_INFO->nb_iot_config.control_region_size.value = *eutraControlRegionSize; config_INFO->nb_iot_config.control_region_size.value = *eutraControlRegionSize;
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13: case MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13:
config_INFO->nb_iot_config.operating_mode.value = 2; config_INFO->nb_iot_config.operating_mode.value = 2;
//config_INFO->nb_iot_config.prb_index = mib_NB->message.operationModeInfo_r13.choice.guardband_r13 XXX (see FAPI specs pag 135)
//XXX problem: fapi think to define also eutra_CRS_sequenceInfo also for in band with different PCI but the problem is that we don-t have it
//config_INFO->nb_iot_config.prb_index = mib_NB->message.operationModeInfo_r13.choice.guardband_r13; XXX (see FAPI specs pag 135)
config_INFO->nb_iot_config.control_region_size.value = -1; //should not being defined so we put a negative value config_INFO->nb_iot_config.control_region_size.value = -1; //should not being defined so we put a negative value
config_INFO->nb_iot_config.assumed_crs_aps.value = -1; //is not defined so we put a negative value config_INFO->nb_iot_config.assumed_crs_aps.value = -1; //is not defined so we put a negative value
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13: case MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13:
config_INFO->nb_iot_config.operating_mode.value = 3; config_INFO->nb_iot_config.operating_mode.value = 3;
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
extern eNB_RRC_INST_NB *eNB_rrc_inst_NB; extern eNB_RRC_INST_NB *eNB_rrc_inst_NB;
extern PHY_Config_t *config_INFO;
extern rlc_info_t Rlc_info_am_NB,Rlc_info_am_config_NB; extern rlc_info_t Rlc_info_am_NB,Rlc_info_am_config_NB;
extern uint8_t DRB2LCHAN_NB[2]; extern uint8_t DRB2LCHAN_NB[2];
......
...@@ -1620,6 +1620,12 @@ init_SI_NB( ...@@ -1620,6 +1620,12 @@ init_SI_NB(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
/*WE should allocate memory for PHY_Config structure
* is declared in vars_nb_iot.c and put also in the extern_nb_iot
* */
config_INFO = malloc(sizeof(PHY_Config_t));
// uint8_t SIwindowsize = 1; //frame // uint8_t SIwindowsize = 1; //frame
// uint16_t SIperiod = 8; // in frames // uint16_t SIperiod = 8; // in frames
......
...@@ -69,6 +69,9 @@ unsigned short Data_to_read; ...@@ -69,6 +69,9 @@ unsigned short Data_to_read;
eNB_RRC_INST_NB *eNB_rrc_inst_NB; eNB_RRC_INST_NB *eNB_rrc_inst_NB;
uint8_t DRB2LCHAN_NB[2];//max can be 2 DRBs for NB_IoT --> it used for saving the LCID of DRBs uint8_t DRB2LCHAN_NB[2];//max can be 2 DRBs for NB_IoT --> it used for saving the LCID of DRBs
//structure for FAPI-like configuration
PHY_Config_t *config_INFO;
BOOLEAN_t logicalChannelSR_Prohibit = 1; BOOLEAN_t logicalChannelSR_Prohibit = 1;
long priority =1; long priority =1;
......
...@@ -28,6 +28,6 @@ ...@@ -28,6 +28,6 @@
#endif #endif
#define NUMBER_OF_UE_MAX_NB_IoT 1 #define NUMBER_OF_UE_MAX_NB_IoT 16
#endif /* OPENAIRINTERFACE5G_LIMITS_H_ */ #endif /* OPENAIRINTERFACE5G_LIMITS_H_ */
...@@ -575,10 +575,13 @@ int wait_CCs(eNB_rxtx_proc_t *proc) { ...@@ -575,10 +575,13 @@ int wait_CCs(eNB_rxtx_proc_t *proc) {
return(0); return(0);
} }
/*NB-IoT rxtx*/ /*NB-IoT rxtx
* IMPORTANT
* When we run the rxtx thread for NB-IoT we should not run at the same time otherwise we fill the same buffers in PHY_Vars_eNB
* */
static inline int NB_rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_name) { static inline int NB_rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_name) {
UL_IND_t UL_INFO; //not here but temp
start_meas(&softmodem_stats_rxtx_sf); start_meas(&softmodem_stats_rxtx_sf);
...@@ -589,14 +592,12 @@ static inline int NB_rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_ ...@@ -589,14 +592,12 @@ static inline int NB_rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_
eNB->do_prach(eNB,proc->frame_rx,proc->subframe_rx); eNB->do_prach(eNB,proc->frame_rx,proc->subframe_rx);
// skip the comment for this moment // skip the comment for this moment
// phy_procedures_eNB_common_RX(eNB,proc);
// UE-specific RX processing for subframe n /*UE-specific RX processing for subframe n*/
NB_phy_procedures_eNB_uespec_RX(eNB,proc); NB_phy_procedures_eNB_uespec_RX(eNB,proc);
// After stored the Upink information, process it and made it into FAPI style, also provide a tick to the scheduler // After stored the Upink information, process it and made it into FAPI style, send the UL_Indication to higher layer that also provide a tick to the scheduler
if(if_inst->UL_indication) if_inst->UL_indication(UL_INFO); if(if_inst->UL_indication) if_inst->UL_indication(UL_INFO);
...@@ -1243,6 +1244,7 @@ void rx_fh_slave(PHY_VARS_eNB *eNB,int *frame,int *subframe) { ...@@ -1243,6 +1244,7 @@ void rx_fh_slave(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
int wakeup_rxtx(eNB_proc_t *proc,eNB_rxtx_proc_t *proc_rxtx,LTE_DL_FRAME_PARMS *fp) { int wakeup_rxtx(eNB_proc_t *proc,eNB_rxtx_proc_t *proc_rxtx,LTE_DL_FRAME_PARMS *fp) {
int i; int i;
struct timespec wait; struct timespec wait;
......
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