Commit 1f60f97e authored by Laurent THOMAS's avatar Laurent THOMAS

initialize polar and time traces

parent 400900f4
......@@ -542,8 +542,11 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, const UE_nr_rxtx_proc_t *proc
nr_fill_dl_indication(&dl_indication, NULL, NULL, proc, UE, phy_data);
UE->if_inst->dl_indication(&dl_indication);
}
uint64_t a=rdtsc_oai();
sampleShift = pbch_pdcch_processing(UE, proc, phy_data);
uint64_t b=rdtsc_oai();
if (b-a > 3000*500)
LOG_D(PHY,"preprocessing %lu\n", (b-a)/3000);
if (phy_data->dlsch[0].active && phy_data->dlsch[0].rnti_type == TYPE_C_RNTI_) {
// indicate to tx thread to wait for DLSCH decoding
const int ack_nack_slot = (proc->nr_slot_rx + phy_data->dlsch[0].dlsch_config.k1_feedback) % UE->frame_parms.slots_per_frame;
......@@ -693,6 +696,15 @@ void *UE_thread(void *arg)
int shiftForNextFrame = 0;
int intialSyncOffset = 0;
openair0_timestamp sync_timestamp;
polarReturn(nr_polar_params(0,32,0,1));
polarReturn(nr_polar_params(1,39,8,1));
polarReturn(nr_polar_params(1,39,4,1));
polarReturn(nr_polar_params(1,49,8,1));
polarReturn(nr_polar_params(1,41,8,1));
polarReturn(nr_polar_params(1,49,4,1));
polarReturn(nr_polar_params(1,41,4,1));
polarReturn(nr_polar_params(1,45,4,1));
polarReturn(nr_polar_params(1,45,8,1));
while (!oai_exit) {
if (syncRunning) {
notifiedFIFO_elt_t *res=tryPullTpool(&nf,&(get_nrUE_params()->Tpool));
......
......@@ -84,6 +84,8 @@ t_nrPolar_params *nr_polar_params(int8_t messageType, uint16_t messageLength, ui
while (currentPtr != NULL) {
//printf("currentPtr->idx %d, (%d,%d)\n",currentPtr->idx,currentPtr->payloadBits,currentPtr->encoderLength);
//LOG_D(PHY,"Looking for index %d\n",(messageType * messageLength * aggregation_prime));
if (currentPtr->busy && currentPtr->idx == PolarKey )
LOG_W(PHY,"busy key %d\n", PolarKey);
if (currentPtr->busy == false && currentPtr->idx == PolarKey ) {
currentPtr->busy=true;
pthread_mutex_unlock(&PolarListMutex);
......@@ -104,7 +106,7 @@ t_nrPolar_params *nr_polar_params(int8_t messageType, uint16_t messageLength, ui
newPolarInitNode->nextPtr = PolarList;
PolarList = newPolarInitNode;
pthread_mutex_unlock(&PolarListMutex);
// LOG_D(PHY,"Setting new polarParams index %d, messageType %d, messageLength %d, aggregation_prime %d\n",(messageType * messageLength * aggregation_prime),messageType,messageLength,aggregation_prime);
LOG_W(PHY,"Setting new polarParams index %d, messageType %d, messageLength %d, aggr level %d, flag %d\n",PolarKey,messageType,messageLength, aggregation_level, decoder_flag);
newPolarInitNode->idx = PolarKey;
//printf("newPolarInitNode->idx %d, (%d,%d,%d:%d)\n",newPolarInitNode->idx,messageType,messageLength,aggregation_prime,aggregation_level);
......
......@@ -688,13 +688,13 @@ void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
{
int e_rx_cand_idx = 0;
*dci_ind = (fapi_nr_dci_indication_t){.SFN = proc->frame_rx, .slot = proc->nr_slot_rx};
uint64_t a=0, z=rdtsc_oai();;
int iter=0;
for (int j = 0; j < rel15->number_of_candidates; j++) {
int CCEind = rel15->CCE[j];
int L = rel15->L[j];
// Loop over possible DCI lengths
for (int k = 0; k < rel15->num_dci_options; k++) {
// skip this candidate if we've already found one with the
// same rnti and size at a different aggregation level
......@@ -727,9 +727,10 @@ void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
L * 108,
rel15->coreset.pdcch_dmrs_scrambling_id,
tmp_e);
uint64_t b=rdtsc_oai();
iter++;
const uint32_t crc = polar_decoder_int16(tmp_e, dci_estimation, 1, NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L);
a += rdtsc_oai() -b;
rnti_t n_rnti = rel15->rnti;
if (crc == n_rnti) {
LOG_D(NR_PHY_DCI,
......@@ -770,4 +771,6 @@ void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
}
e_rx_cand_idx += 9 * L * 6; // e_rx index for next candidate (L CCEs, 6 REGs per CCE and 9 REs per REG )
}
if (a > 3000*100)
LOG_E(PHY,"cpu: %lu, cpu tot %llu rel15->num_dci_options %d, dci_ind->number_of_dci %d, iter %d\n",a/3000, (rdtsc_oai() - z)/3000, rel15->num_dci_options,dci_ind->number_of_dcis, iter);
}
......@@ -977,7 +977,7 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_
// Hold the channel estimates in frequency domain.
int32_t pdcch_est_size = ((((fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH))+15)/16)*16);
__attribute__((aligned(16))) c16_t pdcch_dl_ch_estimates[4 * fp->nb_antennas_rx][pdcch_est_size];
uint64_t a=rdtsc_oai();
uint8_t dci_cnt = 0;
for(int n_ss = 0; n_ss<phy_pdcch_config->nb_search_space; n_ss++) {
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
......@@ -999,7 +999,9 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_
}
dci_cnt = dci_cnt + nr_ue_pdcch_procedures(ue, proc, pdcch_est_size, pdcch_dl_ch_estimates, phy_data, n_ss, rxdataF);
}
LOG_D(PHY, "[UE %d] Frame %d, nr_slot_rx %d: found %d DCIs\n", ue->Mod_id, frame_rx, nr_slot_rx, dci_cnt);
uint64_t b=rdtsc_oai();
if (b-a > 3000*500)
LOG_E(PHY, "[UE %d] Frame %d, nr_slot_rx %d: found %d DCIs on %d trial, cpu %lu\n", ue->Mod_id, frame_rx, nr_slot_rx, dci_cnt,phy_pdcch_config->nb_search_space*nb_symb_pdcch, (b-a)/3000 );
phy_pdcch_config->nb_search_space = 0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_OUT);
return sampleShift;
......
......@@ -2062,6 +2062,7 @@ static void configure_servingcell_info(NR_UE_MAC_INST_t *mac, NR_ServingCellConf
/// This function implements 38.331 Section 5.3.12: UE actions upon PUCCH/SRS release request
void release_PUCCH_SRS(NR_UE_MAC_INST_t *mac)
{
AssertFatal(false,"");
// release PUCCH-CSI-Resources configured in CSI-ReportConfig
NR_UE_ServingCell_Info_t *sc_info = &mac->sc_info;
NR_CSI_MeasConfig_t *meas_config = sc_info->csi_MeasConfig;
......
......@@ -2178,6 +2178,7 @@ void handle_RRCRelease(NR_UE_RRC_INST_t *rrc)
}
if (!suspend) {
NR_Release_Cause_t cause = OTHER;
AssertFatal(false,"");
nr_rrc_going_to_IDLE(rrc, cause, rrc->RRCRelease);
}
asn1cFreeStruc(asn_DEF_NR_RRCRelease, rrc->RRCRelease);
......@@ -2187,6 +2188,7 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
NR_Release_Cause_t release_cause,
NR_RRCRelease_t *RRCRelease)
{
AssertFatal(false,"");
NR_UE_Timers_Constants_t *tac = &rrc->timers_and_constants;
// if going to RRC_IDLE was triggered by reception
......
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