Commit d93a2c43 authored by Anton Kozhemiachenko's avatar Anton Kozhemiachenko Committed by Jerome PERALDI

NR Paging support

- Add nrUE support (basic) for Paging
parent c66d3d14
......@@ -220,6 +220,7 @@ static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
int dl_tti_sfn_slot = NFAPI_SFNSLOT2HEX(dl_tti_request->SFN, dl_tti_request->Slot);
LOG_A(NR_MAC, "[%d %d] sfn/slot dl_tti_request received \n",
NFAPI_SFNSLOT2SFN(dl_tti_sfn_slot), NFAPI_SFNSLOT2SLOT(dl_tti_sfn_slot));
LOG_E(NR_MAC, "@@@ BLABLA [%d %d] sfn/slot dl_tti_request received \n", NFAPI_SFNSLOT2SFN(dl_tti_sfn_slot), NFAPI_SFNSLOT2SLOT(dl_tti_sfn_slot)); //TODO:BLA
nfapi_nr_tx_data_request_t *tx_data_request = unqueue_matching(&nr_tx_req_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &dl_tti_sfn_slot);
if (!tx_data_request) {
LOG_E(NR_MAC, "[%d %d] No corresponding tx_data_request for given dl_tti_request sfn/slot\n",
......
......@@ -21,6 +21,7 @@
#define FAPI_NR_DCI_IND 0x04
#define FAPI_NR_RX_PDU_TYPE_RAR 0x05
#define FAPI_NR_CSIRS_IND 0x06
#define FAPI_NR_RX_PDU_TYPE_PCH 0x07
#define FAPI_NR_SIBS_MASK_SIB1 0x1
......
......@@ -291,6 +291,8 @@ typedef struct {
bool index_has_sib[NR_MAX_HARQ_PROCESSES];
bool expected_rar;
bool index_has_rar[NR_MAX_HARQ_PROCESSES];
bool expected_paging;
bool index_has_paging[NR_MAX_HARQ_PROCESSES];
bool expected_dci;
bool index_has_dci[NR_MAX_HARQ_PROCESSES];
emul_l1_harq_t harq[NR_MAX_HARQ_PROCESSES];
......
......@@ -79,6 +79,14 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id,
uint8_t *pduP,
uint32_t pdu_len);
int8_t nr_ue_decode_paging(module_id_t module_id,
int cc_id,
uint8_t gNB_index,
frame_t frame,
slot_t slot,
void *pduP,
uint32_t pdu_len);
/**\brief primitive from RRC layer to MAC layer to set if bearer exists for a logical channel. todo handle mac_LogicalChannelConfig
\param module_id module id
\param cc_id component carrier id
......
......@@ -409,6 +409,17 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id,
return 0;
}
int8_t nr_ue_decode_paging(module_id_t module_id,
int cc_id,
uint8_t gNB_index,
frame_t frame,
slot_t slot,
void *pduP,
uint32_t pdu_len)
{
return nr_mac_rrc_data_ind_ue(module_id, cc_id, gNB_index, frame, slot, P_RNTI, PCCH, (uint8_t *) pduP, pdu_len);
}
// TODO: change to UE parameter, scs: 15KHz, slot duration: 1ms
uint32_t get_ssb_frame(uint32_t test){
return test;
......@@ -1005,7 +1016,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
return -1;
}
if(rnti != ra->ra_rnti && rnti != SI_RNTI)
LOG_E(MAC, ">>> BLABLA [%d.%d] BEFORE ASSERT RNTI=%x!\n", frame, slot, rnti); //TODO:BLA
if(rnti != ra->ra_rnti && rnti != SI_RNTI && rnti != P_RNTI)
AssertFatal(1+dci->pdsch_to_harq_feedback_timing_indicator.val>=DURATION_RX_TO_TX,"PDSCH to HARQ feedback time (%d) cannot be less than DURATION_RX_TO_TX (%d).\n",
1+dci->pdsch_to_harq_feedback_timing_indicator.val,DURATION_RX_TO_TX);
......@@ -2763,7 +2775,8 @@ void nr_ue_send_sdu(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t *u
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_IN);
LOG_D(MAC, "In %s [%d.%d] Handling DLSCH PDU...\n", __FUNCTION__, dl_info->frame, dl_info->slot);
LOG_D(MAC, "In %s [%d.%d] Handling PDSCH PDU...\n", __FUNCTION__, dl_info->frame, dl_info->slot);
LOG_E(MAC, ">>> BLABLA In %s [%d.%d] Handling PDSCH PDU...\n", __FUNCTION__, dl_info->frame, dl_info->slot); //TODO:BLA
// Processing MAC PDU
// it parses MAC CEs subheaders, MAC CEs, SDU subheaderds and SDUs
......@@ -2774,6 +2787,15 @@ void nr_ue_send_sdu(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t *u
case FAPI_NR_RX_PDU_TYPE_RAR:
nr_ue_process_rar(dl_info, ul_time_alignment, pdu_id);
break;
case FAPI_NR_RX_PDU_TYPE_PCH:
nr_ue_decode_paging(dl_info->module_id,
dl_info->cc_id,
dl_info->gNB_index,
dl_info->frame,
dl_info->slot,
dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.pdu,
dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.pdu_length);
break;
default:
break;
}
......@@ -3503,6 +3525,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
}
LOG_D(MAC, "In %s [%d.%d]: processing PDU %d (with length %d) of %d total number of PDUs...\n", __FUNCTION__, frameP, slot, pdu_id, pdu_len, dl_info->rx_ind->number_pdus);
LOG_E(MAC, ">>> BLABLA In %s [%d.%d]: processing PDU %d (with length %d) of %d total number of PDUs...\n", __FUNCTION__, frameP, slot, pdu_id, pdu_len, dl_info->rx_ind->number_pdus); //TODO:BLA
while (!done && pdu_len > 0){
uint16_t mac_len = 0x0000;
......@@ -3510,6 +3533,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
uint8_t rx_lcid = ((NR_MAC_SUBHEADER_FIXED *)pduP)->LCID;
LOG_D(MAC, "[UE] LCID %d, PDU length %d\n", rx_lcid, pdu_len);
LOG_E(MAC, ">>> BLABLA [UE] LCID %d, PDU length %d\n", rx_lcid, pdu_len); //TODO:BLA
bool ret;
switch(rx_lcid){
// MAC CE
......
......@@ -1320,7 +1320,122 @@ void nr_schedule_ue_spec(module_id_t module_id,
}
}
uint32_t schedule_control_paging(module_id_t module_id,
int CC_id,
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
int time_domain_allocation,
NR_pdsch_dmrs_t *dmrs_parms,
NR_tda_info_t *tda_info,
uint16_t num_total_bytes) {
gNB_MAC_INST *gNB_mac = RC.nrmac[module_id];
NR_COMMON_channels_t *cc = &gNB_mac->common_channels[CC_id];
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
uint16_t *vrb_map = cc->vrb_map;
LOG_D(NR_MAC," fxn:%s Entry \n", __FUNCTION__);
if (gNB_mac->sched_ctrlCommon == NULL){
LOG_D(NR_MAC,"schedule_control_common: Filling nr_mac->sched_ctrlCommon\n");
LOG_D(NR_MAC," fxn:%s gNB_mac->cset0_bwp_start=type0_PDCCH_CSS_config->cset_start_rb:%d gNB_mac->cset0_bwp_size=type0_PDCCH_CSS_config->num_rbs:%d \n",
__FUNCTION__,
gNB_mac->cset0_bwp_start,
gNB_mac->cset0_bwp_size);
gNB_mac->sched_ctrlCommon = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon));
gNB_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->search_space));
gNB_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->coreset));
fill_searchSpaceZero(gNB_mac->sched_ctrlCommon->search_space,type0_PDCCH_CSS_config);
fill_coresetZero(gNB_mac->sched_ctrlCommon->coreset,type0_PDCCH_CSS_config);
gNB_mac->cset0_bwp_start = type0_PDCCH_CSS_config->cset_start_rb;
gNB_mac->cset0_bwp_size = type0_PDCCH_CSS_config->num_rbs;
gNB_mac->sched_ctrlCommon->sched_pdcch = set_pdcch_structure(NULL,
gNB_mac->sched_ctrlCommon->search_space,
gNB_mac->sched_ctrlCommon->coreset,
scc,
NULL,
type0_PDCCH_CSS_config);
}
NR_sched_pdsch_t *pdsch = &gNB_mac->sched_ctrlCommon->sched_pdsch;
pdsch->time_domain_allocation = time_domain_allocation;
pdsch->dmrs_parms = *dmrs_parms;
pdsch->tda_info = *tda_info;
pdsch->mcs = 0; // starting from mcs 0
gNB_mac->sched_ctrlCommon->num_total_bytes = num_total_bytes;
uint8_t nr_of_candidates;
for (int i=0; i<3; i++) {
find_aggregation_candidates(&gNB_mac->sched_ctrlCommon->aggregation_level, &nr_of_candidates, gNB_mac->sched_ctrlCommon->search_space,4<<i);
if (nr_of_candidates>0) break; // choosing the lower value of aggregation level available
}
AssertFatal(nr_of_candidates>0,"nr_of_candidates is 0\n");
gNB_mac->sched_ctrlCommon->cce_index = find_pdcch_candidate(gNB_mac,
CC_id,
gNB_mac->sched_ctrlCommon->aggregation_level,
nr_of_candidates,
&gNB_mac->sched_ctrlCommon->sched_pdcch,
gNB_mac->sched_ctrlCommon->coreset,
0);
LOG_D(MAC,"cce_index: %d\n", gNB_mac->sched_ctrlCommon->cce_index);
AssertFatal(gNB_mac->sched_ctrlCommon->cce_index >= 0, "Could not find CCE for coreset0\n");
const uint16_t bwpSize = type0_PDCCH_CSS_config->num_rbs;
int rbStart = type0_PDCCH_CSS_config->cset_start_rb;
if(RC.ss.mode >= SS_SOFTMODEM)
rbStart = 27;
// Calculate number of PRB_DMRS
uint8_t N_PRB_DMRS = pdsch->dmrs_parms.N_PRB_DMRS;
uint16_t dmrs_length = pdsch->dmrs_parms.N_DMRS_SLOT;
LOG_D(MAC,"dlDmrsSymbPos %x\n",pdsch->dmrs_parms.dl_dmrs_symb_pos);
int mcsTableIdx = 0;
int rbSize = 0;
uint32_t TBS = 0;
do {
if(rbSize < bwpSize && !(vrb_map[rbStart + rbSize]&SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols)))
rbSize++;
else{
if (pdsch->mcs<10)
pdsch->mcs++;
else
break;
}
TBS = nr_compute_tbs(nr_get_Qm_dl(pdsch->mcs, mcsTableIdx),
nr_get_code_rate_dl(pdsch->mcs, mcsTableIdx),
rbSize, tda_info->nrOfSymbols, N_PRB_DMRS * dmrs_length,0, 0,1) >> 3;
} while (TBS < gNB_mac->sched_ctrlCommon->num_total_bytes);
AssertFatal(TBS>=gNB_mac->sched_ctrlCommon->num_total_bytes,"Couldn't allocate enough resources for %d bytes in Paging PDSCH\n",
gNB_mac->sched_ctrlCommon->num_total_bytes);
pdsch->rbSize = rbSize;
pdsch->rbStart = 0;
LOG_D(NR_MAC,"mcs = %i\n", pdsch->mcs);
LOG_D(NR_MAC,"startSymbolIndex = %i\n", tda_info->startSymbolIndex);
LOG_D(NR_MAC,"nrOfSymbols = %i\n", tda_info->nrOfSymbols);
LOG_D(NR_MAC, "rbSize = %i\n", pdsch->rbSize);
LOG_D(NR_MAC,"TBS = %i\n", TBS);
LOG_D(NR_MAC,"dmrs_length %d\n",dmrs_length);
LOG_D(NR_MAC,"N_PRB_DMRS = %d\n",N_PRB_DMRS);
LOG_D(NR_MAC,"mappingtype = %d\n", tda_info->mapping_type);
// Mark the corresponding RBs as used
fill_pdcch_vrb_map(gNB_mac,
CC_id,
&gNB_mac->sched_ctrlCommon->sched_pdcch,
gNB_mac->sched_ctrlCommon->cce_index,
gNB_mac->sched_ctrlCommon->aggregation_level);
for (int rb = 0; rb < pdsch->rbSize; rb++) {
vrb_map[rb + rbStart] |= SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols);
}
LOG_D(NR_MAC," fxn:%s Exit\n", __FUNCTION__);
return TBS;
}
void nr_fill_nfapi_dl_paging_pdu(int Mod_idP,
int CC_id,
nfapi_nr_dl_tti_request_body_t *dl_req,
int pdu_index,
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
......@@ -1329,35 +1444,32 @@ void nr_fill_nfapi_dl_paging_pdu(int Mod_idP,
int NrOfSymbols) {
gNB_MAC_INST *gNB_mac = RC.nrmac[Mod_idP];
NR_COMMON_channels_t *cc = gNB_mac->common_channels;
NR_COMMON_channels_t *cc = &gNB_mac->common_channels[CC_id];
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
int mcsTableIdx = 0;
NR_sched_pdsch_t *pdsch = &gNB_mac->sched_ctrlCommon->sched_pdsch;
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs];
memset((void*)dl_tti_pdcch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs++];
memset((void*)dl_tti_pdcch_pdu, 0, sizeof(nfapi_nr_dl_tti_request_pdu_t));
dl_tti_pdcch_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE;
dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu));
dl_req->nPDUs += 1;
dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu));
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
nr_configure_pdcch(pdcch_pdu_rel15,
gNB_mac->sched_ctrlCommon->coreset,
true, // sib1
false,
&gNB_mac->sched_ctrlCommon->sched_pdcch);
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs];
memset((void*)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs++];
memset((void*)dl_tti_pdsch_pdu, 0, sizeof(nfapi_nr_dl_tti_request_pdu_t));
dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE;
dl_tti_pdsch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdsch_pdu));
dl_req->nPDUs += 1;
dl_tti_pdsch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdsch_pdu));
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15;
pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1;
pdsch_pdu_rel15->pduBitmap = 0;
pdsch_pdu_rel15->rnti = P_RNTI;
pdsch_pdu_rel15->pduIndex = pdu_index;
pdsch_pdu_rel15->BWPSize = type0_PDCCH_CSS_config->num_rbs;
pdsch_pdu_rel15->BWPSize = type0_PDCCH_CSS_config->num_rbs;
pdsch_pdu_rel15->BWPStart = type0_PDCCH_CSS_config->cset_start_rb;
pdsch_pdu_rel15->SubcarrierSpacing = type0_PDCCH_CSS_config->scs_pdcch;
......@@ -1388,18 +1500,21 @@ void nr_fill_nfapi_dl_paging_pdu(int Mod_idP,
pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex;
pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols;
pdsch_pdu_rel15->dlDmrsSymbPos = pdsch->dmrs_parms.dl_dmrs_symb_pos;
LOG_D(NR_MAC,"sib1:bwpStart %d, bwpSize %d\n",pdsch_pdu_rel15->BWPStart,pdsch_pdu_rel15->BWPSize);
LOG_D(NR_MAC,"sib1:rbStart %d, rbSize %d\n",pdsch_pdu_rel15->rbStart,pdsch_pdu_rel15->rbSize);
LOG_D(NR_MAC,"sib1:dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos);
LOG_D(NR_MAC, "paging:bwpStart %d, bwpSize %d\n", pdsch_pdu_rel15->BWPStart, pdsch_pdu_rel15->BWPSize);
LOG_D(NR_MAC, "paging:rbStart %d, rbSize %d\n", pdsch_pdu_rel15->rbStart, pdsch_pdu_rel15->rbSize);
LOG_D(NR_MAC, "paging:dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos);
LOG_E(NR_MAC, ">>> BLABLABLA paging:bwpStart %d, bwpSize %d\n", pdsch_pdu_rel15->BWPStart, pdsch_pdu_rel15->BWPSize); //TODO:BLA
LOG_E(NR_MAC, ">>> BLABLABLA paging:rbStart %d, rbSize %d\n", pdsch_pdu_rel15->rbStart, pdsch_pdu_rel15->rbSize); //TODO:BLA
LOG_E(NR_MAC, ">>> BLABLABLA paging:dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos); //TODO:BLA
LOG_E(NR_MAC, ">>> BLABLABLA paging: mcs=%d mcsTableIdx=%d StartSymbolIndex=%d NrOfSymbols=%d\n", pdsch->mcs, mcsTableIdx, StartSymbolIndex, NrOfSymbols); //TODO:BLA
pdsch_pdu_rel15->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(0,
pdsch_pdu_rel15->BWPSize,
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 */
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci];
pdcch_pdu_rel15->numDlDci++;
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci++];
dci_pdu->RNTI = P_RNTI;
dci_pdu->ScramblingId = *scc->physCellId;
dci_pdu->ScramblingRNTI = 0;
......@@ -1415,8 +1530,9 @@ void nr_fill_nfapi_dl_paging_pdu(int Mod_idP,
dci_payload.bwp_indicator.val = 0;
// frequency domain assignment
dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(
pdsch_pdu_rel15->rbSize, pdsch_pdu_rel15->rbStart, type0_PDCCH_CSS_config->num_rbs);
dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize,
pdsch_pdu_rel15->rbStart,
type0_PDCCH_CSS_config->num_rbs);
dci_payload.time_domain_assignment.val = gNB_mac->sched_ctrlCommon->sched_pdsch.time_domain_allocation;
dci_payload.mcs = pdsch->mcs;
......@@ -1431,7 +1547,7 @@ void nr_fill_nfapi_dl_paging_pdu(int Mod_idP,
dci_payload.dmrs_sequence_initialization.val = pdsch_pdu_rel15->SCID;
int dci_format = NR_DL_DCI_FORMAT_1_0;
int rnti_type = NR_RNTI_P;
int rnti_type = NR_RNTI_C;
fill_dci_pdu_rel15(scc,
NULL,
......@@ -1446,46 +1562,43 @@ void nr_fill_nfapi_dl_paging_pdu(int Mod_idP,
gNB_mac->sched_ctrlCommon->coreset,
gNB_mac->cset0_bwp_size);
LOG_D(MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize);
LOG_D(MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart);
LOG_D(MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing);
LOG_D(MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix);
LOG_D(MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex);
LOG_D(MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols);
for(int n=0;n<6;n++) LOG_D(MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]);
LOG_D(MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType);
LOG_D(MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize);
LOG_D(MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize);
LOG_D(MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType);
LOG_D(MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex);
LOG_D(MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity);
LOG_D(MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci);
LOG_D(NR_MAC, "paging:BWPSize: %i\n", pdcch_pdu_rel15->BWPSize);
LOG_D(NR_MAC, "paging:BWPStart: %i\n", pdcch_pdu_rel15->BWPStart);
LOG_D(NR_MAC, "paging:SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing);
LOG_D(NR_MAC, "paging:CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix);
LOG_D(NR_MAC, "paging:StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex);
LOG_D(NR_MAC, "paging:DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols);
for(int n=0;n<6;n++) LOG_D(NR_MAC, "paging:FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]);
LOG_D(NR_MAC, "paging:CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType);
LOG_D(NR_MAC, "paging:RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize);
LOG_D(NR_MAC, "paging:InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize);
LOG_D(NR_MAC, "paging:CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType);
LOG_D(NR_MAC, "paging:ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex);
LOG_D(NR_MAC, "paging:precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity);
LOG_D(NR_MAC, "paging:numDlDci: %i\n", pdcch_pdu_rel15->numDlDci);
}
void schedule_nr_PCH(module_id_t module_idP,
frame_t frameP,
sub_frame_t slotP) {
uint16_t pcch_sdu_length;
int mcs = -1;
int CC_id;
gNB_MAC_INST *gNB_mac = RC.nrmac[module_idP];
int CC_id;
uint16_t pcch_sdu_length;
uint8_t *pcch_sdu;
NR_COMMON_channels_t *cc;
uint8_t *vrb_map;
int n_rb_dl;
int first_rb = -1;
nfapi_dl_config_request_pdu_t *dl_config_pdu;
nfapi_tx_request_pdu_t *TX_req;
NR_ServingCellConfigCommon_t *scc;
nfapi_nr_dl_tti_request_body_t *dl_req;
nfapi_nr_pdu_t *tx_req;
UE_PF_PO_t *ue_pf_po;
start_meas(&gNB_mac->schedule_pch);
for (CC_id = 0; CC_id < RC.nb_nr_mac_CC[module_idP]; CC_id++) {
cc = &gNB_mac->common_channels[CC_id];
/* vrb_map = (void *) &cc->vrb_map; */
/* n_rb_dl = to_prb(cc->mib->message.dl_Bandwidth); */
dl_req = &gNB_mac->DL_req[CC_id].dl_tti_request_body;
cc = &gNB_mac->common_channels[CC_id];
scc = cc->ServingCellConfigCommon;
pcch_sdu = &cc->PCCH_pdu.payload[0];
dl_req = &gNB_mac->DL_req[CC_id].dl_tti_request_body;
for (uint16_t i = 0; i < MAX_MOBILES_PER_GNB; i++) {
ue_pf_po = &UE_PF_PO[CC_id][i];
......@@ -1501,7 +1614,7 @@ void schedule_nr_PCH(module_id_t module_idP,
PCCH,
P_RNTI,
1,
&cc->PCCH_pdu.payload[0]);
pcch_sdu);
if (pcch_sdu_length == 0) {
LOG_D(NR_MAC, "[gNB %d] Frame %d slot %d: PCCH not active(size = 0 byte)\n",
......@@ -1519,88 +1632,30 @@ void schedule_nr_PCH(module_id_t module_idP,
CC_id,
i,
pcch_sdu_length);
LOG_E(NR_MAC, "@@@@@@@@@@ BLABLA [gNB %d] Frame %d slot %d: PCCH->PCH CC_id %d UE_id %d, Received %d bytes \n", module_idP, frameP, slotP, CC_id, i, pcch_sdu_length); //TODO:BLA
#if 0
//NO SIB
if ((slotP == 0 || slotP == 1 || slotP == 2 || slotP == 4 || slotP == 6 || slotP == 9) ||
(slotP == 5 && ((frameP % 2) != 0 && (frameP % 8) != 1))) {
switch (n_rb_dl) {
case 25:
first_rb = 10;
break;
case 50:
first_rb = 24;
break;
LOG_E(NR_MAC, "@@@@@@@@@@ BLABLA [gNB %d] Frame %d slot %d: PCCH->PCH CC_id %d UE_id %d, Received %d bytes ue_index=%d \n", module_idP, frameP, slotP, CC_id, i, pcch_sdu_length, ue_pf_po->ue_index_value); //TODO:BLA
case 100:
first_rb = 48;
break;
}
} else if (slotP == 5 && ((frameP % 2) == 0 || (frameP % 8) == 1)) { // SIB + paging
switch (n_rb_dl) {
case 25:
first_rb = 14;
break;
case 50:
first_rb = 28;
break;
case 100:
first_rb = 52;
break;
}
}
vrb_map[first_rb] = 1;
vrb_map[first_rb + 1] = 1;
vrb_map[first_rb + 2] = 1;
vrb_map[first_rb + 3] = 1;
/* Get MCS for length of PCH */
if (pcch_sdu_length <= get_TBS_DL(0, 3)) {
mcs = 0;
} else if (pcch_sdu_length <= get_TBS_DL(1, 3)) {
mcs = 1;
} else if (pcch_sdu_length <= get_TBS_DL(2, 3)) {
mcs = 2;
} else if (pcch_sdu_length <= get_TBS_DL(3, 3)) {
mcs = 3;
} else if (pcch_sdu_length <= get_TBS_DL(4, 3)) {
mcs = 4;
} else if (pcch_sdu_length <= get_TBS_DL(5, 3)) {
mcs = 5;
} else if (pcch_sdu_length <= get_TBS_DL(6, 3)) {
mcs = 6;
} else if (pcch_sdu_length <= get_TBS_DL(7, 3)) {
mcs = 7;
} else if (pcch_sdu_length <= get_TBS_DL(8, 3)) {
mcs = 8;
} else if (pcch_sdu_length <= get_TBS_DL(9, 3)) {
mcs = 9;
}
#endif
int time_domain_allocation = gNB_mac->sib1_tda;
NR_ServingCellConfigCommon_t *scc = gNB_mac->common_channels[CC_id].ServingCellConfigCommon;
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = gNB_mac->type0_PDCCH_CSS_config;
int time_domain_allocation = get_dl_tda(gNB_mac, scc, slotP);
int startSymbolIndex = 0;
int nrOfSymbols = 0;
bool is_typeA;
LOG_D(NR_MAC,"type0_pdcch_ss_mux_pattern: %i\n", type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern);
LOG_D(NR_MAC,"time_domain_allocation: %i\n", time_domain_allocation);
LOG_D(NR_MAC,"dmrs_TypeA_Position: %i\n", gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position);
LOG_D(NR_MAC, "paging:type0_pdcch_ss_mux_pattern: %i\n", type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern);
LOG_D(NR_MAC, "paging:time_domain_allocation: %i\n", time_domain_allocation);
LOG_D(NR_MAC, "paging:dmrs_TypeA_Position: %i\n", scc->dmrs_TypeA_Position);
LOG_E(NR_MAC, ">>> BLABLABLA paging:type0_pdcch_ss_mux_pattern: %i\n", type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern); //TODO:BLA
LOG_E(NR_MAC, ">>> BLABLABLA paging:time_domain_allocation: %i\n", time_domain_allocation); //TODO:BLA
LOG_E(NR_MAC, ">>> BLABLABLA paging:dmrs_TypeA_Position: %i\n", scc->dmrs_TypeA_Position); //TODO:BLA
get_info_from_tda_tables(type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern,
time_domain_allocation,
gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position,
1, &is_typeA,
&startSymbolIndex, &nrOfSymbols);
AssertFatal((startSymbolIndex+nrOfSymbols)<14,"SIB1 TDA %d would cause overlap with CSI-RS. Please select a different SIB1 TDA.\n",time_domain_allocation);
1,
&is_typeA,
&startSymbolIndex,
&nrOfSymbols);
LOG_E(NR_MAC, ">>> BLABLABLA paging: StartSymbolIndex=%d NrOfSymbols=%d\n", startSymbolIndex, nrOfSymbols); //TODO:BLA
NR_tda_info_t tda_info = {
.mapping_type = is_typeA ? typeA : typeB,
......@@ -1613,193 +1668,67 @@ void schedule_nr_PCH(module_id_t module_idP,
&tda_info,
1);
uint8_t candidate_idx = 0;
/* uint32_t TBS = pcch_sdu_length; */
uint32_t TBS = schedule_control_sib1(module_idP, CC_id,
type0_PDCCH_CSS_config,
time_domain_allocation,
&dmrs_parms,
&tda_info,
candidate_idx,
pcch_sdu_length);
LOG_E(NR_MAC,">>>> BLABLABLA PAGING TBS=%d (len=%d)\n", TBS, pcch_sdu_length);
uint32_t TBS = schedule_control_paging(module_idP,
CC_id,
type0_PDCCH_CSS_config,
time_domain_allocation,
&dmrs_parms,
&tda_info,
pcch_sdu_length);
LOG_E(NR_MAC,">>>> BLABLABLA PAGING TBS=%d (len=%d)\n", TBS, pcch_sdu_length); //TODO:BLA
int pdu_index = gNB_mac->pdu_index[0]++;
nr_fill_nfapi_dl_paging_pdu(module_idP, dl_req, pdu_index, type0_PDCCH_CSS_config, TBS, startSymbolIndex, nrOfSymbols);
const int ntx_req = gNB_mac->TX_req[CC_id].Number_of_PDUs;
nfapi_nr_pdu_t *tx_req = &gNB_mac->TX_req[CC_id].pdu_list[ntx_req];
nr_fill_nfapi_dl_paging_pdu(module_idP,
CC_id,
dl_req,
pdu_index,
type0_PDCCH_CSS_config,
TBS,
startSymbolIndex,
nrOfSymbols);
// Add padding header and zero rest out if there is space left
if (pcch_sdu_length < TBS) {
NR_MAC_SUBHEADER_FIXED *padding = (NR_MAC_SUBHEADER_FIXED *) &pcch_sdu[pcch_sdu_length];
padding->R = 0;
padding->LCID = DL_SCH_LCID_PADDING;
for (int k = pcch_sdu_length + 1; k < TBS; k++) {
pcch_sdu[k] = 0;
}
}
tx_req = &gNB_mac->TX_req[CC_id].pdu_list[gNB_mac->TX_req[CC_id].Number_of_PDUs++];
// Data to be transmitted
memcpy(tx_req->TLVs[0].value.direct, &cc->PCCH_pdu.payload[0], TBS);
memcpy(tx_req->TLVs[0].value.direct, pcch_sdu, TBS);
tx_req->PDU_length = TBS;
tx_req->PDU_index = pdu_index;
tx_req->num_TLV = 1;
tx_req->TLVs[0].length = TBS + 2;
gNB_mac->TX_req[CC_id].Number_of_PDUs++;
tx_req->TLVs[0].length = tx_req->PDU_length + 2;
gNB_mac->TX_req[CC_id].SFN = frameP;
gNB_mac->TX_req[CC_id].Slot = slotP;
#if 0
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu,
0,
sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_rb_dl, first_rb, 4);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFE; // P-RNTI
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // P-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
if (!CCE_allocation_infeasible(module_idP,
CC_id,
0,
slotP,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,
P_RNTI)) {
LOG_D(NR_MAC,"Frame %d: slot %d : Adding common DCI for P_RNTI\n",
frameP,
slotP);
dl_req->number_dci++;
dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
gNB_mac->DL_req[CC_id].sfn_sf = frameP<<4 | slotP;
gNB_mac->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *)dl_config_pdu,
0,
sizeof(nfapi_dl_config_request_pdu_t));
if(RC.ss.mode ==SS_GNB)
{
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2 + sizeof(nfapi_dl_config_dlsch_pdu));
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = gNB_mac->pdu_index[CC_id];
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFE;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(n_rb_dl,
first_rb,
4);
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; // QPSK
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;
}
else
{
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_PCH_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2 + sizeof(nfapi_dl_config_pch_pdu));
dl_config_pdu->pch_pdu.pch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_PCH_PDU_REL8_TAG;
//dl_config_pdu->pch_pdu.pch_pdu_rel8.length = rand_range(0, 42);
dl_config_pdu->pch_pdu.pch_pdu_rel8.pdu_index = gNB_mac->pdu_index[CC_id];
dl_config_pdu->pch_pdu.pch_pdu_rel8.p_rnti = 0xFFFE;
dl_config_pdu->pch_pdu.pch_pdu_rel8.resource_allocation_type = 2;//rand_range(2, 6);
dl_config_pdu->pch_pdu.pch_pdu_rel8.virtual_resource_block_assignment_flag = 0;
dl_config_pdu->pch_pdu.pch_pdu_rel8.resource_block_coding = getRIV(n_rb_dl,
first_rb,
4);
dl_config_pdu->pch_pdu.pch_pdu_rel8.mcs = mcs;
dl_config_pdu->pch_pdu.pch_pdu_rel8.redundancy_version = 0;
dl_config_pdu->pch_pdu.pch_pdu_rel8.number_of_transport_blocks = 1;
dl_config_pdu->pch_pdu.pch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
dl_config_pdu->pch_pdu.pch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
dl_config_pdu->pch_pdu.pch_pdu_rel8.number_of_layers = 1;
dl_config_pdu->pch_pdu.pch_pdu_rel8.codebook_index = 0;
dl_config_pdu->pch_pdu.pch_pdu_rel8.ue_category_capacity = 1; // rand_range(0, 14);
dl_config_pdu->pch_pdu.pch_pdu_rel8.pa = 4; // rand_range(0, 7);
dl_config_pdu->pch_pdu.pch_pdu_rel8.transmission_power = 6000;
dl_config_pdu->pch_pdu.pch_pdu_rel8.nprb = 0;//get_subbandsize(cc->mib->message.dl_Bandwidth);
dl_config_pdu->pch_pdu.pch_pdu_rel8.ngap = 0;
dl_config_pdu->pch_pdu.pch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_PCH_PDU_REL13_TAG;
dl_config_pdu->pch_pdu.pch_pdu_rel13.ue_mode = 1;
dl_config_pdu->pch_pdu.pch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;
}
dl_req->number_pdu++;
gNB_mac->TX_req[CC_id].sfn_sf = (frameP<<4)+slotP;
TX_req = &gNB_mac->TX_req[CC_id].tx_request_body.tx_pdu_list[gNB_mac->TX_req[CC_id].tx_request_body.number_of_pdus];
TX_req->pdu_length = pcch_sdu_length;
TX_req->pdu_index = gNB_mac->pdu_index[CC_id]++;
TX_req->num_segments = 1;
TX_req->segments[0].segment_length = pcch_sdu_length;
TX_req->segments[0].segment_data = cc->PCCH_pdu.payload;
gNB_mac->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
gNB_mac->TX_req[CC_id].tx_request_body.number_of_pdus++;
} else {
LOG_E(NR_MAC,"[gNB %d] CCid %d Frame %d, slot %d : Cannot add DCI 1A/1C for Paging\n",
module_idP,
CC_id,
frameP,
slotP);
continue;
}
// Trace MACPDU
mac_pkt_info_t mac_pkt;
mac_pkt.direction = DIRECTION_DOWNLINK;
mac_pkt.rnti_type = PCCH;
mac_pkt.direction = DIR_DOWNLINK;
mac_pkt.rnti_type = map_nr_rnti_type(NR_RNTI_P);
mac_pkt.rnti = P_RNTI;
mac_pkt.harq_pid = 0;
mac_pkt.preamble = -1; /* TODO */
LOG_MAC_P(OAILOG_DEBUG, "MAC_PCCH_PDU", frameP, slotP, mac_pkt, pcch_sdu, pcch_sdu_length);
LOG_MAC_P(OAILOG_DEBUG, "LTE_MAC_PCCH_PDU", gNB_mac->frame, gNB_mac->slot, mac_pkt, (uint8_t *)&gNB_mac->common_channels[CC_id].PCCH_pdu.payload[0], (int)pcch_sdu_length);
trace_pdu(DIRECTION_DOWNLINK,
&gNB_mac->common_channels[CC_id].PCCH_pdu.payload[0],
pcch_sdu_length,
0xffff,
PCCH,
P_RNTI,
gNB_mac->frame,
gNB_mac->slot,
0,
0);
/* gNB_mac->gNB_stats[CC_id].total_num_pcch_pdu++; */
/* gNB_mac->gNB_stats[CC_id].pcch_buffer = pcch_sdu_length; */
/* gNB_mac->gNB_stats[CC_id].total_pcch_buffer += pcch_sdu_length; */
/* gNB_mac->gNB_stats[CC_id].pcch_mcs = mcs; */
//paging first_rb log
LOG_A(NR_MAC,"[gNB %d] Frame %d slot %d PCH: paging_ue_index %d pcch_sdu_length %d mcs %d first_rb %d\n",
// Paging log
LOG_A(NR_MAC, "[gNB %d] Frame %d slot %d PCH: paging_ue_index %d pcch_sdu_length %d\n",
module_idP,
frameP,
slotP,
ue_pf_po->ue_index_value,
pcch_sdu_length,
mcs,
first_rb);
#endif
pcch_sdu_length);
pthread_mutex_lock(&ue_pf_po_mutex);
memset(ue_pf_po,
0,
sizeof(UE_PF_PO_t));
memset(ue_pf_po, 0, sizeof(UE_PF_PO_t));
pthread_mutex_unlock(&ue_pf_po_mutex);
}
}
......@@ -1807,5 +1736,4 @@ void schedule_nr_PCH(module_id_t module_idP,
/* this might be misleading when pcch is inactive */
stop_meas(&gNB_mac->schedule_pch);
return;
}
......@@ -87,8 +87,10 @@ nr_pdcp_ue_t *nr_pdcp_manager_get_ue_ex(nr_pdcp_ue_manager_t *_m, int rnti)
}
nr_pdcp_manager_lock(m);
LOG_E(PDCP, ">>>> BLABLABLA %s:%d:%s: CHECK RNTI count=%d rnti=%d \n", __FILE__, __LINE__, __FUNCTION__, m->ue_count, rnti); //TODO:BLA
for (i = 0; i < m->ue_count; i++)
{
LOG_E(PDCP, ">>>> BLABLABLA %s:%d:%s: CHECK RNTI i=%d rnti=%d m->ue_list[i]->rntiMaybeUEid=%d \n", __FILE__, __LINE__, __FUNCTION__, i, rnti, m->ue_list[i]->rntiMaybeUEid); //TODO:BLA
if (m->ue_list[i]->rntiMaybeUEid == rnti)
{
ret = m->ue_list[i];
......
......@@ -372,6 +372,9 @@ static bool is_my_dci(NR_UE_MAC_INST_t *mac, nfapi_nr_dl_dci_pdu_t *received_pdu
}
if (get_softmodem_params()->sa)
{
//TODO:BLA
if (received_pdu->RNTI == 0xFFFE)
return true;
if (received_pdu->RNTI != mac->crnti && mac->ra.ra_state == RA_SUCCEEDED)
return false;
if (received_pdu->RNTI != mac->ra.t_crnti && mac->ra.ra_state == WAIT_CONTENTION_RESOLUTION)
......@@ -391,6 +394,8 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
memset(mac->nr_ue_emul_l1.index_has_sib, 0, sizeof(mac->nr_ue_emul_l1.index_has_sib));
mac->nr_ue_emul_l1.expected_rar = false;
memset(mac->nr_ue_emul_l1.index_has_rar, 0, sizeof(mac->nr_ue_emul_l1.index_has_rar));
mac->nr_ue_emul_l1.expected_paging = false;
memset(mac->nr_ue_emul_l1.index_has_paging, 0, sizeof(mac->nr_ue_emul_l1.index_has_paging));
mac->nr_ue_emul_l1.expected_dci = false;
memset(mac->nr_ue_emul_l1.index_has_dci, 0, sizeof(mac->nr_ue_emul_l1.index_has_dci));
int pdu_idx = 0;
......@@ -443,6 +448,13 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
mac->nr_ue_emul_l1.index_has_rar[j] = true;
LOG_T(NR_MAC, "Setting index_has_rar[%d] = true\n", j);
}
else if (dci_pdu_list->RNTI == 0xfffe)
{
mac->nr_ue_emul_l1.expected_paging = true;
mac->nr_ue_emul_l1.index_has_paging[j] = true;
LOG_T(NR_MAC, "Setting index_has_paging[%d] = true\n", j);
LOG_E(NR_PHY, ">>> BLABLABLA [%d, %d] PDSCH PDU for rnti %x -- %x !!!!! PAGING\n", dl_tti_request->SFN, dl_tti_request->Slot, pdu_list->pdsch_pdu.pdsch_pdu_rel15.rnti, dci_pdu_list->RNTI); //TODO:BLA
}
else
{
mac->nr_ue_emul_l1.expected_dci = true;
......@@ -490,6 +502,7 @@ static void fill_rx_ind(nfapi_nr_pdu_t *pdu_list, fapi_nr_rx_indication_t *rx_in
}
LOG_D(NR_PHY, "%s: num_tlv %d and length %d, pdu index %d\n",
__FUNCTION__, pdu_list->num_TLV, length, pdu_idx);
LOG_E(NR_PHY, ">>> BLABLA %s: num_tlv %d and length %d, pdu index %d\n", __FUNCTION__, pdu_list->num_TLV, length, pdu_idx); //TODO:BLA
uint8_t *pdu = malloc(length);
AssertFatal(pdu != NULL, "%s: Out of memory in malloc", __FUNCTION__);
rx_ind->rx_indication_body[pdu_idx].pdsch_pdu.pdu = pdu;
......@@ -529,6 +542,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
fapi_nr_rx_indication_t *rx_ind = dl_info->rx_ind;
rx_ind->sfn = tx_data_request->SFN;
rx_ind->slot = tx_data_request->Slot;
LOG_E(NR_MAC, ">>> BLABLA copy_tx_data_req_to_dl_info [%d %d] num_pdus=%d\n", rx_ind->sfn, rx_ind->slot, num_pdus); //TODO:BLA
int pdu_idx = 0;
......@@ -547,6 +561,12 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
fill_rx_ind(pdu_list, rx_ind, pdu_idx, FAPI_NR_RX_PDU_TYPE_RAR);
pdu_idx++;
}
else if (mac->nr_ue_emul_l1.index_has_paging[i])
{
fill_rx_ind(pdu_list, rx_ind, pdu_idx, FAPI_NR_RX_PDU_TYPE_PCH);
pdu_idx++;
LOG_E(NR_MAC, ">>> BLABLA copy_tx_data_req_to_dl_info [%d %d] num_pdus=%d !!! PAGING\n", rx_ind->sfn, rx_ind->slot, num_pdus); //TODO:BLA
}
else if (mac->nr_ue_emul_l1.index_has_dci[i])
{
fill_rx_ind(pdu_list, rx_ind, pdu_idx, FAPI_NR_RX_PDU_TYPE_DLSCH);
......@@ -555,6 +575,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
else
{
LOG_T(NR_MAC, "mac->nr_ue_emul_l1.index_has_dci[%d] = 0, so this index contained a DCI for a different UE\n", i);
LOG_E(NR_MAC, ">>> BLABLA mac->nr_ue_emul_l1.index_has_dci[%d] = 0, so this index contained a DCI for a different UE\n", i); //TODO:BLA
}
}
......@@ -747,8 +768,9 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
RAR hasn't been processed yet, we do not want to be filtering the
tx_data_requests. */
if (tx_data_request) {
if (mac->nr_ue_emul_l1.expected_sib ||
mac->nr_ue_emul_l1.expected_rar ||
if (mac->nr_ue_emul_l1.expected_sib ||
mac->nr_ue_emul_l1.expected_rar ||
mac->nr_ue_emul_l1.expected_paging ||
mac->nr_ue_emul_l1.expected_dci) {
frame = tx_data_request->SFN;
slot = tx_data_request->Slot;
......@@ -758,6 +780,7 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
}
else {
LOG_D(NR_MAC, "Unexpected tx_data_req\n");
LOG_E(NR_MAC, "!!! BLABLA Unexpected tx_data_req\n"); //TODO:BLA
}
free_and_zero(tx_data_request);
}
......@@ -864,6 +887,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
}
LOG_D(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST message in sfn/slot %d %d. \n",
dl_tti_request->SFN, dl_tti_request->Slot);
LOG_E(NR_PHY, ">>> BLABLA Received an NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST message in sfn/slot %d %d. \n", dl_tti_request->SFN, dl_tti_request->Slot); //TODO:BLA
if (is_channel_modeling())
save_pdsch_pdu_for_crnti(dl_tti_request);
......@@ -1184,6 +1208,23 @@ int8_t handle_csirs_measurements(module_id_t module_id, frame_t frame, int slot,
return nr_ue_process_csirs_measurements(module_id, frame, slot, csirs_measurements);
}
int8_t handle_pch(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t *ul_time_alignment, int pdu_id){
/* L1 assigns harq_pid, but in emulated L1 mode we need to assign
the harq_pid based on the saved global g_harq_pid. Because we are
emulating L1, no antenna measurements are conducted to calculate
a harq_pid, therefore we must set it here. */
if (get_softmodem_params()->emulate_l1)
dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.harq_pid = g_harq_pid;
update_harq_status(dl_info->module_id,
dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.harq_pid,
dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.ack_nack);
if(dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.ack_nack)
nr_ue_send_sdu(dl_info, ul_time_alignment, pdu_id);
return 0;
}
void update_harq_status(module_id_t module_id, uint8_t harq_pid, uint8_t ack_nack) {
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
......@@ -1289,7 +1330,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
__FUNCTION__,
dl_info->rx_ind->rx_indication_body[i].pdu_type,
dl_info->rx_ind->number_pdus);
LOG_E(NR_MAC, ">>BLABLABLA In %s sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs \n", __FUNCTION__, dl_info->rx_ind->rx_indication_body[i].pdu_type, dl_info->rx_ind->number_pdus); //TODO:BLA
LOG_E(NR_MAC, ">>BLABLABLA In %s sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs --- frame=%d slot=%d \n", __FUNCTION__, dl_info->rx_ind->rx_indication_body[i].pdu_type, dl_info->rx_ind->number_pdus, dl_info->frame, dl_info->slot); //TODO:BLA
switch(dl_info->rx_ind->rx_indication_body[i].pdu_type){
case FAPI_NR_RX_PDU_TYPE_SSB:
......@@ -1324,7 +1365,11 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
dl_info->slot,
&(dl_info->rx_ind->rx_indication_body+i)->csirs_measurements)) << FAPI_NR_CSIRS_IND;
break;
case FAPI_NR_RX_PDU_TYPE_PCH:
ret_mask |= (handle_pch(dl_info, ul_time_alignment, i)) << FAPI_NR_RX_PDU_TYPE_RAR;
break;
default:
LOG_E(NR_MAC, ">>BLABLABLA NO SWITCH !!! In %s sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs --- frame=%d slot=%d \n", __FUNCTION__, dl_info->rx_ind->rx_indication_body[i].pdu_type, dl_info->rx_ind->number_pdus, dl_info->frame, dl_info->slot); //TODO:BLA
break;
}
}
......
......@@ -1966,7 +1966,7 @@ int16_t do_RRCReconfiguration(
}
uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size, uint8_t *rv) {
uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size, uint8_t *rv, NR_EstablishmentCause_t establishmentCause) {
asn_enc_rval_t enc_rval;
uint8_t buf[5],buf2=0;
NR_UL_CCCH_Message_t ul_ccch_msg;
......@@ -1997,7 +1997,7 @@ uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
rrcSetupRequest->rrcSetupRequest.ue_Identity.choice.ng_5G_S_TMSI_Part1.buf[0] = 0x12;
}
rrcSetupRequest->rrcSetupRequest.establishmentCause = NR_EstablishmentCause_mo_Signalling; //EstablishmentCause_mo_Data;
rrcSetupRequest->rrcSetupRequest.establishmentCause = establishmentCause;
rrcSetupRequest->rrcSetupRequest.spare.buf = &buf2;
rrcSetupRequest->rrcSetupRequest.spare.size=1;
rrcSetupRequest->rrcSetupRequest.spare.bits_unused = 7;
......@@ -2011,6 +2011,8 @@ uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
(void *)&ul_ccch_msg,
buffer,
buffer_size);
LOG_E(NR_RRC,"!!! BLABLABLA [UE] RRCSetupRequest Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8); //TODO:BLA
xer_fprint(stdout, &asn_DEF_NR_UL_CCCH_Message, (void *)&ul_ccch_msg); //TODO:BLA
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(NR_RRC,"[UE] RRCSetupRequest Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8);
return((enc_rval.encoded+7)/8);
......
......@@ -155,7 +155,7 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id,
const int dedicatedInfoNASLength,
const char *dedicatedInfoNAS);
uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size, uint8_t *rv);
uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size, uint8_t *rv, NR_EstablishmentCause_t establishmentCause);
uint8_t do_NR_RRCReconfigurationComplete_for_nsa(uint8_t *buffer, size_t buffer_size, NR_RRC_TransactionIdentifier_t Transaction_id);
......
......@@ -108,6 +108,12 @@ nr_mac_rrc_data_ind_ue(
}
break;
case PCCH:
LOG_T(NR_RRC, "[UE %d] Received SDU for PCCH from gNB %d, pdu_len=%d\n", module_id, gNB_index, pdu_len);
LOG_E(NR_RRC, "^^^^^^^^^^ BLABLABLA [UE %d] Received SDU for PCCH from gNB %d, pdu_len=%d\n", module_id, gNB_index, pdu_len); //TODO:BLA
AssertFatal(nr_rrc_ue_decode_NR_PCCH_Message(module_id, gNB_index, (uint8_t*)pduP, pdu_len) == 0, "UE decode PCCH error!\n");
break;
default:
LOG_E(NR_RRC, "^^^^ BLABLABLA invalid CHANNEL %x rnti %x pdu_len=%d!!!!!", channel, rnti, pdu_len); //TODO:BLA
break;
......
......@@ -44,6 +44,7 @@
#include "NR_RRCReconfiguration.h"
#include "NR_MeasConfig.h"
#include "NR_UL-DCCH-Message.h"
#include "NR_PCCH-Message.h"
#include "rrc_list.h"
#include "rrc_defs.h"
......@@ -61,6 +62,7 @@
#include "UTIL/OSA/osa_defs.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "conversions.h"
#ifndef CELLULAR
#include "RRC/NR/MESSAGES/asn1_msg.h"
......@@ -601,6 +603,94 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(const module_id_t module_id, const u
return ret;
}
static inline uint64_t bitStr_to_uint64(BIT_STRING_t *asn) {
uint64_t result = 0;
int index;
int shift;
DevCheck ((asn->size > 0) && (asn->size <= 8), asn->size, 0, 0);
shift = ((asn->size - 1) * 8) - asn->bits_unused;
for (index = 0; index < (asn->size - 1); index++) {
result |= (uint64_t)asn->buf[index] << shift;
shift -= 8;
}
result |= asn->buf[index] >> asn->bits_unused;
return result;
}
// TODO: temporary, to support paging from TTCN
static void nr_ue_check_paging(const module_id_t module_id, const uint8_t gNB_index, NR_PCCH_Message_t *pcch)
{
const uint64_t tsc_NG_TMSI1 = 0x41c2345678;
const uint64_t tsc_NR_I_RNTI_Value1 = 0x84f3184d01;
bool found = false;
NR_PagingRecordList_t *record = pcch->message.choice.c1->choice.paging->pagingRecordList;
int num = record->list.count;
for (int i = 0; i < num; i++) {
NR_PagingRecord_t *rec = record->list.array[i];
if (rec->ue_Identity.present == NR_PagingUE_Identity_PR_ng_5G_S_TMSI) {
uint64_t tmsi = bitStr_to_uint64(&rec->ue_Identity.choice.ng_5G_S_TMSI);
LOG_E(NR_RRC, "!!!!!!!! BLABLABLA %s: CHECK TMSI in PCCH: %lx == %lx\n", __FUNCTION__, tmsi, tsc_NG_TMSI1); //TODO:BLA
if (tmsi == tsc_NG_TMSI1) {
found = true;
break;
}
} else if (rec->ue_Identity.present == NR_PagingUE_Identity_PR_fullI_RNTI) {
uint64_t rnti = bitStr_to_uint64(&rec->ue_Identity.choice.fullI_RNTI);
LOG_E(NR_RRC, "!!!!!!!! BLABLABLA %s: CHECK RNTI in PCCH: %lx == %lx\n", __FUNCTION__, rnti, tsc_NR_I_RNTI_Value1); //TODO:BLA
if (rnti == tsc_NR_I_RNTI_Value1) {
found = true;
break;
}
} else {
abort();
}
}
if (found) {
LOG_D(NR_RRC, "%s: found ue_Identity in PCCH\n", __FUNCTION__);
LOG_E(NR_RRC, "!!!!!!!! BLABLABLA %s: found ue_Identity in PCCH\n", __FUNCTION__); //TODO:BLA
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
mac->ra.ra_state = RA_UE_IDLE;
}
}
/*brief decode NR PCCH (Paging) message*/
int8_t nr_rrc_ue_decode_NR_PCCH_Message(const module_id_t module_id, const uint8_t gNB_index, uint8_t *const buffer, const uint16_t size)
{
NR_PCCH_Message_t *pcch_message = NULL;
asn_dec_rval_t dec_rval = uper_decode_complete(NULL, &asn_DEF_NR_PCCH_Message, (void **)&pcch_message, (const void *)buffer, size);
int ret;
if ((dec_rval.code != RC_OK) || (dec_rval.consumed == 0)) {
LOG_E(NR_RRC, "NR_PCCH decode error\n");
ret = -1;
} else {
ret = 0;
LOG_D(NR_RRC, "[gNB %d] nr_rrc_ue_decode_NR_PCCH_Message: decoded PCCH Message\n", module_id);
LOG_E(NR_RRC, ">>> BLABLABLA [gNB %d] nr_rrc_ue_decode_NR_PCCH_Message: decoded PCCH Message\n", module_id); //TODO:BLA
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_NR_PCCH_Message, pcch_message);
}
xer_fprint(stdout, &asn_DEF_NR_PCCH_Message, pcch_message); //TODO:BLA
nr_ue_check_paging(module_id, gNB_index, pcch_message);
}
ASN_STRUCT_FREE(asn_DEF_NR_PCCH_Message, pcch_message);
return ret;
}
const char *nr_SIBreserved( long value ) {
if (value < 0 || value > 1)
return "ERR";
......@@ -1717,6 +1807,9 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
uint8_t i=0,rv[6];
if(NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size ==0) {
nr_rrc_ue_RRCSetupRequest_count++;
LOG_E(NR_RRC,"!!!! BLABLABLA Generating RRCSetupRequest\n"); //TODO:BLA
// Get RRCConnectionRequest, fill random for now
// Generate random byte stream for contention resolution
for (i=0; i<6; i++) {
......@@ -1729,13 +1822,19 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
LOG_T(NR_RRC,"%x.",rv[i]);
}
NR_EstablishmentCause_t establishmentCause = NR_EstablishmentCause_mo_Signalling;
if (nr_rrc_ue_RRCSetupRequest_count > 1) {
establishmentCause = NR_EstablishmentCause_mt_Access;
}
LOG_T(NR_RRC,"\n");
NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size =
do_RRCSetupRequest(
module_id,
(uint8_t *)NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.Payload,
sizeof(NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.Payload),
rv);
rv, establishmentCause);
LOG_I(NR_RRC,"[UE %d] : Logical Channel UL-CCCH (SRB0), Generating RRCSetupRequest (bytes %d, gNB %d)\n",
module_id, NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size, gNB_index);
......@@ -1749,8 +1848,6 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
//printf("\n");
/*UE_rrc_inst[ue_mod_idP].Srb0[Idx].Tx_buffer.Payload[i] = taus()&0xff;
UE_rrc_inst[ue_mod_idP].Srb0[Idx].Tx_buffer.payload_size =i; */
nr_rrc_ue_RRCSetupRequest_count++;
}
}
......@@ -2283,14 +2380,13 @@ nr_rrc_ue_establish_srb2(
}
itti_send_msg_to_task(TASK_NAS_NRUE, ctxt_pP->instance, msg_p);
break; //TODO: BLA
/* simulate power OFF, to be able to send RRCSetupRequest to TTCN again */
LOG_W(NR_RRC, "todo, sleep before removing UE\n");
sleep(3);
NR_UE_MAC_INST_t *mac = get_mac_inst(ctxt_pP->module_id);
mac->ra.ra_state = RA_UE_IDLE;
/* mac->ra.ra_state = RA_UE_IDLE; */
nr_rrc_set_state( ctxt_pP->module_id, RRC_STATE_IDLE_NR );
nr_rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_NR );
......
......@@ -114,6 +114,13 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(const module_id_t module_id, cons
\param size length of buffer*/
int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(const module_id_t module_id, const uint8_t gNB_index, const uint8_t *buffer, const uint32_t size);
/**\brief decode NR PCCH (Paging) message
\param module_id module id
\param gNB_index gNB index
\param buffer pointer to buffer of ASN message PCCH-PCH
\param size length of buffer*/
int8_t nr_rrc_ue_decode_NR_PCCH_Message(const module_id_t module_id, const uint8_t gNB_index, uint8_t *const buffer, const uint16_t size);
/**\brief interface between MAC and RRC thru SRB0 (RLC TM/no PDCP)
\param module_id module id
\param CC_id component carrier id
......
......@@ -1508,6 +1508,21 @@ bool ss_task_sys_nr_handle_pdcpCount(struct NR_SYSTEM_CTRL_REQ *req)
if (ue == NULL)
{
LOG_E(GNB_APP, "could not found suitable UE with rnti: %d\r\n", rnti);
// TODO: FIX
PdcpCount.v.Get.d = 1;
const size_t size = sizeof(struct NR_PdcpCountInfo_Type) * PdcpCount.v.Get.d;
PdcpCount.v.Get.v = (struct NR_PdcpCountInfo_Type *)acpMalloc(size);
PdcpCount.v.Get.v[0].RadioBearerId.d = NR_RadioBearerId_Type_Srb;
PdcpCount.v.Get.v[0].RadioBearerId.v.Srb = 0;
PdcpCount.v.Get.v[0].UL.d = true;
PdcpCount.v.Get.v[0].DL.d = true;
PdcpCount.v.Get.v[0].UL.v.Format = NR_PdcpCount_Srb;
PdcpCount.v.Get.v[0].DL.v.Format = NR_PdcpCount_Srb;
int_to_bin(0, 32, PdcpCount.v.Get.v[0].UL.v.Value);
int_to_bin(0, 32, PdcpCount.v.Get.v[0].DL.v.Value);
send_sys_cnf(ConfirmationResult_Type_Success, true, NR_SystemConfirm_Type_PdcpCount, (void *)&PdcpCount);
return false;
}
......
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