Merge remote-tracking branch 'origin/develop' into develop-CSI
# Conflicts: # openair2/LAYER2/NR_MAC_gNB/config.c # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c # openair2/RRC/NR/MESSAGES/asn1_msg.c # openair2/RRC/NR/rrc_gNB_reconfig.c # targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp # targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf # targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf # targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf # targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf # targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf # targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf # targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
This commit is contained in:
@@ -344,22 +344,24 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, rrc_pdsch_AntennaPorts
|
||||
uint32_t absolute_diff = (*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA);
|
||||
uint16_t sco = absolute_diff%(12*scs_scaling);
|
||||
// values of subcarrier offset larger than the limit only indicates CORESET for Type0-PDCCH CSS set is not present
|
||||
uint8_t ssb_SubcarrierOffset_limit = 0;
|
||||
int ssb_SubcarrierOffset_limit = 0;
|
||||
int offset_scaling = 0; //15kHz
|
||||
if(frequency_range == FR1) {
|
||||
ssb_SubcarrierOffset_limit = 24;
|
||||
} else {
|
||||
if (ssb_SubcarrierOffset<ssb_SubcarrierOffset_limit)
|
||||
offset_scaling = cfg->ssb_config.scs_common.value;
|
||||
} else
|
||||
ssb_SubcarrierOffset_limit = 12;
|
||||
}
|
||||
if (ssb_SubcarrierOffset<ssb_SubcarrierOffset_limit)
|
||||
AssertFatal(sco==(scs_scaling * ssb_SubcarrierOffset),"absoluteFrequencySSB has a subcarrier offset of %d while it should be %d\n",sco/scs_scaling,ssb_SubcarrierOffset);
|
||||
|
||||
AssertFatal(sco==(scs_scaling * ssb_SubcarrierOffset),
|
||||
"absoluteFrequencySSB has a subcarrier offset of %d while it should be %d\n",sco/scs_scaling,ssb_SubcarrierOffset);
|
||||
cfg->ssb_table.ssb_offset_point_a.value = absolute_diff/(12*scs_scaling) - 10; //absoluteFrequencySSB is the central frequency of SSB which is made by 20RBs in total
|
||||
cfg->ssb_table.ssb_offset_point_a.tl.tag = NFAPI_NR_CONFIG_SSB_OFFSET_POINT_A_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->ssb_table.ssb_period.value = *scc->ssb_periodicityServingCell;
|
||||
cfg->ssb_table.ssb_period.tl.tag = NFAPI_NR_CONFIG_SSB_PERIOD_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->ssb_table.ssb_subcarrier_offset.value = ssb_SubcarrierOffset;
|
||||
cfg->ssb_table.ssb_subcarrier_offset.value = ssb_SubcarrierOffset<<offset_scaling;
|
||||
cfg->ssb_table.ssb_subcarrier_offset.tl.tag = NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
@@ -449,6 +451,26 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, rrc_pdsch_AntennaPorts
|
||||
|
||||
}
|
||||
|
||||
int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP, rnti_t rnti, NR_SubcarrierSpacing_t subcarrierSpacing, uint32_t rrc_reconfiguration_delay) {
|
||||
|
||||
if (rrc_reconfiguration_delay == 0) {
|
||||
return -1;
|
||||
}
|
||||
const int UE_id = find_nr_UE_id(Mod_idP,rnti);
|
||||
if (UE_id < 0) {
|
||||
LOG_W(NR_MAC, "Could not find UE for RNTI 0x%04x\n", rnti);
|
||||
return -1;
|
||||
}
|
||||
|
||||
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
const uint16_t sf_ahead = 6/(0x01<<subcarrierSpacing) + ((6%(0x01<<subcarrierSpacing))>0);
|
||||
const uint16_t sl_ahead = sf_ahead * (0x01<<subcarrierSpacing);
|
||||
sched_ctrl->rrc_processing_timer = (rrc_reconfiguration_delay<<subcarrierSpacing) + sl_ahead;
|
||||
LOG_I(NR_MAC, "Activating RRC processing timer for UE %d\n", UE_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int ssb_SubcarrierOffset,
|
||||
@@ -472,14 +494,11 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
AssertFatal(RC.nrmac[Mod_idP]->UL_tti_req_ahead[0],
|
||||
"could not allocate memory for RC.nrmac[]->UL_tti_req_ahead[]\n");
|
||||
/* fill in slot/frame numbers: slot is fixed, frame will be updated by scheduler
|
||||
extern sf_ahead is initialized in ru_thread but that function is not executed yet here*/
|
||||
const uint16_t sf_ahead = (uint16_t) ceil((float)6/(0x01<<(*scc->ssbSubcarrierSpacing)));
|
||||
const uint16_t sl_ahead = sf_ahead * (0x01<<(*scc->ssbSubcarrierSpacing));
|
||||
/* consider that scheduler runs sl_ahead: the first sl_ahead slots are
|
||||
* already "in the past" and thus we put frame 1 instead of 0!*/
|
||||
* consider that scheduler runs sl_ahead: the first sl_ahead slots are
|
||||
* already "in the past" and thus we put frame 1 instead of 0! */
|
||||
for (int i = 0; i < n; ++i) {
|
||||
nfapi_nr_ul_tti_request_t *req = &RC.nrmac[Mod_idP]->UL_tti_req_ahead[0][i];
|
||||
req->SFN = i < (sl_ahead-1);
|
||||
req->SFN = i < (RC.nrmac[Mod_idP]->if_inst->sl_ahead-1);
|
||||
req->Slot = i;
|
||||
}
|
||||
RC.nrmac[Mod_idP]->common_channels[0].vrb_map_UL =
|
||||
@@ -531,12 +550,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
AssertFatal(RC.nrmac[Mod_idP]->common_channels[0].frame_type == FDD,"Dynamic TDD not handled yet\n");
|
||||
|
||||
for (int slot = 0; slot < n; ++slot) {
|
||||
/* FIXME: it seems there is a problem with slot 0/10/slots right after UL:
|
||||
* we just get retransmissions. Thus, do not schedule such slots in DL in TDD */
|
||||
if (RC.nrmac[Mod_idP]->common_channels[0].frame_type == FDD ||
|
||||
(slot % nr_slots_period != 0)){
|
||||
(slot != 0))
|
||||
RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) < nr_dl_slots) << (slot % 64);
|
||||
}
|
||||
RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64);
|
||||
|
||||
LOG_I(NR_MAC, "In %s: slot %d DL %d UL %d\n",
|
||||
@@ -657,8 +673,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
LOG_I(NR_MAC,"Modified UE_id %d/%x with CellGroup\n",UE_id,rnti);
|
||||
process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]);
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
sched_ctrl->update_pdsch_ps = true;
|
||||
sched_ctrl->update_pusch_ps = true;
|
||||
const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL;
|
||||
if (get_softmodem_params()->sa) {
|
||||
// add all available DL HARQ processes for this UE in SA
|
||||
@@ -699,8 +713,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
}
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
|
||||
|
||||
return(0);
|
||||
|
||||
return 0;
|
||||
}// END rrc_mac_config_req_gNB
|
||||
|
||||
Reference in New Issue
Block a user