Merge branch 'develop-sib1' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-sib1
Conflicts: ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf openair1/SCHED_NR_UE/phy_procedures_nr_ue.c openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c openair2/LAYER2/NR_MAC_gNB/mac_proto.h openair2/RRC/NR/rrc_gNB_reconfig.c openair2/RRC/NR_UE/rrc_defs.h
This commit is contained in:
@@ -984,13 +984,9 @@ void NRRCConfig(void) {
|
||||
paramdef_t GNBSParams[] = GNBSPARAMS_DESC;
|
||||
|
||||
/* get global parameters, defined outside any section in the config file */
|
||||
|
||||
LOG_I(GNB_APP, "Getting GNBSParams\n");
|
||||
|
||||
config_get( GNBSParams,sizeof(GNBSParams)/sizeof(paramdef_t),NULL);
|
||||
RC.nb_nr_inst = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt;
|
||||
|
||||
|
||||
// Get num MACRLC instances
|
||||
config_getlist( &MACRLCParamList,NULL,0, NULL);
|
||||
RC.nb_macrlc_inst = MACRLCParamList.numelt;
|
||||
|
||||
@@ -78,7 +78,6 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE "none"
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying"
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info"
|
||||
|
||||
|
||||
/* global parameters, not under a specific section */
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity"
|
||||
|
||||
@@ -180,7 +180,7 @@ int16_t table_6_3_3_2_1[16][5] = {
|
||||
/* Function to get number of RBs required for prach occasion based on
|
||||
* 38.211 Table 6.3.3.2-1 */
|
||||
int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH) {
|
||||
|
||||
|
||||
int8_t index = 0;
|
||||
switch(delta_f_RA_PRACH) {
|
||||
case 0 : index = 6;
|
||||
@@ -206,8 +206,8 @@ int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH) {
|
||||
index += 0;
|
||||
else
|
||||
index += 1;
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case 3: index = 13;
|
||||
if (delta_f_PUSCH == 2)
|
||||
index += 0;
|
||||
@@ -216,11 +216,11 @@ int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH) {
|
||||
break;
|
||||
|
||||
default : index = 10;/*30khz prach scs and 30khz pusch scs*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return table_6_3_3_2_1[index][3];
|
||||
}
|
||||
}
|
||||
// Table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink
|
||||
// the column 5, (SFN_nbr is a bitmap where we set bit to '1' in the position of the subframe where the RACH can be sent.
|
||||
// E.g. in row 4, and column 5 we have set value 512 ('1000000000') which means RACH can be sent at subframe 9.
|
||||
@@ -1131,14 +1131,14 @@ int get_nr_prach_occasion_info_from_index(uint8_t index,
|
||||
}
|
||||
}
|
||||
*N_RA_slot = table_6_3_3_2_4_prachConfig_Index[index][7]; // Number of RACH slots within a subframe
|
||||
*max_association_period = 160/(x * 10);
|
||||
*max_association_period = 160/(x * 10);
|
||||
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
|
||||
*start_symbol = table_6_3_3_2_4_prachConfig_Index[index][6];//multiple prach occasions in diff slot
|
||||
*N_t_slot = table_6_3_3_2_4_prachConfig_Index[index][8];
|
||||
*N_dur = table_6_3_3_2_4_prachConfig_Index[index][9];
|
||||
if (table_6_3_3_2_4_prachConfig_Index[index][1] != -1)
|
||||
format2 = (uint8_t) table_6_3_3_2_4_prachConfig_Index[index][1];
|
||||
|
||||
|
||||
*format = ((uint8_t) table_6_3_3_2_4_prachConfig_Index[index][0]) | (format2<<8);
|
||||
LOG_D(MAC,"Getting Total PRACH info from index %d absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u N_RA_sfn = %u\n",
|
||||
index,
|
||||
@@ -1163,7 +1163,7 @@ int get_nr_prach_occasion_info_from_index(uint8_t index,
|
||||
}
|
||||
}
|
||||
*N_RA_slot = table_6_3_3_2_3_prachConfig_Index[index][6]; // Number of RACH slots within a subframe
|
||||
*max_association_period = 160/(x * 10);
|
||||
*max_association_period = 160/(x * 10);
|
||||
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
|
||||
*start_symbol = table_6_3_3_2_3_prachConfig_Index[index][5];
|
||||
*N_t_slot = table_6_3_3_2_3_prachConfig_Index[index][7];
|
||||
@@ -1352,8 +1352,8 @@ int get_nr_prach_info_from_index(uint8_t index,
|
||||
*N_RA_slot = table_6_3_3_2_3_prachConfig_Index[index][6]; // Number of RACH slots within a subframe
|
||||
if (mu == 1) {
|
||||
if ( (*N_RA_slot <= 1) && (slot%2 == 0) )
|
||||
return 0; // no prach in even slots @ 30kHz for 1 prach per subframe
|
||||
}
|
||||
return 0; // no prach in even slots @ 30kHz for 1 prach per subframe
|
||||
}
|
||||
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
|
||||
*config_period = x;
|
||||
*start_symbol = table_6_3_3_2_3_prachConfig_Index[index][5];
|
||||
@@ -2570,7 +2570,7 @@ uint16_t nr_dci_size(NR_ServingCellConfigCommon_t *scc,
|
||||
|
||||
case NR_DL_DCI_FORMAT_1_0:
|
||||
/// fixed: Format identifier 1, VRB2PRB 1, MCS 5, NDI 1, RV 2, HARQ PID 4, DAI 2, PUCCH TPC 2, PUCCH RInd 3, PDSCH to HARQ TInd 3 Time Domain assgnmt 4 -- 28
|
||||
size += 28;
|
||||
size = 28;
|
||||
size += (uint8_t)ceil( log2( (N_RB*(N_RB+1))>>1 ) ); // Freq domain assignment
|
||||
|
||||
dci_pdu->frequency_domain_assignment.nbits = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
|
||||
@@ -2817,8 +2817,8 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
|
||||
if (dmrs_config->dmrs_AdditionalPosition == NULL) pos2=1;
|
||||
else if (dmrs_config->dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition == NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0 )
|
||||
return(1<<l0);
|
||||
|
||||
|
||||
|
||||
|
||||
switch (NrOfSymbols) {
|
||||
case 2 :
|
||||
case 3 :
|
||||
|
||||
@@ -97,6 +97,7 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
|
||||
}
|
||||
|
||||
rel15->coreset.duration = coreset->duration;
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
rel15->coreset.frequency_domain_resource[i] = coreset->frequencyDomainResources.buf[i];
|
||||
rel15->coreset.CceRegMappingType = coreset->cce_REG_MappingType.present == NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved ? FAPI_NR_CCE_REG_MAPPING_TYPE_INTERLEAVED : FAPI_NR_CCE_REG_MAPPING_TYPE_NON_INTERLEAVED;
|
||||
|
||||
@@ -957,6 +957,10 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
|
||||
// fill in the elements in config request inside P5 message
|
||||
mac->phy_config.Mod_id = module_id;
|
||||
mac->phy_config.CC_id = cc_id;
|
||||
|
||||
nr_mac_rrc_data_ind_ue( module_id, cc_id, gNB_index, NR_BCCH_BCH, (uint8_t *) pduP, 3 ); // fixed 3 bytes MIB PDU
|
||||
|
||||
AssertFatal(mac->mib != NULL, "nr_ue_decode_mib() mac->mib == NULL\n");
|
||||
@@ -1174,6 +1178,9 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t dci_config_rel15 = dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15;
|
||||
|
||||
} else if (ul_info) {
|
||||
|
||||
// ULSCH is handled only in phy-test mode (consistently with OAI gNB)
|
||||
@@ -3729,7 +3736,7 @@ int get_n_rb(NR_UE_MAC_INST_t *mac, int rnti_type){
|
||||
N_RB = mac->type0_PDCCH_CSS_config.num_rbs;
|
||||
break;
|
||||
case NR_RNTI_C:
|
||||
N_RB = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, 275);
|
||||
N_RB = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, 275);
|
||||
break;
|
||||
}
|
||||
return N_RB;
|
||||
@@ -4314,8 +4321,8 @@ int nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return dci_format;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,8 +213,9 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
}
|
||||
|
||||
|
||||
|
||||
void schedule_nr_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
|
||||
//----------------------------------------
|
||||
//----------------------------------------
|
||||
}
|
||||
|
||||
void fill_ssb_vrb_map (NR_COMMON_channels_t *cc, int rbStart, int CC_id) {
|
||||
|
||||
@@ -628,7 +628,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
gNB_MAC_INST *gNB_mac = RC.nrmac[module_id];
|
||||
|
||||
/* PREPROCESSOR */
|
||||
gNB_mac->pre_processor_dl(module_id, frame, slot, num_slots_per_tdd);
|
||||
//gNB_mac->pre_processor_dl(module_id, frame, slot, num_slots_per_tdd);
|
||||
nr_simple_dlsch_preprocessor(module_id, frame, slot, num_slots_per_tdd); // FIXME: gNB_mac->pre_processor_dl(module_id, frame, slot, num_slots_per_tdd); - Exit by assert
|
||||
|
||||
NR_UE_info_t *UE_info = &gNB_mac->UE_info;
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#define ENABLE_MAC_PAYLOAD_DEBUG
|
||||
#define DEBUG_gNB_SCHEDULER 1
|
||||
|
||||
|
||||
#include "common/ran_context.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -282,7 +282,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
memset(nr_plmn,0,sizeof(nr_plmn));
|
||||
memset(nr_mcc_digit,0,sizeof(nr_mcc_digit));
|
||||
memset(nr_mnc_digit,0,sizeof(nr_mnc_digit));
|
||||
|
||||
|
||||
// struct NR_UAC_BarringInfoSet nr_uac_BarringInfoSet;
|
||||
NR_BCCH_DL_SCH_Message_t *sib1_message = CALLOC(1,sizeof(NR_BCCH_DL_SCH_Message_t));
|
||||
carrier->siblock1 = sib1_message;
|
||||
@@ -290,7 +290,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
sib1_message->message.choice.c1 = CALLOC(1,sizeof(struct NR_BCCH_DL_SCH_MessageType__c1));
|
||||
sib1_message->message.choice.c1->present = NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1;
|
||||
sib1_message->message.choice.c1->choice.systemInformationBlockType1 = CALLOC(1,sizeof(struct NR_SIB1));
|
||||
|
||||
|
||||
struct NR_SIB1 *sib1 = sib1_message->message.choice.c1->choice.systemInformationBlockType1;
|
||||
sib1->cellSelectionInfo = CALLOC(1,sizeof(struct NR_SIB1__cellSelectionInfo));
|
||||
sib1->cellSelectionInfo->q_RxLevMin = -50;
|
||||
|
||||
@@ -183,7 +183,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
|
||||
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
|
||||
rrc->carrier.MIB = (uint8_t *) malloc16(4);
|
||||
rrc->carrier.sizeof_MIB = do_MIB_NR(rrc,0);
|
||||
rrc->carrier.sizeof_SIB1 = do_SIB1_NR(&rrc->carrier,configuration);
|
||||
rrc->carrier.sizeof_SIB1 = do_SIB1_NR(&rrc->carrier,configuration);
|
||||
LOG_I(NR_RRC,"Done init_NR_SI\n");
|
||||
rrc_mac_config_req_gNB(rrc->module_id,
|
||||
rrc->carrier.ssb_SubcarrierOffset,
|
||||
|
||||
Reference in New Issue
Block a user