Commit 0fffe1a3 authored by Michele Paffetti's avatar Michele Paffetti

introduction of some UE-specific parameters for NPDCCH (Seems missing in FAPI...

introduction of some UE-specific parameters for NPDCCH (Seems missing in FAPI for the moment). Code copile, 149 warnings
parent 0d3345f3
......@@ -71,7 +71,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
void NB_phy_config_dedicated_eNB(module_id_t Mod_id,
int CC_id,
rnti_t rnti,
PhysicalConfigDedicated_NB_r13_t *physicalConfigDedicated);
extra_phyConfigCommon_t* extra_phy_parms);
......
......@@ -77,7 +77,7 @@ void NB_phy_config_mib_eNB(
fp->Ncp = Ncp;
fp->Ncp_UL = Ncp_UL;
fp->nb_antenna_ports_eNB = p_eNB; //tx antenna port
fp->dl_CarrierFreq = from_earfcn(eutra_band,EARFCN);
fp->dl_CarrierFreq = from_earfcn(eutra_band,EARFCN,0);
fp->ul_CarrierFreq = fp->dl_CarrierFreq - get_uldl_offset(eutra_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
......@@ -86,7 +86,7 @@ void NB_phy_config_mib_eNB(
fp->eutra_NumCRS_ports = eutra_NumCRS_ports; //(valid only for in-band operating mode with different PCI)
//TODO for nb-iot ??? (new Raymond implementation) in the classic implementation seems to be used only by oaisim
//TODO (new Raymond implementation) in the classic implementation seems to be used only by oaisim
//init_frame_parms(fp,1);
//init_lte_top(fp);
......@@ -200,7 +200,6 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
LOG_D(PHY,"[eNB%d] CCid %d: Applying nb_iot_config from sib2_NB\n",Mod_id,CC_id);
/*NPRACH_ConfigSIB_NB_r13----------------------------------------------------------*/
//NPRACH_ConfigSIB_NB_r13_t a;
//MP: FAPI style approach: instead of a list they consider the 3 possible configuration separately
......@@ -328,7 +327,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
//fp->npusch_config_common.srs_SubframeConfig /*OPTIONAL*/
//TODO:should change the part that implement the ul hopping in NB-IoT
//TODO:should change the part that implement the ul hopping in NB-IoT?? (
//init_ul_hopping(fp);
......@@ -357,9 +356,11 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
void NB_phy_config_dedicated_eNB(uint8_t Mod_id,
int CC_id,
uint16_t rnti,
struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated)
extra_phyConfigCommon_t *extra_parms
)
{
PHY_VARS_eNB *eNB = PHY_vars_eNB_g[Mod_id][CC_id];
NB_IoT_eNB_NPDCCH_t *npdcch;
uint8_t UE_id = find_ue(rnti,eNB);
if (UE_id == -1) {
......@@ -367,10 +368,17 @@ void NB_phy_config_dedicated_eNB(uint8_t Mod_id,
return;
}
/*physicalconfigDedicated is defined in PHY_VARS_eNB in defs.h in PHY layer*/
if (physicalConfigDedicated) {
eNB->phy_config_dedicated_NB[UE_id] = physicalConfigDedicated;
LOG_I(PHY,"NB_phy_config_dedicated_eNB: physicalConfigDedicated=%p\n",physicalConfigDedicated);
//configure UE specific parameters for NPDCCH Search Space
if (eNB->npdcch[UE_id]) {
npdcch = eNB->npdcch[UE_id];
npdcch->rnti = rnti;
npdcch->npdcch_NumRepetitions = extra_parms->npdcch_NumRepetitions;
npdcch->npdcch_Offset_USS = extra_parms->npdcch_Offset_USS;
npdcch->npdcch_StartSF_USS = extra_parms->npdcch_StartSF_USS;
LOG_I(PHY,"NB_phy_config_dedicated_eNB: npdcch_NumRepetitions = %d, npdcch_Offset_USS = %d, npdcch_StartSF_USS = %d\n",
npdcch->npdcch_NumRepetitions, npdcch->npdcch_Offset_USS, npdcch->npdcch_StartSF_USS);
} else {
LOG_E(PHY,"[eNB %d] Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id, UE_id);
......
......@@ -821,11 +821,17 @@ typedef enum
typedef struct {
rnti_t rnti;
//array containing the pdus of DCI
uint8_t *a[2];
//Array containing encoded DCI data
uint8_t *e[2];
//UE specific parameters
uint16_t npdcch_NumRepetitions;
uint16_t npdcch_Offset_USS;
uint16_t npdcch_StartSF_USS;
}NB_IoT_eNB_NPDCCH_t;
......
......@@ -703,7 +703,7 @@ typedef struct PHY_VARS_eNB_s {
*/
NB_IoT_eNB_NPBCH *npbch;
NB_IoT_eNB_NPDCCH_t *npdcch; //check if should be an array and the max size of this array
NB_IoT_eNB_NPDCCH_t *npdcch[NUMBER_OF_UE_MAX_NB_IoT]; //check if should be an array and the max size of this array
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_NDLSCH_t *ndlsch_SI,*ndlsch_ra, *ndlsch_SIB1;
......
......@@ -349,14 +349,12 @@ void PHY_config_req(PHY_Config_t* config_INFO){
if(config_INFO->get_DEDICATED!= 0)
{
//Dedicated Configuration
if(config_INFO->phy_config_dedicated != NULL){
NB_phy_config_dedicated_eNB(config_INFO->mod_id,
config_INFO->CC_id,
config_INFO->rnti,
config_INFO->phy_config_dedicated //not defined by fapi specs
&config_INFO->extra_phy_parms
);
}
}
}
......
......@@ -930,6 +930,7 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
uint32_t ul_frame;
int **txdataF = eNB->common_vars.txdataF[0];
uint32_t sib1_startFrame = -1;
NB_IoT_eNB_NPDCCH_t*npdcch;
......@@ -1194,9 +1195,17 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
*
* ***whenever we have aggretation level = 1 for UE-specific the R is always = 1 (see table 16.6-1)
*
*s
*
* */
//XXX we should check which npdcch structure we have to pass
//assume that the [0] is used for common search space
// for(int i = UE_id; i < NUMBER_OF_UE_MAX_NB_IoT; UE_id++)
// {
// if(eNB->npdcch[(uint8_t)UE_id] != NULL && eNB->npdcch[(uint8_t)UE_id]->rnti == dci_pdu->dci_alloc )
// }
generate_dci_top_NB(
eNB->npdcch,
dci_pdu->Num_dci,
......
......@@ -21,7 +21,13 @@
// P5 FAPI-like configuration structures-------------------------------------------------------------------------------
/*MP: MISSED COMMON CONFIG. of SIB2-NB in FAPI SPECS (may non needed)*/
/*MP: MISSED COMMON CONFIG. of SIB2-NB in FAPI SPECS
* some of them may not needed because are used only at UE side
* some of them are not needed because not necessary at PHY level
* other have to be clarified since seems to be needed at PHY layer
* there is no UE_Config. request message carrying NB-IoT parameters???
*
* */
typedef struct{
//nprach_config
uint16_t nprach_config_0_subcarrier_MSG3_range_start;
......@@ -30,18 +36,23 @@ typedef struct{
uint16_t nprach_config_0_max_num_preamble_attempt_CE;
uint16_t nprach_config_1_max_num_preamble_attempt_CE;
uint16_t nprach_config_2_max_num_preamble_attempt_CE;
uint16_t nprach_config_0_npdcch_num_repetitions_RA;
uint16_t nprach_config_0_npdcch_num_repetitions_RA; //Rmax (see TS 36.213 ch 16.6)
uint16_t nprach_config_1_npdcch_num_repetitions_RA;
uint16_t nprach_config_2_npdcch_num_repetitions_RA;
uint16_t nprach_config_0_npdcch_startSF_CSS_RA;
uint16_t nprach_config_0_npdcch_startSF_CSS_RA; //G (see TS 36.213 ch 16.6)
uint16_t nprach_config_1_npdcch_startSF_CSS_RA;
uint16_t nprach_config_2_npdcch_startSF_CSS_RA;
uint16_t nprach_config_0_npdcch_offset_RA;
uint16_t nprach_config_0_npdcch_offset_RA; //Alfa_offset (see TS 36.213 ch 16.6)
uint16_t nprach_config_1_npdcch_offset_RA;
uint16_t nprach_config_2_npdcch_offset_RA;
//npusch ConfigCommon (carried by the NULSCH PDU in FAPI--> so maybe not a static parameter)
//not used
//configured through the phy_config_dedicated
//Higher layer parameter for NPDCCH UE-spec search space
uint16_t npdcch_NumRepetitions;//Rmax (see TS 36.213 ch 16.6)
uint16_t npdcch_StartSF_USS; //G (see TS 36.213 ch 16.6)
uint16_t npdcch_Offset_USS; //Alfa_offset (see TS 36.213 ch 16.6)
ACK_NACK_NumRepetitions_NB_r13_t *ack_nack_numRepetitions_MSG4; //pointer to the first cell of a list of ack_nack_num_repetitions
//ulPowerControlCommon (UE side)
......@@ -49,6 +60,16 @@ typedef struct{
uint16_t alpha;
uint16_t delta_preamle_MSG3;
/*Dedicated configuration -->not supported by FAPI (may not needed)
* In OAI at least are needed when we manage the phy_procedures_eNB_TX in which we call the phy_config_dedicated_eNB_step2
* that use the physicalConfigDedicated info previously stored in the PHY_VARS_eNB structure through the phy_config_dedicated procedure
*/
PhysicalConfigDedicated_NB_r13_t *phy_config_dedicated;
}extra_phyConfigCommon_t;
typedef struct{
......@@ -65,37 +86,23 @@ typedef struct{
//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 3GPP specs (TS 36.101 Table 5.7.3-1 and ch 5.7.3F) see also SIB2-NB freqInfo.ul-carrierFreq
//this parameters should be evaluated based of the EUTRA Absolute Radio Frequency Channel Number (EARFCN)
//in FAPI this value is given inside the BROADCAST DETECT request (P4 Network Monitor Mode procedure)
//in OAI we set the dl_CarrierFrequenci at configuration time (see COMMON/rrc_messages_types.h)
//then adding an offset for the ul_CarrierFreq ( see RU-RAU split approach - init_SI)
//uint32_t dl_CarrierFreq;
//uint32_t ul_CarrierFreq; --> problem solved since we directly evaluate the EARFCN has requested by FAPI specs
/*FAPI style config. parameters
/*FAPI useful config. parameters used in the code
*
* useful config message contents:
* -nfapi_uplink_reference_signal_config_t uplink_reference_signal_config
* -nfapi_subframe_config_t subframe_config;
* -nfapi_rf_config_t rf_config;
* -nfapi_sch_config_t sch_config;
* -nfapi_nb_iot_config_t nb_iot_config;
* -nfapi_l23_config_t l23_config;
* -nfapi_config --> EARFCN
*
* -nfapi_config --> EARFCN (for the transport of the dl_CarrierFreq
* */
//XXX where allocate memory??
nfapi_config_request_t* cfg;
/*Dedicated configuration -->not supported by FAPI (may not needed)
* In OAI at least are needed when we manage the phy_procedures_eNB_TX in which we call the phy_config_dedicated_eNB_step2
* that use the physicalConfigDedicated info previously stored in the PHY_VARS_eNB structure through the phy_config_dedicated procedure
*/
PhysicalConfigDedicated_NB_r13_t *phy_config_dedicated;
/*MP: MISSED COMMON CONFIG. of SIB2-NB in FAPI SPECS (may non needed)*/
extra_phyConfigCommon_t extra_phy_parms;
......
......@@ -123,6 +123,12 @@ extern void (*rlc_rrc_data_conf)(
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Most of the Functions re-defined for NB-IoT should be re-located in their proper position over the code as already indicated the comments//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*---------------------------------RRC-MAC-----------------------------------*/
......@@ -147,15 +153,16 @@ typedef struct band_info_s {
} band_info_t;
//TS 36.101 Table 7.7.3-1 for the EARFCN values (Last column of the table Noff_DL = lowest defined EARFCN value for the corresponfing band)
//TS 36.101 Table 7.7.3-1 for the EARFCN values (Last column of the table Noff_DL = lowest defined EARFCN value for the corresponding band)
//TS 36.101 Table 5.5-1 for the Operating bands + 5.5F for the operating bands of category NB1 and NB2
//frequency are in 100KHz in order to consider all unsigned int
static const eutra_bandentry_NB_t eutra_bandtable[] = {
//[BAND] [FUL_low] [FUL_hi] [FDL_low] [FDL_hig] [NOFF_DL]
{ 1, 19200, 19800, 21100, 21700, 0},
{ 2, 18500, 19100, 19300, 19900, 6000},
{ 3, 17100, 17850, 18050, 18800, 12000},
{ 5, 8240, 8490, 8690, 8940, 24000},
{ 8, 8800, 9150 , 9250, 9600, 34500},
{ 8, 8800, 9150, 9250, 9600, 34500},
{11, 14279, 14529, 14759, 15009, 47500},
{12, 6980, 7160, 7280, 7460, 50100},
{13, 7770, 7870, 7460, 7560, 51800},
......@@ -164,11 +171,11 @@ static const eutra_bandentry_NB_t eutra_bandtable[] = {
{19, 8300, 8450, 8750, 8900, 60000},
{20, 8320, 8620, 7910, 8210, 61500},
{25, 18500, 19150, 19300, 19950, 80400},
{26, 8140 , 8490, 8590, 8940, 86900},
{28, 7030 , 7580, 7580, 8130, 92100},
{31, 45250, 34900, 46250, 35900, 98700}, //may should add a "0" at the end of N_OFFS_DL
{66, 17100, 18000, 21100, 22000, 66436},//may should add a "0" at the end of N_OFFS_DL
{70, 16950 , 17100 , 19950, 20200, 68336}};//may should add a "0" at the end of N_OFFS_DL
{26, 8140, 8490, 8590, 8940, 86900},
{28, 7030, 7580, 7580, 8130, 92100},
{31, 45250, 34900, 46250, 35900, 98700},
{66, 17100, 18000, 21100, 22000, 664360},
{70, 16950 , 17100, 19950, 20200, 683360}}; //may not used for Rel.13 equipment
uint32_t to_earfcn(int eutra_bandP,uint32_t dl_CarrierFreq, float m_dl) {
......@@ -176,7 +183,7 @@ uint32_t to_earfcn(int eutra_bandP,uint32_t dl_CarrierFreq, float m_dl) {
int i;
AssertFatal(eutra_bandP < 69,"eutra_band %d > 68\n",eutra_bandP);
AssertFatal(eutra_bandP < 70,"eutra_band %d > 70\n",eutra_bandP);
for (i=0;i<69 && eutra_bandtable[i].band!=eutra_bandP;i++);
AssertFatal(dl_CarrierFreq_by_100k>=eutra_bandtable[i].dl_min,
......@@ -193,11 +200,14 @@ uint32_t to_earfcn(int eutra_bandP,uint32_t dl_CarrierFreq, float m_dl) {
return(dl_CarrierFreq_by_100k - eutra_bandtable[i].dl_min - 0.0025*(2*m_dl+ 1)+ (eutra_bandtable[i].N_OFFs_DL/10));
}
uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn) {
//PROBLEM: for UE category NB1 and NB2 the introduction of the offset (m_dl) may create some problems in the reconstruction of the dl_CarrierFreq
//this function is used in phy_config_mib_NB for getting the DL Carrier Frequency from the EARFCN
uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn, float m_dl) {
int i;
float m_dl = 0; //for the moment we fix but maybe should be dynamic (anyway the 0 works for any case)
// float m_dl = 0; //for the moment we fix but maybe should be dynamic (anyway the 0 works for any case)
AssertFatal(eutra_bandP <= 70,"eutra_band %d > 70\n",eutra_bandP);
for (i=0;i<= 70 && eutra_bandtable[i].band!=eutra_bandP;i++);
......@@ -233,7 +243,7 @@ void config_mib_NB_fapi(
//receive NSSS, NPSSS ecc... but the RRCConnectionReconfiguration may could indicate non-anchor carrier to be used for data transmission
//ASSUMPTION: we always use an anchor carrier
float m_dl = 0; //this is the category offset for NB1/NB2 UE category used for EARFCN evaluation (TS 36.101 ch. 5.7.3F)
float m_dl = 0; //this is the category offset for NB1/NB2 UE category used for EARFCN evaluation (TS 36.101 ch. 5.7.3F) (for the moment we keep this value fixed)
config_INFO->get_MIB = 1;
config_INFO->rnti = rntiP;
config_INFO->cfg->nfapi_config.rf_bands.rf_band[0] = (uint16_t)eutra_band;
......@@ -263,15 +273,16 @@ void config_mib_NB_fapi(
config_INFO->cfg->nb_iot_config.control_region_size.value = *eutraControlRegionSize;
m_dl = NB_Category_Offset_anchor[rand()%4];
//m_dl = NB_Category_Offset_anchor[rand()%4];
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13:
config_INFO->cfg->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)
//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 i
//XXX should pass the prb_index may defined by configuration file depending on the LTE band we are considering (see Rhode&Shwartz whitepaper pag9)
//config_INFO->nb_iot_config.prb_index.value =
config_INFO->cfg->nb_iot_config.assumed_crs_aps.value = mib_NB->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13.eutra_NumCRS_Ports_r13;
......@@ -281,32 +292,32 @@ void config_mib_NB_fapi(
config_INFO->cfg->nb_iot_config.control_region_size.value = *eutraControlRegionSize;
m_dl = NB_Category_Offset_anchor[rand()%4];
//m_dl = NB_Category_Offset_anchor[rand()%4];
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13:
config_INFO->cfg->nb_iot_config.operating_mode.value = 2;
//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)
//XXX should pass the prb_index may defined by configuration file depending on the LTE band we are considering (see Rhode&Shwartz whitepaper pag9)
//config_INFO->nb_iot_config.prb_index.value =
config_INFO->cfg->nb_iot_config.control_region_size.value = -1; //should not being defined so we put a negative value
config_INFO->cfg->nb_iot_config.assumed_crs_aps.value = -1; //is not defined so we put a negative value
m_dl = NB_Category_Offset_anchor[rand()%4];
//m_dl = NB_Category_Offset_anchor[rand()%4];
break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13:
config_INFO->cfg->nb_iot_config.operating_mode.value = 3;
config_INFO->cfg->nb_iot_config.prb_index.value = -1; // is not defined for this case (put a negative value)
config_INFO->cfg->nb_iot_config.prb_index.value = -1; // is not defined for this case (put a negative random value--> will be not considered for encoding, scrambling procedures)
config_INFO->cfg->nb_iot_config.control_region_size.value = -1;//is not defined so we put a negative value
config_INFO->cfg->nb_iot_config.assumed_crs_aps.value = -1; //is not defined so we put a negative value
m_dl = NB_Category_Offset_short[rand()%2];
//m_dl = NB_Category_Offset_short[rand()%2];
break;
default:
......@@ -326,6 +337,7 @@ void config_mib_NB_fapi(
void config_sib2_NB_fapi(
int physCellId,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
)
{
......@@ -349,6 +361,7 @@ void config_sib2_NB_fapi(
switch(radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.size)
{
case 0:
LOG_E(MAC, "nprach_ParametersLis is empty\n");
break;
case 1:
nprach_parameter = radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[0];
......@@ -359,6 +372,7 @@ void config_sib2_NB_fapi(
config_INFO->cfg->nb_iot_config.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->nb_iot_config.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->nb_iot_config.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
......@@ -377,6 +391,7 @@ void config_sib2_NB_fapi(
config_INFO->cfg->nb_iot_config.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->nb_iot_config.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->nb_iot_config.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
......@@ -394,6 +409,7 @@ void config_sib2_NB_fapi(
config_INFO->cfg->nb_iot_config.nprach_config_1_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->nb_iot_config.nprach_config_1_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->nb_iot_config.nprach_config_1_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_1_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_1_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
......@@ -411,6 +427,7 @@ void config_sib2_NB_fapi(
config_INFO->cfg->nb_iot_config.nprach_config_0_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->nb_iot_config.nprach_config_0_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->nb_iot_config.nprach_config_0_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_0_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_0_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
......@@ -428,6 +445,7 @@ void config_sib2_NB_fapi(
config_INFO->cfg->nb_iot_config.nprach_config_1_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->nb_iot_config.nprach_config_1_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->nb_iot_config.nprach_config_1_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_1_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_1_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
......@@ -445,6 +463,7 @@ void config_sib2_NB_fapi(
config_INFO->cfg->nb_iot_config.nprach_config_2_subcarrier_offset.value = nprach_parameter->nprach_SubcarrierOffset_r13;
config_INFO->cfg->nb_iot_config.nprach_config_2_number_of_subcarriers.value = nprach_parameter->nprach_NumSubcarriers_r13;
config_INFO->cfg->nb_iot_config.nprach_config_2_number_of_repetitions_per_attempt.value = nprach_parameter->numRepetitionsPerPreambleAttempt_r13;
//MP: missed configuration for FAPI-style structure (I have added on my own byt maybe are not needed)
config_INFO->extra_phy_parms.nprach_config_2_subcarrier_MSG3_range_start = nprach_parameter->nprach_SubcarrierMSG3_RangeStart_r13;
config_INFO->extra_phy_parms.nprach_config_2_max_num_preamble_attempt_CE = nprach_parameter->maxNumPreambleAttemptCE_r13;
......@@ -454,9 +473,9 @@ void config_sib2_NB_fapi(
//rsrp_ThresholdsPrachInfoList_r13 /*OPTIONAL*/
break;
break;
default:
LOG_E(RRC,"NB_rrc_mac_config_req_eNB: nprach_ParametersList size not valid\n");
break;
}
......@@ -476,15 +495,23 @@ void config_sib2_NB_fapi(
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_BaseSequence_r13!= NULL)
config_INFO->cfg->nb_iot_config.three_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_BaseSequence_r13);
else
config_INFO->cfg->nb_iot_config.three_tone_base_sequence.value = physCellId%12; //see spec TS 36.331 NPUSCH-Config-NB
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_BaseSequence_r13!= NULL)
config_INFO->cfg->nb_iot_config.six_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_BaseSequence_r13);
else
config_INFO->cfg->nb_iot_config.six_tone_base_sequence.value = physCellId%14; //see spec TS 36.331 NPUSCH-Config-NB
/* OPTIONAL */
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->twelveTone_BaseSequence_r13!= NULL)
config_INFO->cfg->nb_iot_config.twelve_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->twelveTone_BaseSequence_r13);
if(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->twelveTone_BaseSequence_r13!= NULL)
config_INFO->cfg->nb_iot_config.twelve_tone_base_sequence.value = *(radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->twelveTone_BaseSequence_r13);
else
config_INFO->cfg->nb_iot_config.twelve_tone_base_sequence.value = physCellId%30; //see spec TS 36.331 NPUSCH-Config-NB
config_INFO->cfg->nb_iot_config.three_tone_cyclic_shift.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_CyclicShift_r13;
config_INFO->cfg->nb_iot_config.six_tone_cyclic_shift.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_CyclicShift_r13;
config_INFO->cfg->nb_iot_config.three_tone_cyclic_shift.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->threeTone_CyclicShift_r13;
config_INFO->cfg->nb_iot_config.six_tone_cyclic_shift.value = radioResourceConfigCommon->npusch_ConfigCommon_r13.dmrs_Config_r13->sixTone_CyclicShift_r13;
}
......@@ -540,15 +567,12 @@ int NB_rrc_mac_config_req_eNB(
int p_rx_eNB,// number of eNB Rx antenna ports (1 or 2 for NB-IoT)
int Ncp,
int Ncp_UL,
//FIXME: frequencyBandIndicator (eutra_band) in sib1 (as Rymond Implementation) (is a long not an int!!)//XXX this param is set in the do_sib1_nb and is directly taken from the .config file
long eutra_band,
long eutra_band, //requencyBandIndicator (eutra_band) in sib1. this param is set in the do_sib1_nb and is directly taken from the .config file
struct NS_PmaxList_NB_r13 *frequencyBandInfo, //optional SIB1
struct MultiBandInfoList_NB_r13 *multiBandInfoList, //optional SIB1
struct DL_Bitmap_NB_r13 *dl_bitmap, //optional SIB1
long* eutraControlRegionSize, //optional sib1, is defined only when we are in in-band operation mode (same PCI or different PCI)
long* nrs_CRS_PoweSIwindowsizerOffset, //optional
// uint8_t *SIwindowsize, //maybe no more needed because TDD only
// uint16_t *SIperiod, //maybe no more needed because TDD only
uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq,
BCCH_BCH_Message_NB_t *mib_NB,
......@@ -652,7 +676,7 @@ int NB_rrc_mac_config_req_eNB(
if (ul_CarrierFreq>0) eNB_mac_inst_NB[Mod_idP].common_channels[CC_idP].ul_CarrierFreq = ul_CarrierFreq;
config_sib2_NB_fapi(radioResourceConfigCommon);
config_sib2_NB_fapi(physCellId,radioResourceConfigCommon);
}
......@@ -680,8 +704,17 @@ int NB_rrc_mac_config_req_eNB(
else
{
config_INFO->get_DEDICATED = 1;
//XXX this parameters seems to be not defined by FAPi specs
//this are UE specific information that should be transmitted to the PHY layer
//Possible implementation is to use UE-specific structure at phy layer where to store this information (NPDCCH structure) this structure will be scrambled based on the rnti
config_INFO->rnti = UE_RNTI(Mod_idP, UE_id);
config_INFO->phy_config_dedicated = physicalConfigDedicated; //for the moment fapi not allow this so not used
config_INFO->extra_phy_parms.npdcch_NumRepetitions = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13;
config_INFO->extra_phy_parms.npdcch_Offset_USS = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13;
config_INFO->extra_phy_parms.npdcch_StartSF_USS = physicalConfigDedicated->npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13;
//config_INFO->extra_phy_parms.phy_config_dedicated = physicalConfigDedicated; //for the moment fapi not allow this so not used
}
......
......@@ -550,7 +550,10 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
dmrs_config = CALLOC(1,sizeof(struct NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13));
dmrs_config->threeTone_CyclicShift_r13 = configuration->npusch_threeTone_CyclicShift_r13[CC_id];
dmrs_config->sixTone_CyclicShift_r13 = configuration->npusch_sixTone_CyclicShift_r13[CC_id];
/*OPTIONAL*/
/*OPTIONAL
* -define the base sequence for a DMRS sequence in a cell with multi tone transmission (3,6,12) see TS 36.331 NPUSCH-Config-NB
* -if not defined will be calculated based on the cellID once we configure the phy layer (rrc_mac_config_req) through the config_sib2 */
dmrs_config->threeTone_BaseSequence_r13 = NULL;
dmrs_config->sixTone_BaseSequence_r13 = NULL;
dmrs_config->twelveTone_BaseSequence_r13 = NULL;
......
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