changes for initialBWP size different than Coreset0. Tested with 50 MHz 2x2 configuration, initialBWP with 133 PRBs.
This commit is contained in:
+25
-1
@@ -831,7 +831,18 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case 160: //30 MHz
|
||||
case 133: //25 MHz
|
||||
if (fp->threequarter_fs) {
|
||||
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",N_RB);
|
||||
}
|
||||
else {
|
||||
cfg->sample_rate=30.72e6;
|
||||
cfg->samples_per_frame = 307200;
|
||||
cfg->tx_bw = 20e6;
|
||||
cfg->rx_bw = 20e6;
|
||||
}
|
||||
case 106:
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=23.04e6;
|
||||
@@ -904,6 +915,19 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
cfg->rx_bw = 80e6;
|
||||
}
|
||||
break;
|
||||
case 162 :
|
||||
if (fp->threequarter_fs) {
|
||||
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",N_RB);
|
||||
}
|
||||
else {
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 60e6;
|
||||
cfg->rx_bw = 60e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 133 :
|
||||
if (fp->threequarter_fs) {
|
||||
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",N_RB);
|
||||
|
||||
@@ -126,6 +126,8 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
|
||||
fp->first_carrier_offset = fp->ofdm_symbol_size - (N_RB_DL * 12 / 2);
|
||||
fp->nb_prefix_samples = fp->ofdm_symbol_size / 128 * 9;
|
||||
fp->nb_prefix_samples0 = fp->ofdm_symbol_size / 128 * (9 + (1 << mu));
|
||||
LOG_I(PHY,"Init: N_RB_DL %d, first_carrier_offset %d, nb_prefix_samples %d,nb_prefix_samples0 %d\n",
|
||||
N_RB_DL,fp->first_carrier_offset,fp->nb_prefix_samples,fp->nb_prefix_samples0);
|
||||
}
|
||||
|
||||
uint32_t get_samples_per_slot(int slot, NR_DL_FRAME_PARMS* fp)
|
||||
|
||||
@@ -65,7 +65,7 @@ void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME
|
||||
|
||||
fp->ssb_start_subcarrier = (12 * cfg->ssb_table.ssb_offset_point_a.value + sco);
|
||||
LOG_D(PHY, "SSB first subcarrier %d (%d,%d)\n", fp->ssb_start_subcarrier,cfg->ssb_table.ssb_offset_point_a.value,sco);
|
||||
}
|
||||
}
|
||||
|
||||
void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu) {
|
||||
|
||||
@@ -675,7 +675,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
||||
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot) + gNB->pusch_thres) {
|
||||
NR_gNB_SCH_STATS_t *stats=get_ulsch_stats(gNB,ulsch);
|
||||
|
||||
LOG_D(PHY, "PUSCH not detected in %d.%d (%d,%d,%d)\n",frame_rx,slot_rx,
|
||||
LOG_I(PHY, "PUSCH not detected in %d.%d (%d,%d,%d)\n",frame_rx,slot_rx,
|
||||
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot),
|
||||
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot),gNB->pusch_thres);
|
||||
gNB->pusch_vars[ULSCH_id]->ulsch_power_tot = gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot;
|
||||
|
||||
@@ -1921,6 +1921,7 @@ void configure_gnb_du_mac(int inst) {
|
||||
rrc->configuration.pdsch_AntennaPorts,
|
||||
rrc->configuration.pusch_AntennaPorts,
|
||||
rrc->configuration.scc,
|
||||
NULL,
|
||||
0,
|
||||
0, // rnti
|
||||
(NR_CellGroupConfig_t *)NULL
|
||||
|
||||
@@ -3225,6 +3225,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
|
||||
type0_PDCCH_CSS_config->num_rbs = -1;
|
||||
type0_PDCCH_CSS_config->num_symbols = -1;
|
||||
type0_PDCCH_CSS_config->rb_offset = -1;
|
||||
LOG_D(NR_MAC,"scs_ssb %d, scs_pdcch %d\n",scs_ssb,scs_pdcch);
|
||||
|
||||
// type0-pdcch coreset
|
||||
switch( (scs_ssb << 3) | scs_pdcch ){
|
||||
@@ -3340,7 +3341,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_D(MAC,"Coreset0: index_4msb=%d, num_rbs=%d, num_symb=%d, rb_offset=%d\n",
|
||||
LOG_D(NR_MAC,"Coreset0: index_4msb=%d, num_rbs=%d, num_symb=%d, rb_offset=%d\n",
|
||||
index_4msb,type0_PDCCH_CSS_config->num_rbs,type0_PDCCH_CSS_config->num_symbols,type0_PDCCH_CSS_config->rb_offset );
|
||||
|
||||
AssertFatal(type0_PDCCH_CSS_config->num_rbs != -1, "Type0 PDCCH coreset num_rbs undefined");
|
||||
|
||||
@@ -420,9 +420,10 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int pdsch_AntennaPorts,
|
||||
int pusch_AntennaPorts,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
int add_ue,
|
||||
NR_BCCH_BCH_Message_t *mib,
|
||||
int add_ue,
|
||||
uint32_t rnti,
|
||||
NR_CellGroupConfig_t *CellGroup) {
|
||||
NR_CellGroupConfig_t *CellGroup) {
|
||||
|
||||
if (scc != NULL ) {
|
||||
AssertFatal((scc->ssb_PositionsInBurst->present > 0) && (scc->ssb_PositionsInBurst->present < 4), "SSB Bitmap type %d is not valid\n",scc->ssb_PositionsInBurst->present);
|
||||
@@ -465,7 +466,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
ssb_SubcarrierOffset,
|
||||
pdsch_AntennaPorts,
|
||||
pusch_AntennaPorts,
|
||||
scc);
|
||||
scc);
|
||||
|
||||
LOG_E(NR_MAC, "%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req);
|
||||
|
||||
// if in nFAPI mode
|
||||
@@ -499,7 +501,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mib) RC.nrmac[Mod_idP]->common_channels[0].mib = mib;
|
||||
|
||||
if (CellGroup) {
|
||||
|
||||
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
|
||||
|
||||
@@ -884,7 +884,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
|
||||
if ((ra->Msg2_frame == frameP) && (ra->Msg2_slot == slotP)) {
|
||||
|
||||
uint8_t time_domain_assignment = 1;
|
||||
uint8_t time_domain_assignment = 3;
|
||||
uint8_t mcsIndex = 0;
|
||||
int rbStart = 0;
|
||||
int rbSize = 8;
|
||||
@@ -1058,19 +1058,21 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
dci_pdu->powerControlOffsetSS = 1;
|
||||
|
||||
dci_pdu_rel15_t dci_payload;
|
||||
int effective_BWPSize = get_softmodem_params()->sa == 1 ? (pdcch_pdu_rel15->FreqDomainResource[0]==0xFF ? 48 : 24) : pdsch_pdu_rel15->BWPSize;
|
||||
dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize,
|
||||
pdsch_pdu_rel15->rbStart,
|
||||
pdsch_pdu_rel15->BWPSize);
|
||||
pdsch_pdu_rel15->rbStart,
|
||||
effective_BWPSize);
|
||||
|
||||
LOG_D(MAC,"Msg2 rbSize.rbStart.BWPsize %d.%d.%d\n",pdsch_pdu_rel15->rbSize,
|
||||
pdsch_pdu_rel15->rbStart,
|
||||
pdsch_pdu_rel15->BWPSize);
|
||||
effective_BWPSize);
|
||||
|
||||
dci_payload.time_domain_assignment.val = time_domain_assignment;
|
||||
dci_payload.vrb_to_prb_mapping.val = 0;
|
||||
dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0];
|
||||
dci_payload.tb_scaling = tb_scaling;
|
||||
|
||||
LOG_D(NR_MAC,
|
||||
LOG_I(NR_MAC,
|
||||
"[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n",
|
||||
dci_payload.frequency_domain_assignment.val,
|
||||
pdsch_pdu_rel15->rbStart,
|
||||
@@ -1081,12 +1083,12 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
dci_payload.mcs,
|
||||
dci_payload.tb_scaling);
|
||||
|
||||
LOG_D(NR_MAC,
|
||||
LOG_I(NR_MAC,
|
||||
"[RAPROC] DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d\n",
|
||||
pdcch_pdu_rel15->dci_pdu[0].RNTI,
|
||||
NR_RNTI_RA,
|
||||
NR_DL_DCI_FORMAT_1_0,
|
||||
(unsigned long long)pdcch_pdu_rel15->FreqDomainResource,
|
||||
*(unsigned long long *)pdcch_pdu_rel15->FreqDomainResource,
|
||||
pdcch_pdu_rel15->StartSymbolIndex,
|
||||
pdcch_pdu_rel15->DurationSymbols);
|
||||
|
||||
@@ -1096,7 +1098,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
&dci_payload,
|
||||
NR_DL_DCI_FORMAT_1_0,
|
||||
NR_RNTI_RA,
|
||||
pdsch_pdu_rel15->BWPSize,
|
||||
effective_BWPSize,
|
||||
bwpid);
|
||||
|
||||
// DL TX request
|
||||
@@ -1157,7 +1159,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
|
||||
NR_BWP_t *genericParameters = bwp ? & bwp->bwp_Common->genericParameters : &scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters;
|
||||
long BWPSize = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
|
||||
long BWPSize = coreset->frequencyDomainResources.buf[0]==0xFF ? 48 : 24;
|
||||
long BWPStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
|
||||
|
||||
// HARQ management
|
||||
|
||||
@@ -316,7 +316,9 @@ void schedule_control_sib1(module_id_t module_id,
|
||||
int num_total_bytes) {
|
||||
|
||||
gNB_MAC_INST *gNB_mac = RC.nrmac[module_id];
|
||||
nfapi_nr_config_request_scf_t *cfg = &gNB_mac->config[0];
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon = gNB_mac->common_channels[CC_id].ServingCellConfigCommon;
|
||||
NR_MIB_t *mib=gNB_mac->common_channels[CC_id].mib->message.choice.mib;
|
||||
uint16_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map;
|
||||
|
||||
if (gNB_mac->sched_ctrlCommon == NULL){
|
||||
@@ -326,7 +328,19 @@ void schedule_control_sib1(module_id_t module_id,
|
||||
gNB_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->coreset));
|
||||
gNB_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->active_bwp));
|
||||
fill_default_searchSpaceZero(gNB_mac->sched_ctrlCommon->search_space);
|
||||
fill_default_coresetZero(gNB_mac->sched_ctrlCommon->coreset,servingcellconfigcommon);
|
||||
int frequency_range=FR1;
|
||||
if (servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA > 2016666)
|
||||
frequency_range=FR2;
|
||||
fill_default_coresetZero(gNB_mac->sched_ctrlCommon->coreset,
|
||||
mib,
|
||||
cfg->ssb_table.ssb_subcarrier_offset.value,
|
||||
cfg->ssb_config.scs_common.value,
|
||||
get_ssb_start_symbol(*servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0],
|
||||
cfg->ssb_config.scs_common.value,
|
||||
0),
|
||||
frequency_range,
|
||||
cfg->ssb_table.ssb_offset_point_a.value,
|
||||
cfg->cell_config.phy_cell_id.value);
|
||||
fill_default_initialDownlinkBWP(gNB_mac->sched_ctrlCommon->active_bwp,servingcellconfigcommon);
|
||||
}
|
||||
|
||||
|
||||
@@ -622,7 +622,8 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
|
||||
|
||||
for (int i=0;i<6;i++)
|
||||
pdcch_pdu->FreqDomainResource[i] = coreset->frequencyDomainResources.buf[i];
|
||||
|
||||
|
||||
LOG_D(MAC,"Coreset : BWPstart %d, BWPsize %d, SCS %d, freq %x, , duration %d, \n",pdcch_pdu->BWPStart,pdcch_pdu->BWPSize,pdcch_pdu->SubcarrierSpacing,coreset->frequencyDomainResources.buf[0],coreset->duration);
|
||||
|
||||
//cce-REG-MappingType
|
||||
pdcch_pdu->CceRegMappingType = coreset->cce_REG_MappingType.present == NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved?
|
||||
@@ -994,9 +995,9 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
|
||||
fsize = (int)ceil(log2((N_RB * (N_RB + 1)) >> 1));
|
||||
pos = fsize;
|
||||
*dci_pdu |= (((uint64_t)dci_pdu_rel15->frequency_domain_assignment.val & ((1 << fsize) - 1)) << (dci_size - pos));
|
||||
LOG_D(NR_MAC,
|
||||
"frequency-domain assignment %d (%d bits) N_RB_BWP %d=> %d (0x%lx)\n",
|
||||
dci_pdu_rel15->frequency_domain_assignment.val,
|
||||
LOG_I(NR_MAC,
|
||||
"RA_RNTI, size %d frequency-domain assignment %d (%d bits) N_RB_BWP %d=> %d (0x%lx)\n",
|
||||
dci_size,dci_pdu_rel15->frequency_domain_assignment.val,
|
||||
fsize,
|
||||
N_RB,
|
||||
dci_size - pos,
|
||||
|
||||
@@ -52,9 +52,10 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int pdsch_AntennaPorts,
|
||||
int pusch_AntennaPorts,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
int nsa_flag,
|
||||
uint32_t rnti,
|
||||
NR_CellGroupConfig_t *CellGroup
|
||||
NR_BCCH_BCH_Message_t *mib,
|
||||
int add_ue,
|
||||
uint32_t rnti,
|
||||
NR_CellGroupConfig_t *CellGroup
|
||||
);
|
||||
|
||||
void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
||||
|
||||
@@ -419,8 +419,23 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
nrMultiBandInfo->freqBandIndicatorNR = configuration->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[i];
|
||||
ASN_SEQUENCE_ADD(&sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.frequencyBandList.list,nrMultiBandInfo);
|
||||
}
|
||||
//sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.offsetToPointA = configuration->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier;
|
||||
sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.offsetToPointA = 86;
|
||||
//sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.offsetToPointA = configuration->scc->downlinkConfig
|
||||
//Common->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier;
|
||||
int scs_scaling0 = 1<<(configuration->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing);
|
||||
int scs_scaling = scs_scaling0;
|
||||
int scs_scaling2 = scs_scaling0;
|
||||
if (configuration->scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA < 600000) {
|
||||
scs_scaling = scs_scaling0*3;
|
||||
}
|
||||
if (configuration->scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA > 2016666) {
|
||||
scs_scaling = scs_scaling0>>2;
|
||||
scs_scaling2 = scs_scaling0>>2;
|
||||
}
|
||||
uint32_t absolute_diff = (*configuration->scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB -
|
||||
configuration->scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA);
|
||||
|
||||
sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.offsetToPointA = scs_scaling2 * (absolute_diff/(12*scs_scaling) - 10);
|
||||
|
||||
for(int i = 0; i< configuration->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.count; i++) {
|
||||
ASN_SEQUENCE_ADD(&sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list,configuration->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[i]);
|
||||
}
|
||||
|
||||
@@ -75,8 +75,14 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti);
|
||||
|
||||
void fill_default_initialDownlinkBWP(NR_BWP_Downlink_t *bwp, NR_ServingCellConfigCommon_t *servingcellconfigcommon);
|
||||
|
||||
void fill_default_coresetZero(NR_ControlResourceSet_t *coreset0, NR_ServingCellConfigCommon_t *servingcellconfigcommon);
|
||||
|
||||
void fill_default_coresetZero(NR_ControlResourceSet_t *coreset0,
|
||||
NR_MIB_t *mib,
|
||||
int ssb_subcarrier_offset,
|
||||
int ssbSubcarrierSpacing,
|
||||
int ssb_start_symbol,
|
||||
int frequency_range,
|
||||
int ssboffset_pointa,
|
||||
int physCellId);
|
||||
void fill_default_searchSpaceZero(NR_SearchSpace_t *ss0);
|
||||
|
||||
void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
|
||||
@@ -240,6 +240,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
|
||||
rrc->carrier.pdsch_AntennaPorts,
|
||||
rrc->carrier.pusch_AntennaPorts,
|
||||
(NR_ServingCellConfigCommon_t *)rrc->carrier.servingcellconfigcommon,
|
||||
&rrc->carrier.mib,
|
||||
0,
|
||||
0, // WIP hardcoded rnti
|
||||
(NR_CellGroupConfig_t *)NULL
|
||||
@@ -388,6 +389,7 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
|
||||
rrc->carrier.pdsch_AntennaPorts,
|
||||
rrc->carrier.pusch_AntennaPorts,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
ue_context_pP->ue_context.rnti,
|
||||
ue_context_pP->ue_context.masterCellGroup
|
||||
@@ -580,6 +582,7 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
|
||||
rrc_instance_p->carrier.pdsch_AntennaPorts,
|
||||
rrc_instance_p->carrier.pusch_AntennaPorts,
|
||||
(NR_ServingCellConfigCommon_t *)rrc_instance_p->carrier.servingcellconfigcommon,
|
||||
&rrc_instance_p->carrier.mib,
|
||||
0,
|
||||
ue_context_pP->ue_context.rnti,
|
||||
(NR_CellGroupConfig_t *)NULL
|
||||
@@ -1327,6 +1330,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
|
||||
rrc->carrier.pdsch_AntennaPorts,
|
||||
rrc->carrier.pusch_AntennaPorts,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
ue_context_pP->ue_context.rnti,
|
||||
ue_context_pP->ue_context.masterCellGroup
|
||||
|
||||
@@ -351,6 +351,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
||||
rrc->carrier.pdsch_AntennaPorts,
|
||||
rrc->carrier.pusch_AntennaPorts,
|
||||
rrc->carrier.servingcellconfigcommon,
|
||||
&rrc->carrier.mib,
|
||||
1, // add_ue flag
|
||||
ue_context_p->ue_id_rnti,
|
||||
ue_context_p->ue_context.secondaryCellGroup);
|
||||
@@ -360,6 +361,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
||||
rrc->carrier.pdsch_AntennaPorts,
|
||||
rrc->carrier.pusch_AntennaPorts,
|
||||
NULL,
|
||||
NULL,
|
||||
1, // add_ue flag
|
||||
ue_context_p->ue_id_rnti,
|
||||
ue_context_p->ue_context.secondaryCellGroup);
|
||||
|
||||
@@ -73,13 +73,33 @@ void fill_default_initialDownlinkBWP(NR_BWP_Downlink_t *bwp, NR_ServingCellConfi
|
||||
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0;
|
||||
}
|
||||
|
||||
void fill_default_coresetZero(NR_ControlResourceSet_t *coreset0, NR_ServingCellConfigCommon_t *servingcellconfigcommon) {
|
||||
void fill_default_coresetZero(NR_ControlResourceSet_t *coreset0,
|
||||
NR_MIB_t *mib,
|
||||
int ssb_subcarrier_offset,
|
||||
int ssbSubcarrierSpacing,
|
||||
int ssb_start_symbol,
|
||||
int frequency_range,
|
||||
int ssboffset_pointa,
|
||||
int physCellId) {
|
||||
|
||||
NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config;
|
||||
int num_slot_per_frame = 10*(1<<ssbSubcarrierSpacing);
|
||||
get_type0_PDCCH_CSS_config_parameters(&type0_PDCCH_CSS_config,
|
||||
0,
|
||||
mib,
|
||||
num_slot_per_frame,
|
||||
ssb_subcarrier_offset,
|
||||
ssb_start_symbol,
|
||||
ssbSubcarrierSpacing,
|
||||
frequency_range,
|
||||
0,
|
||||
ssboffset_pointa);
|
||||
|
||||
coreset0->controlResourceSetId = 0;
|
||||
|
||||
// frequencyDomainResources '11111111 00000000 00000000 00000000 00000000 00000'B,
|
||||
if(coreset0->frequencyDomainResources.buf == NULL) coreset0->frequencyDomainResources.buf = calloc(1,6);
|
||||
coreset0->frequencyDomainResources.buf[0] = 0xff;
|
||||
|
||||
coreset0->frequencyDomainResources.buf[0] = type0_PDCCH_CSS_config.num_rbs==48 ? 0xff : 0xf;
|
||||
coreset0->frequencyDomainResources.buf[1] = 0;
|
||||
coreset0->frequencyDomainResources.buf[2] = 0;
|
||||
coreset0->frequencyDomainResources.buf[3] = 0;
|
||||
@@ -87,12 +107,20 @@ void fill_default_coresetZero(NR_ControlResourceSet_t *coreset0, NR_ServingCellC
|
||||
coreset0->frequencyDomainResources.buf[5] = 0;
|
||||
coreset0->frequencyDomainResources.size = 6;
|
||||
coreset0->frequencyDomainResources.bits_unused = 3;
|
||||
coreset0->duration = 1;
|
||||
|
||||
int firstrb_cs0 = ssboffset_pointa-type0_PDCCH_CSS_config.rb_offset;
|
||||
|
||||
LOG_I(RRC,"CS0: ssboffset_pointa %d, first_cs0_rb %d, num_cs0_rbs %d, cs0_duration %d: %x\n",ssboffset_pointa,firstrb_cs0,type0_PDCCH_CSS_config.num_rbs,type0_PDCCH_CSS_config.num_symbols,
|
||||
coreset0->frequencyDomainResources.buf[0]);
|
||||
|
||||
coreset0->duration = type0_PDCCH_CSS_config.num_symbols;
|
||||
|
||||
coreset0->cce_REG_MappingType.present=NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved;
|
||||
coreset0->cce_REG_MappingType.choice.interleaved=calloc(1,sizeof(*coreset0->cce_REG_MappingType.choice.interleaved));
|
||||
coreset0->cce_REG_MappingType.choice.interleaved->reg_BundleSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6;
|
||||
coreset0->cce_REG_MappingType.choice.interleaved->interleaverSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n2;
|
||||
coreset0->cce_REG_MappingType.choice.interleaved->shiftIndex = servingcellconfigcommon->physCellId;
|
||||
coreset0->cce_REG_MappingType.choice.interleaved->shiftIndex = calloc(1,sizeof(*coreset0->cce_REG_MappingType.choice.interleaved->shiftIndex));
|
||||
*coreset0->cce_REG_MappingType.choice.interleaved->shiftIndex = physCellId;
|
||||
coreset0->precoderGranularity = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle;
|
||||
|
||||
if(coreset0->tci_StatesPDCCH_ToAddList == NULL) coreset0->tci_StatesPDCCH_ToAddList = calloc(1,sizeof(*coreset0->tci_StatesPDCCH_ToAddList));
|
||||
|
||||
Reference in New Issue
Block a user