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;
......
This diff is collapsed.
......@@ -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