Commit a197c0a4 authored by Roberto Rosca's avatar Roberto Rosca

Schedule SIB19 based on scheduling info from SIB1

parent b9d2f916
......@@ -231,6 +231,8 @@ NR_tda_info_t get_info_from_tda_tables(default_table_type_t table_type,
int dmrs_TypeA_Position,
int normal_CP);
NR_tda_info_t set_tda_info_from_list(NR_PDSCH_TimeDomainResourceAllocationList_t *tdalist, int tda_index);
default_table_type_t get_default_table_type(int mux_pattern);
void fill_coresetZero(NR_ControlResourceSet_t *coreset0, NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config);
......
......@@ -262,9 +262,11 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
// This schedules MIB
schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req);
// This schedules SIB1
if (get_softmodem_params()->sa == 1)
// This schedules SIB1 and SIB19
if (get_softmodem_params()->sa == 1) {
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);
}
// This schedule PRACH if we are not in phy_test mode
if (get_softmodem_params()->phy_test == 0) {
......
......@@ -673,7 +673,7 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP,
ul_dci_request_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu));
pdcch_pdu_rel15 = &ul_dci_request_pdu->pdcch_pdu.pdcch_pdu_rel15;
ul_dci_req->numPdus += 1;
nr_configure_pdcch(pdcch_pdu_rel15, coreset, &ra->sched_pdcch);
nr_configure_pdcch(pdcch_pdu_rel15, coreset, &ra->sched_pdcch, false);
nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15;
}
......@@ -1335,7 +1335,7 @@ static void nr_generate_Msg2(module_id_t module_idP,
dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu));
dl_req->nPDUs += 1;
pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
nr_configure_pdcch(pdcch_pdu_rel15, coreset, &ra->sched_pdcch);
nr_configure_pdcch(pdcch_pdu_rel15, coreset, &ra->sched_pdcch, false);
nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15;
}
......@@ -1577,7 +1577,7 @@ static void prepare_dl_pdus(gNB_MAC_INST *nr_mac,
dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu));
dl_req->nPDUs += 1;
pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
nr_configure_pdcch(pdcch_pdu_rel15, coreset, &ra->sched_pdcch);
nr_configure_pdcch(pdcch_pdu_rel15, coreset, &ra->sched_pdcch, false);
nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15;
}
......
......@@ -1074,7 +1074,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdcch_pdu = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
LOG_D(NR_MAC,"Trying to configure DL pdcch for UE %04x, bwp %d, cs %d\n", UE->rnti, bwp_id, coresetid);
NR_ControlResourceSet_t *coreset = sched_ctrl->coreset;
nr_configure_pdcch(pdcch_pdu, coreset, &sched_ctrl->sched_pdcch);
nr_configure_pdcch(pdcch_pdu, coreset, &sched_ctrl->sched_pdcch, false);
gNB_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu;
}
......
......@@ -870,7 +870,8 @@ int nr_get_default_pucch_res(int pucch_ResourceCommon) {
void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
NR_ControlResourceSet_t *coreset,
NR_sched_pdcch_t *pdcch) {
NR_sched_pdcch_t *pdcch,
bool otherSI) {
pdcch_pdu->BWPSize = pdcch->BWPSize;
......@@ -892,12 +893,17 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
pdcch_pdu->InterleaverSize = pdcch->InterleaverSize;
pdcch_pdu->ShiftIndex = pdcch->ShiftIndex;
if(coreset->controlResourceSetId == 0) {
pdcch_pdu->CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1;
} else{
if (otherSI) {
pdcch_pdu->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG;
}
else {
if (coreset->controlResourceSetId == 0) {
pdcch_pdu->CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1;
} else {
pdcch_pdu->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG;
}
}
//precoderGranularity
pdcch_pdu->precoderGranularity = coreset->precoderGranularity;
}
......
......@@ -2558,7 +2558,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot, n
ul_dci_request_pdu->PDUSize = (uint8_t)(4+sizeof(nfapi_nr_dl_tti_pdcch_pdu));
pdcch_pdu = &ul_dci_request_pdu->pdcch_pdu.pdcch_pdu_rel15;
ul_dci_req->numPdus += 1;
nr_configure_pdcch(pdcch_pdu, coreset, &sched_ctrl->sched_pdcch);
nr_configure_pdcch(pdcch_pdu, coreset, &sched_ctrl->sched_pdcch, false);
pdcch_pdu_coreset[coresetid] = pdcch_pdu;
}
......
......@@ -87,6 +87,12 @@ void schedule_nr_sib1(module_id_t module_idP,
nfapi_nr_dl_tti_request_t *DL_req,
nfapi_nr_tx_data_request_t *TX_req);
void schedule_nr_sib19(module_id_t module_idP,
frame_t frameP,
sub_frame_t slotP,
nfapi_nr_dl_tti_request_t *DL_req,
nfapi_nr_tx_data_request_t *TX_req);
void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, nfapi_nr_dl_tti_request_t *DL_req);
/* \brief main UL scheduler function. Calls a preprocessor to decide on
......@@ -203,7 +209,8 @@ void find_search_space(int ss_type,
void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
NR_ControlResourceSet_t *coreset,
NR_sched_pdcch_t *pdcch);
NR_sched_pdcch_t *pdcch,
bool otherSI);
NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac,
NR_SearchSpace_t *ss,
......
......@@ -667,6 +667,19 @@ typedef struct {
seq_arr_t lc_config;
} NR_UE_sched_ctrl_t;
typedef struct {
NR_SearchSpace_t *search_space;
NR_ControlResourceSet_t *coreset;
NR_sched_pdcch_t sched_pdcch;
NR_sched_pdsch_t sched_pdsch;
uint32_t num_total_bytes;
int cce_index;
uint8_t aggregation_level;
} NR_UE_sched_osi_ctrl_t;
typedef struct {
uicc_t *uicc;
} NRUEcontext_t;
......@@ -881,7 +894,9 @@ typedef struct gNB_MAC_INST_s {
nr_mac_config_t radio_config;
NR_UE_sched_osi_ctrl_t *sched_osi;
NR_UE_sched_ctrl_t *sched_ctrlCommon;
uint16_t cset0_bwp_start;
uint16_t cset0_bwp_size;
NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config[64];
......
......@@ -2256,7 +2256,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc,
struct NR_SchedulingInfo2_r17 *si_schedulinginfo2_r17 = CALLOC(1, sizeof(struct NR_SchedulingInfo2_r17));
si_schedulinginfo2_r17->si_BroadcastStatus_r17 = NR_SchedulingInfo2_r17__si_BroadcastStatus_r17_broadcasting;
si_schedulinginfo2_r17->si_WindowPosition_r17 = 2;
si_schedulinginfo2_r17->si_Periodicity_r17 = NR_SchedulingInfo2_r17__si_Periodicity_r17_rf16;
si_schedulinginfo2_r17->si_Periodicity_r17 = NR_SchedulingInfo2_r17__si_Periodicity_r17_rf8;
struct NR_SIB_TypeInfo_v1700 *sib_type_info = CALLOC(1, sizeof(struct NR_SIB_TypeInfo_v1700));
sib_type_info->sibType_r17.present = NR_SIB_TypeInfo_v1700__sibType_r17_PR_type1_r17;
......
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