Commit 8bc22710 authored by Roberto Rosca's avatar Roberto Rosca

conf parameters added (commented) + schedule sib19 only if parameters present in conf file

parent a197c0a4
...@@ -1475,7 +1475,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) ...@@ -1475,7 +1475,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
if (get_softmodem_params()->sa) { if (get_softmodem_params()->sa) {
nr_mac_configure_sib1(RC.nrmac[0], &info.plmn, info.nr_cellid, *info.tac); nr_mac_configure_sib1(RC.nrmac[0], &info.plmn, info.nr_cellid, *info.tac);
nr_mac_configure_sib19(RC.nrmac[0]); if (scc->ext2 && scc->ext2->ntn_Config_r17)
nr_mac_configure_sib19(RC.nrmac[0]);
} }
// read F1 Setup information from config and generated MIB/SIB1 // read F1 Setup information from config and generated MIB/SIB1
......
...@@ -262,10 +262,12 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_ ...@@ -262,10 +262,12 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
// This schedules MIB // This schedules MIB
schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req); schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req);
// This schedules SIB1 and SIB19 // This schedules SIB1
// SIB19 will be scheduled if ntn_Config_r17 is initialized
if (get_softmodem_params()->sa == 1) { if (get_softmodem_params()->sa == 1) {
schedule_nr_sib1(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req); schedule_nr_sib1(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req);
schedule_nr_sib19(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req); if (cc->sib19)
schedule_nr_sib19(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req);
} }
// This schedule PRACH if we are not in phy_test mode // This schedule PRACH if we are not in phy_test mode
......
...@@ -398,7 +398,6 @@ static uint32_t schedule_control_sib1(module_id_t module_id, ...@@ -398,7 +398,6 @@ static uint32_t schedule_control_sib1(module_id_t module_id,
return TBS; return TBS;
} }
static uint32_t schedule_control_other_si(module_id_t module_id, static uint32_t schedule_control_other_si(module_id_t module_id,
int CC_id, int CC_id,
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config, NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
...@@ -413,7 +412,7 @@ static uint32_t schedule_control_other_si(module_id_t module_id, ...@@ -413,7 +412,7 @@ static uint32_t schedule_control_other_si(module_id_t module_id,
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
uint16_t *vrb_map = cc->vrb_map; uint16_t *vrb_map = cc->vrb_map;
if (gNB_mac->sched_osi == NULL){ if (gNB_mac->sched_osi == NULL) {
gNB_mac->sched_osi = calloc(1, sizeof(NR_UE_sched_osi_ctrl_t)); gNB_mac->sched_osi = calloc(1, sizeof(NR_UE_sched_osi_ctrl_t));
struct NR_PDCCH_ConfigCommon__commonSearchSpaceList *commonSearchSpaceList = scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; struct NR_PDCCH_ConfigCommon__commonSearchSpaceList *commonSearchSpaceList = scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList;
NR_SearchSpaceId_t osi_SearchSpace = *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation; NR_SearchSpaceId_t osi_SearchSpace = *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation;
...@@ -471,7 +470,7 @@ static uint32_t schedule_control_other_si(module_id_t module_id, ...@@ -471,7 +470,7 @@ static uint32_t schedule_control_other_si(module_id_t module_id,
do { do {
if(rbSize < bwpSize && !(vrb_map[rbStart + rbSize]&SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols))) if(rbSize < bwpSize && !(vrb_map[rbStart + rbSize]&SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols)))
rbSize++; rbSize++;
else{ else {
if (pdsch->mcs<10) if (pdsch->mcs<10)
pdsch->mcs++; pdsch->mcs++;
else else
...@@ -744,8 +743,8 @@ static void nr_fill_nfapi_dl_other_si_pdu(int Mod_idP, ...@@ -744,8 +743,8 @@ static void nr_fill_nfapi_dl_other_si_pdu(int Mod_idP,
LOG_D(NR_MAC,"sib19:dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos); LOG_D(NR_MAC,"sib19:dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos);
pdsch_pdu_rel15->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(0, pdsch_pdu_rel15->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(0,
pdsch_pdu_rel15->BWPSize, pdsch_pdu_rel15->BWPSize,
1); 1);
pdsch_pdu_rel15->maintenance_parms_v3.ldpcBaseGraph = get_BG(TBS<<3,pdsch_pdu_rel15->targetCodeRate[0]); pdsch_pdu_rel15->maintenance_parms_v3.ldpcBaseGraph = get_BG(TBS<<3,pdsch_pdu_rel15->targetCodeRate[0]);
/* Fill PDCCH DL DCI PDU */ /* Fill PDCCH DL DCI PDU */
...@@ -933,17 +932,19 @@ void schedule_nr_sib19(module_id_t module_idP, ...@@ -933,17 +932,19 @@ void schedule_nr_sib19(module_id_t module_idP,
NR_COMMON_channels_t *cc = &gNB_mac->common_channels[0]; NR_COMMON_channels_t *cc = &gNB_mac->common_channels[0];
// get sib19 scheduling info from sib1 // get sib19 scheduling info from sib1
struct NR_SI_SchedulingInfo_v1700* si_schedulinginfo2_r17 = cc->sib1->message.choice.c1->choice.systemInformationBlockType1->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->si_SchedulingInfo_v1700; struct NR_SI_SchedulingInfo_v1700 *si_schedulinginfo2_r17 = cc->sib1->message.choice.c1->choice.systemInformationBlockType1->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->si_SchedulingInfo_v1700;
struct NR_SchedulingInfo2_r17* sib19_sched_info = NULL; struct NR_SchedulingInfo2_r17 *sib19_sched_info = NULL;
if (!si_schedulinginfo2_r17) {
LOG_E(GNB_APP, "SIB1 does not contain si_SchedulingInfo_v1700\n");
return;
}
bool found = false; bool found = false;
for (int i = 0; i < si_schedulinginfo2_r17->schedulingInfoList2_r17.list.count; i++) for (int i = 0; i < si_schedulinginfo2_r17->schedulingInfoList2_r17.list.count; i++) {
{ for (int j= 0; j < si_schedulinginfo2_r17->schedulingInfoList2_r17.list.array[i]->sib_MappingInfo_r17.list.count; j++) {
for (int j= 0; j < si_schedulinginfo2_r17->schedulingInfoList2_r17.list.array[i]->sib_MappingInfo_r17.list.count; j++)
{
if (si_schedulinginfo2_r17->schedulingInfoList2_r17.list.array[i]->sib_MappingInfo_r17.list.array[j]->sibType_r17.choice.type1_r17 == if (si_schedulinginfo2_r17->schedulingInfoList2_r17.list.array[i]->sib_MappingInfo_r17.list.array[j]->sibType_r17.choice.type1_r17 ==
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType19) NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType19) {
{
found = true; found = true;
sib19_sched_info = si_schedulinginfo2_r17->schedulingInfoList2_r17.list.array[i]; sib19_sched_info = si_schedulinginfo2_r17->schedulingInfoList2_r17.list.array[i];
break; break;
...@@ -985,8 +986,7 @@ void schedule_nr_sib19(module_id_t module_idP, ...@@ -985,8 +986,7 @@ void schedule_nr_sib19(module_id_t module_idP,
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = &gNB_mac->type0_PDCCH_CSS_config[i]; NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = &gNB_mac->type0_PDCCH_CSS_config[i];
if(((frameP - 1) % frame == 0) && if(((frameP - 1) % frame == 0) &&
(slotP == ((sib19_sched_info->si_WindowPosition_r17 % window_length) - 1)) && (slotP == ((sib19_sched_info->si_WindowPosition_r17 % window_length) - 1)) &&
(type0_PDCCH_CSS_config->num_rbs > 0)) (type0_PDCCH_CSS_config->num_rbs > 0)) {
{
LOG_D(NR_MAC,"(%d.%d) SIB19 transmission: ssb_index %d\n", frameP, slotP, type0_PDCCH_CSS_config->ssb_index); LOG_D(NR_MAC,"(%d.%d) SIB19 transmission: ssb_index %d\n", frameP, slotP, type0_PDCCH_CSS_config->ssb_index);
...@@ -1018,7 +1018,6 @@ void schedule_nr_sib19(module_id_t module_idP, ...@@ -1018,7 +1018,6 @@ void schedule_nr_sib19(module_id_t module_idP,
// Data to be transmitted // Data to be transmitted
memcpy(tx_req->TLVs[0].value.direct, cc->sib19_bcch_pdu, TBS); memcpy(tx_req->TLVs[0].value.direct, cc->sib19_bcch_pdu, TBS);
xer_fprint(stdout, &asn_DEF_NR_BCCH_DL_SCH_Message,(void *)cc->sib19);
tx_req->PDU_length = TBS; tx_req->PDU_length = TBS;
tx_req->PDU_index = pdu_index; tx_req->PDU_index = pdu_index;
......
...@@ -2245,7 +2245,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, ...@@ -2245,7 +2245,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc,
asn1cSeqAdd(&sib1->si_SchedulingInfo->schedulingInfoList.list,schedulingInfo);*/ asn1cSeqAdd(&sib1->si_SchedulingInfo->schedulingInfoList.list,schedulingInfo);*/
// sib19 scheduling info // sib19 scheduling info
// this condition ensures ntn-config is initialized // ensure ntn-config is initialized
if (scc->ext2 && scc->ext2->ntn_Config_r17) { if (scc->ext2 && scc->ext2->ntn_Config_r17) {
sib1->nonCriticalExtension = CALLOC(1, sizeof(struct NR_SIB1_v1610_IEs)); sib1->nonCriticalExtension = CALLOC(1, sizeof(struct NR_SIB1_v1610_IEs));
sib1->nonCriticalExtension->nonCriticalExtension = CALLOC(1, sizeof(struct NR_SIB1_v1630_IEs)); sib1->nonCriticalExtension->nonCriticalExtension = CALLOC(1, sizeof(struct NR_SIB1_v1630_IEs));
...@@ -2458,7 +2458,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, ...@@ -2458,7 +2458,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc,
// TODO: add nonCriticalExtension // TODO: add nonCriticalExtension
if (LOG_DEBUGFLAG(DEBUG_ASN1)) { if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_NR_SIB1, sib1_message->message.choice.c1->choice.systemInformationBlockType1); xer_fprint(stdout, &asn_DEF_NR_BCCH_DL_SCH_Message, sib1_message);
} }
return sib1_message; return sib1_message;
......
...@@ -165,6 +165,13 @@ gNBs = ...@@ -165,6 +165,13 @@ gNBs =
#ntn_Config_r17 #ntn_Config_r17
# cellSpecificKoffset_r17 = 478; # GEO satellite # cellSpecificKoffset_r17 = 478; # GEO satellite
# cellSpecificKoffset_r17 = 40; # LEO satellite # cellSpecificKoffset_r17 = 40; # LEO satellite
# ta-Common-r17 = 29319745;
# positionX-r17 = 0;
# positionY-r17 = 0;
# positionZ-r17 = 32433846;
# velocityVX-r17 = 0;
# velocityVY-r17 = 0;
# velocityVZ-r17 = 0;
} }
); );
......
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