Commit e15c1f11 authored by Michele Paffetti's avatar Michele Paffetti

Implementation of configuration data structures following FAPI-like approach....

Implementation of configuration data structures following FAPI-like approach. Some parameters seem to be non implemented in FAPI (for the moment addedd manually). Cleaning of some part of RRC code. Code compile.
parent 87aff44c
......@@ -60,8 +60,8 @@ void NB_phy_config_mib_eNB(int Mod_id,
void NB_phy_config_sib2_eNB(uint8_t Mod_id,
int CC_id,
nb_iot_config_t *config,
rf_config_t *rf_config
nfapi_nb_iot_config_t *config,
nfapi_rf_config_t *rf_config
);
void NB_phy_config_dedicated_eNB(module_id_t Mod_id,
......
This diff is collapsed.
......@@ -204,6 +204,8 @@ typedef struct {
uint8_t nb_antennas_rx;
/// Number of common transmit antenna ports in eNodeB (1 or 2)
uint8_t nb_antenna_ports_eNB;
/// Number of common receiving antenna ports in eNodeB (1 or 2)
uint8_t nb_antenna_ports_rx_eNB;
/// NPRACH Config Common (from 36-331 RRC spec)
NPRACH_CONFIG_COMMON nprach_config_common;
/// NPDSCH Config Common (from 36-331 RRC spec)
......
......@@ -16,10 +16,10 @@ void PHY_config_req(PHY_Config_t* config_INFO){
NB_phy_config_mib_eNB(config_INFO->mod_id,
config_INFO->CC_id,
config_INFO->frequency_band_indicator,
config_INFO->sch_config.physical_cell_id,
config_INFO->subframe_config.dl_cyclic_prefix_type,
config_INFO->subframe_config.ul_cyclic_prefix_type,
config_INFO->rf_config.tx_antenna_ports,
config_INFO->sch_config.physical_cell_id.value,
config_INFO->subframe_config.dl_cyclic_prefix_type.value,
config_INFO->subframe_config.ul_cyclic_prefix_type.value,
config_INFO->rf_config.tx_antenna_ports.value,
config_INFO->dl_CarrierFreq,
config_INFO->ul_CarrierFreq);
}
......
......@@ -116,10 +116,11 @@ typedef struct RrcConfigurationReq_s {
int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
int nb_antennas_tx[MAX_NUM_CCs]; //MP: may no more used
int nb_antennas_rx[MAX_NUM_CCs]; //MP: may no more used
int nb_antennas_tx[MAX_NUM_CCs];
int nb_antennas_rx[MAX_NUM_CCs];
int nb_antenna_ports[MAX_NUM_CCs];
int nb_antenna_ports_rx[MAX_NUM_CCs];
//PRACH
long prach_root[MAX_NUM_CCs];
......
......@@ -468,7 +468,8 @@ typedef struct {
/*! \brief eNB common channels */
typedef struct {
int physCellId;
int p_eNB;
int p_eNB; //number of tx antenna port
int p_rx_eNB; //number of Rx antenna port
int Ncp;
int Ncp_UL;
int eutra_band;
......
......@@ -11,6 +11,7 @@
#include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h"
#include "PhysicalConfigDedicated-NB-r13.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "temp_nfapi_interface.h"
#define SCH_PAYLOAD_SIZE_MAX 4096
#define BCCH_PAYLOAD_SIZE_MAX 128
......@@ -19,93 +20,6 @@
// P5 FAPI-like configuration structures
typedef struct{
uint16_t duplex_mode;
uint16_t pcfich_power_offset;
uint16_t p_b; //refers to DL power allocation (see TS 36.213 ch 5.2
uint16_t dl_cyclic_prefix_type;
uint16_t ul_cyclic_prefix_type;
}subframe_config_t;
typedef struct{
uint16_t dl_channel_bandwidth;
uint16_t ul_channel_bandwidth;
uint16_t reference_signal_power;
uint16_t tx_antenna_ports;
uint16_t rx_antenna_ports;
}rf_config_t;
typedef struct{
uint16_t primary_sinchronization_signal_epre_eprers;
uint16_t secondary_sinchronization_signal_epre_eprers;
uint16_t physical_cell_id; //aka Ncell_id
}sch_config_t;
typedef struct{
uint16_t operating_mode;
uint16_t anchor;
uint16_t prb_index;
uint16_t control_region_size;
uint16_t assumed_crs_aps;
//enable or disable configuration #0 (value: 0 = Disable, 1 = Enable)
uint16_t nprach_config_0_enabled;
//periodicity of NPRACH resource (value 0,1,2,3,4,5,6,7 correspond to 40,80,160,240,320,640,1280,2560ms)
uint16_t nprach_config_0_sf_periodicity;
//NPRACH resource starting time after period (value 0,1,2,3,4,5,6,7 correspond to 8,16,32,64,128,256,512,1024ms)
uint16_t nprach_config_0_start_time;
//Frequency location of an NPRACH resource within a PRB (value 0,1,2,3,4,5,6 correspond to 0,12,24,36,2,18,34
uint16_t nprach_config_0_subcarrier_offset;
//Number of Subcarriers in NPRACH resource (value 0,1,2,3 correspond to 12,24,36,48)
uint16_t nprach_config_0_number_of_subcarriers;
//Cyclic prefix length for NPRACH transmission (value: 0 = 66.7usec, 1 = 266.7usec)
uint16_t nprach_config_0_cp_length;
//Number of repetitions for NPRACH transmission (value: 0,1,2,3,4,5,6,7 correspond to 1,2,4,8,16,32,64,128)
uint16_t nprach_config_0_number_of_repetitions_per_attempts;
uint16_t nprach_config_1_enabled;
uint16_t nprach_config_1_sf_periodicity;
uint16_t nprach_config_1_start_time;
uint16_t nprach_config_1_subcarrier_offset;
uint16_t nprach_config_1_number_of_subcarriers;
uint16_t nprach_config_1_cp_length;
uint16_t nprach_config_1_number_of_repetitions_per_attempts;
uint16_t nprach_config_2_enabled;
uint16_t nprach_config_2_sf_periodicity;
uint16_t nprach_config_2_start_time;
uint16_t nprach_config_2_subcarrier_offset;
uint16_t nprach_config_2_number_of_subcarriers;
uint16_t nprach_config_2_cp_length;
uint16_t nprach_config_2_number_of_repetitions_per_attempts;
//4 bits
uint16_t three_tone_base_sequence;/*OPTIONAL*/
//2bits
uint16_t six_tone_base_sequence; /*OPTIONAL*/
//5 bits
uint16_t twelve_tone_base_sequence; /*OPTIONAL*/
uint16_t three_tone_cyclic_shift;
uint16_t six_tone_cyclic_shift;
//Enable/disable the DL gap
uint16_t dl_gap_config_enable;
//Threshold on the maximum number of repetitions configured for NPDCCH before application of DL transmission gap config.
//value 0,1,2,3 correspond to 32,64,128,256
uint16_t dl_gap_threshold;
//Periodicity of a DL tranmission gap (value 0,1,2,3 correspond to 64,128,256,512sf)
uint16_t dl_gap_periodicity;
//Coefficent to calculate the gap duration of a DL transmission (value 0,1,2,3 correspond to oneEight, oneFourth, threeEight, oneHalf)
uint16_t dl_gap_duration_coefficent;
}nb_iot_config_t;
typedef struct{
uint16_t data_report_mode;
uint16_t sfn_sf;
}l23_config_t;
typedef struct{
/*OAI config. parameters*/
......@@ -130,11 +44,12 @@ typedef struct{
/*FAPI style config. parameters*/
subframe_config_t subframe_config;
rf_config_t rf_config;
sch_config_t sch_config;
nb_iot_config_t nb_iot_config;
l23_config_t l23_config;
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;
/*Dedicated configuration --> not supported by FAPI?*/
PhysicalConfigDedicated_NB_r13_t *phy_config_dedicated;
......
This diff is collapsed.
......@@ -493,7 +493,8 @@ typedef struct {
//implicit parameters needed
int Ncp; //cyclic prefix for DL
int Ncp_UL; //cyclic prefix for UL
int p_eNB; //number of antenna port (getting from the CRS of the MIB-NB)
int p_eNB; //number of tx antenna port
int p_rx_eNB; //number of receiving antenna ports
uint32_t dl_CarrierFreq; //detected by the UE
uint32_t ul_CarrierFreq; //detected by the UE
uint16_t physCellId; //not stored in the MIB-NB but is getting through NPSS/NSSS
......
......@@ -70,9 +70,10 @@ RRC_status_t rrc_rx_tx_NB(protocol_ctxt_t* const ctxt_pP, const uint8_t enb_ind
int NB_rrc_mac_config_req_eNB(
module_id_t Mod_idP,
int CC_idP,
int rntiP, //FIXME: Raymond bug?
int rntiP,
int physCellId,
int p_eNB,
int p_rx_eNB,// number of rx antenna ports
int Ncp,
int Ncp_UL,
long eutra_band,//FIXME: frequencyBandIndicator in sib1 (is a long not an int!!)
......
......@@ -312,7 +312,7 @@ rrc_rx_tx_NB(
"[UE %d][RAPROC] Frame %d T300 Count %d ms\n", ctxt_pP->module_id, ctxt_pP->frame, UE_rrc_inst[ctxt_pP->module_id].Info[enb_indexP].T300_cnt);
if (UE_rrc_inst[ctxt_pP->module_id].Info[enb_indexP].T300_cnt
== T300[UE_rrc_inst[ctxt_pP->module_id].sib2[enb_indexP]->ue_TimersAndConstants.t300]) {
== T300_NB[UE_rrc_inst[ctxt_pP->module_id].sib2[enb_indexP]->ue_TimersAndConstants.t300]) {
UE_rrc_inst[ctxt_pP->module_id].Info[enb_indexP].T300_active = 0;
// ALLOW CCCH to be used
UE_rrc_inst[ctxt_pP->module_id].Srb0[enb_indexP].Tx_buffer.payload_size = 0;
......
......@@ -3628,7 +3628,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
} else { // remove LCHAN from MAC/PHY
if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) { //???
if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) {
// DRB has just been removed so remove RLC + PDCP for DRB
/* rrc_pdcp_config_req (ctxt_pP->module_id, frameP, 1, CONFIG_ACTION_REMOVE,
(ue_mod_idP * NB_RB_MAX) + DRB2LCHAN[i],UNDEF_SECURITY_MODE);
......
......@@ -571,6 +571,7 @@ rrc_eNB_generate_RRCConnectionSetup_NB(
ue_context_pP->ue_context.rnti,
0, //physCellID
0, //p_eNB
0, //p_rx_eNB
0, //Ncp
0, //Ncp_UL
0, //eutraband
......@@ -800,6 +801,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete_NB(
ue_context_pP->ue_context.rnti,
0,//physCellId --> this parameters could be set to 0 since no MIB is present
0,// p_eNB
0,//p_rx_eNB
0, //Ncp
0, //Ncp_UL
0, //eutra_band
......@@ -843,6 +845,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete_NB(
ue_context_pP->ue_context.rnti,
0,//physCellId --> this parameters could be set to 0 since no MIB is present
0,// p_eNB
0,//p_rx_eNB
0, //Ncp
0, //Ncp_UL
0, //eutra_band
......@@ -1456,7 +1459,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB(const protocol_ctxt_t* c
ASN_SEQUENCE_ADD(&(*DRB_configList2)->list, DRB_config);
///Mac_MainConfig
///Mac_MainConfig (default as defined in TS 36.331 ch 9.2.2)
mac_MainConfig_NB = CALLOC(1, sizeof(*mac_MainConfig_NB));
ue_context_pP->ue_context.mac_MainConfig_NB = mac_MainConfig_NB;
......@@ -1484,6 +1487,9 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB(const protocol_ctxt_t* c
if (*physicalConfigDedicated_NB) {
//DL_CarrierConfigDedicated_NB_r13_t cio;
//UL_CarrierConfigDedicated_NB_r13_t c;
//TODO: which value should be configured of phisical config dedicated?
//antennaInfo not present in PhysicalConfigDedicated for NB_IoT
//cqi reporting is not present in PhysicalConfigDedicated for NB_IoT
......@@ -1621,6 +1627,7 @@ init_SI_NB(
//copy basic parameters
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].physCellId = configuration->Nid_cell[CC_id];
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].p_eNB = configuration->nb_antenna_ports[CC_id];
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].p_rx_eNB = configuration->nb_antenna_ports_rx[CC_id];
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp = configuration->prefix_type[CC_id]; //DL Cyclic prefix
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp_UL = configuration->prefix_type_UL[CC_id];//UL cyclic prefix
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id];
......@@ -1719,6 +1726,7 @@ init_SI_NB(
0,//rnti
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].physCellId,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].p_eNB,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].p_rx_eNB,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].Ncp_UL,
eNB_rrc_inst_NB[ctxt_pP->module_id].carrier[CC_id].sib1_NB->freqBandIndicator_r13, //eutra_band
......@@ -1807,7 +1815,6 @@ while ( eNB_rrc_inst_NB == NULL ) {
//XXX following the old implementation: openair_rrc_top_init is called in MAC/main.c
//In Rymond version actually is called here
//openair_rrc_top_init_eNB_NB();
//init ch SRB0, SRB1 & BDTCH
......
......@@ -101,9 +101,7 @@ LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificPara
};
//CONSTANTS
rlc_info_t Rlc_info_um,Rlc_info_am_config,
//NB-IoT
Rlc_info_am;
rlc_info_t Rlc_info_um,Rlc_info_am_config;
uint16_t RACH_FREQ_ALLOC;
//uint8_t NB_RACH;
......
......@@ -29,8 +29,6 @@
*/
//#ifndef __OPENAIR_RRC_VARS_NB_H__
//#define __OPENAIR_RRC_VARS_NB_H__
#include "defs_nb_iot.h"
#include "LAYER2/RLC/rlc.h"
#include "COMMON/mac_rrc_primitives.h"
......@@ -66,10 +64,7 @@ unsigned short Data_to_read;
#include "LAYER2/MAC/extern.h"
#define MAX_U32 0xFFFFFFFF
//LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1--> not defined for NB-IoT
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
BOOLEAN_t logicalChannelSR_Prohibit = 1;
......@@ -89,16 +84,12 @@ struct LogicalChannelConfig_NB_r13 SRB1_NB_logicalChannelConfig_defaultValue = {
//CONSTANTS
rlc_info_t Rlc_info_um,Rlc_info_am_config, Rlc_info_am;
uint16_t RACH_FREQ_ALLOC;
//TODO: MP: to e changed --> mac_rrc_primitives
LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
//MP: LCHAN_DESC (mac_rrc_primitives) is not needed, was only an old implementation for storing LCH information
//XXX //MP:May not needed
//MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
//MAC_AVG_T BCCH_MEAS_AVG, CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
// timers (TS 36.331 "UE-TimersAndConstants-NB" pag 622) (milliseconds) XXX MP:--> not sure they will be used
// timers (TS 36.331 v14.2.1 "UE-TimersAndConstants-NB" pag 622) (milliseconds)
//seems to be not used or only at UE side
uint16_t T300_NB[8] = {2500,4000,6000,10000, 15000,25000,40000,60000};
uint16_t T301_NB[8] = {2500,4000,6000,10000, 15000,25000,40000,60000}; //MP: this start at RRCconnectionReestablishmentReq (not implemented in OAI)
uint16_t T310_NB[8] = {0,200,500,1000,2000,4000,8000};
......@@ -111,4 +102,3 @@ uint16_t N311_NB[8] = {1,2,3,4,5,6,8,10};
/* MP: 36.133 Section 9.1.4 RSRP Measurement Report Mapping and RSRQ Mapping, Table: 9.1.4-1 --> not for NB-IoT*/
//#endif
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