diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index c5c1dee427..5413108209 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -120,13 +120,7 @@ static void tx_func(processingData_L1tx_t *info) if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT || get_softmodem_params()->continuous_tx || IS_SOFTMODEM_RFSIM || cfg->analog_beamforming_ve.analog_bf_vendor_ext.value) { start_meas(&info->gNB->phy_proc_tx); - phy_procedures_gNB_TX(info->gNB, - &sched_response.DL_req, - &sched_response.TX_req, - &sched_response.UL_dci_req, - frame_tx, - slot_tx, - 1); + phy_procedures_gNB_TX(info->gNB, &sched_response.DL_req, &sched_response.TX_req, &sched_response.UL_dci_req, frame_tx,slot_tx); PHY_VARS_gNB *gNB = info->gNB; processingData_RU_t syncMsgRU; diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 88a8ff84c8..b6364e998f 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -225,7 +225,7 @@ static void UE_synch(void *arg) { ret = sl_nr_slss_search(UE, &syncD->proc, SL_NR_SSB_REPETITION_IN_FRAMES); } else { nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier); - ret = nr_initial_sync(&syncD->proc, UE, 2, IS_SA_MODE(get_softmodem_params()), syncD->gscnInfo, syncD->numGscn); + ret = nr_initial_sync(&syncD->proc, UE, 2, syncD->gscnInfo, syncD->numGscn); } if (ret.cell_detected) { diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index e137bf5b4c..19977b01e3 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -291,7 +291,7 @@ static void sl_ue_free(PHY_VARS_NR_UE *UE) } } -void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) +void term_nr_ue_signal(PHY_VARS_NR_UE *ue) { const NR_DL_FRAME_PARMS* fp = &ue->frame_parms; phy_term_nr_top(); diff --git a/openair1/PHY/INIT/nr_phy_init.h b/openair1/PHY/INIT/nr_phy_init.h index ec4a8de71b..ee3122e6e3 100644 --- a/openair1/PHY/INIT/nr_phy_init.h +++ b/openair1/PHY/INIT/nr_phy_init.h @@ -34,7 +34,7 @@ int nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *fp, int threequarter_fs, uint32_t ofdm_offset_divisor); int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB); -void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB); +void term_nr_ue_signal(PHY_VARS_NR_UE *ue); void init_nr_ue_transport(PHY_VARS_NR_UE *ue); void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms); void phy_init_nr_gNB(PHY_VARS_gNB *gNB); diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index b078d2be1c..45fe87e040 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -500,7 +500,6 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, float beta_dmrs_pusch = get_beta_dmrs(pusch_pdu->num_dmrs_cdm_grps_no_data, pusch_pdu->dmrs_config_type == pusch_dmrs_type2); int16_t dmrs_scaling = (1 / beta_dmrs_pusch) * (1 << 14); nr_pusch_dmrs_rx(fp->Ncp, - Ns, gold, pilot, (1000 + p), @@ -520,7 +519,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, "Num RBs not configured according to 3GPP 38.211 section 6.3.1.4. For PUSCH with transform precoding, num RBs " "cannot be multiple of any other primenumber other than 2,3,5\n"); AssertFatal(dmrs_seq != NULL, "DMRS low PAPR seq not found, check if DMRS sequences are generated"); - nr_pusch_lowpaprtype1_dmrs_rx(fp->Ncp, Ns, dmrs_seq, pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type); + nr_pusch_lowpaprtype1_dmrs_rx(fp->Ncp, dmrs_seq, pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type); #ifdef DEBUG_PUSCH printf("NR_UL_CHANNEL_EST: index %d, u %d,v %d\n", index, u, v); LOG_M("gNb_DMRS_SEQ.m", "gNb_DMRS_SEQ", dmrs_seq, 6 * nb_rb_pusch, 1, 1); @@ -725,8 +724,6 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB, *ptrsReOffset, *nb_rb, rel15_ul->rnti, - nr_tti_rx, - symbol, frame_parms->ofdm_symbol_size, (int16_t *)&pusch_vars->rxdataF_comp[aarx][(symbol * nb_re_pusch)], gold, diff --git a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c index d06ce6d917..bb81bd5ad5 100644 --- a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c +++ b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c @@ -64,7 +64,6 @@ static inline c16_t get_modulated(const uint32_t *gold_sequence, const int idx_g } int nr_pusch_dmrs_rx(nr_prefix_type_t Ncp, - unsigned int Ns, const uint32_t *nr_gold_pusch, c16_t *output, unsigned short p, @@ -108,7 +107,6 @@ int nr_pusch_dmrs_rx(nr_prefix_type_t Ncp, } int nr_pdsch_dmrs_rx(nr_prefix_type_t Ncp, - unsigned int Ns, const unsigned int *nr_gold_pdsch, c16_t *output, unsigned short p, @@ -213,7 +211,6 @@ void nr_gen_ref_conj_symbols(const uint32_t *in, uint32_t length, c16_t *output, } int nr_pusch_lowpaprtype1_dmrs_rx(nr_prefix_type_t Ncp, - unsigned int Ns, c16_t *dmrs_seq, c16_t *output, unsigned short p, diff --git a/openair1/PHY/NR_REFSIG/nr_refsig.h b/openair1/PHY/NR_REFSIG/nr_refsig.h index e5a5e73229..87f12adc5a 100644 --- a/openair1/PHY/NR_REFSIG/nr_refsig.h +++ b/openair1/PHY/NR_REFSIG/nr_refsig.h @@ -36,7 +36,6 @@ uint32_t *nr_gold_csi_rs(int N_RB_DL, int symbols_per_slot, int slot, int symb, uint32_t *nr_gold_prs(int nid, int slot, int symbol); int nr_pdsch_dmrs_rx(nr_prefix_type_t Ncp, - unsigned int Ns, const unsigned int *nr_gold_pdsch, c16_t *output, unsigned short p, @@ -56,7 +55,6 @@ void nr_pbch_dmrs_rx(int dmrss, const unsigned int *nr_gold_pbch, c16_t *output, void nr_pdcch_dmrs_ref(const unsigned int *nr_gold_pdcch, c16_t *output, unsigned short nb_rb_corset); int nr_pusch_dmrs_rx(nr_prefix_type_t Ncp, - unsigned int Ns, const uint32_t *nr_gold_pusch, c16_t *output, unsigned short p, @@ -71,7 +69,6 @@ void nr_generate_modulation_table(void); extern simde__m128i byte2m128i[256]; int nr_pusch_lowpaprtype1_dmrs_rx(nr_prefix_type_t Ncp, - unsigned int Ns, c16_t *dmrs_seq, c16_t *output, unsigned short p, diff --git a/openair1/PHY/NR_REFSIG/ptrs_nr.c b/openair1/PHY/NR_REFSIG/ptrs_nr.c index f73a01a2d6..53cc36cb26 100644 --- a/openair1/PHY/NR_REFSIG/ptrs_nr.c +++ b/openair1/PHY/NR_REFSIG/ptrs_nr.c @@ -194,8 +194,6 @@ void nr_ptrs_cpe_estimation(uint8_t K_ptrs, uint8_t ptrsReOffset, uint16_t nb_rb, uint16_t rnti, - unsigned char Ns, - unsigned char symbol, uint16_t ofdm_symbol_size, int16_t *rxF_comp, const uint32_t *gold_seq, diff --git a/openair1/PHY/NR_REFSIG/ptrs_nr.h b/openair1/PHY/NR_REFSIG/ptrs_nr.h index 75f526dad5..5a3b03f9c3 100644 --- a/openair1/PHY/NR_REFSIG/ptrs_nr.h +++ b/openair1/PHY/NR_REFSIG/ptrs_nr.h @@ -93,8 +93,6 @@ void nr_ptrs_cpe_estimation(uint8_t K_ptrs, uint8_t ptrsReOffset, uint16_t nb_rb, uint16_t rnti, - unsigned char Ns, - unsigned char symbol, uint16_t ofdm_symbol_size, int16_t *rxF_comp, const uint32_t *gold_seq, diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 9018aabfde..c2f205406b 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -261,7 +261,6 @@ static inline int dmrs_case00(c16_t *output, const int amp, int sz, int start_sc, - int remaining_re, int dmrs_port, const int dmrs_Type, int symbol_sz, @@ -438,7 +437,6 @@ static inline int do_onelayer(NR_DL_FRAME_PARMS *frame_parms, amp, sz, start_sc, - remaining_re, dmrs_port, dmrs_Type, symbol_sz, @@ -772,7 +770,6 @@ static int do_one_dlsch(unsigned char *input_ptr, PHY_VARS_gNB *gNB, NR_gNB_DLSC void nr_generate_pdsch(PHY_VARS_gNB *gNB, int n_dlsch, NR_gNB_DLSCH_t *dlsch_array, int frame, int slot) { - NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; time_stats_t *dlsch_encoding_stats = &gNB->dlsch_encoding_stats; time_stats_t *tinput = &gNB->tinput; time_stats_t *tprep = &gNB->tprep; @@ -831,7 +828,6 @@ void nr_generate_pdsch(PHY_VARS_gNB *gNB, int n_dlsch, NR_gNB_DLSCH_t *dlsch_arr dlsch_array, frame, slot, - frame_parms, output, tinput, tprep, diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.h b/openair1/PHY/NR_TRANSPORT/nr_dlsch.h index 0a82b2c47f..09de55da74 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.h +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.h @@ -42,7 +42,6 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, NR_gNB_DLSCH_t *dlsch_array, int frame, uint8_t slot, - NR_DL_FRAME_PARMS *frame_parms, unsigned char *output, time_stats_t *tinput, time_stats_t *tprep, diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c index 8a73d7754a..b2e7772a36 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c @@ -106,7 +106,6 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, NR_gNB_DLSCH_t *dlsch_array, int frame, uint8_t slot, - NR_DL_FRAME_PARMS *frame_parms, unsigned char *output, time_stats_t *tinput, time_stats_t *tprep, diff --git a/openair1/PHY/NR_TRANSPORT/nr_prs.c b/openair1/PHY/NR_TRANSPORT/nr_prs.c index be1bd8adb8..207a94447d 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prs.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prs.c @@ -27,12 +27,7 @@ //#define DEBUG_PRS_MOD //#define DEBUG_PRS_MAP -int nr_generate_prs(int slot, - c16_t *txdataF, - int16_t amp, - prs_config_t *prs_cfg, - nfapi_nr_config_request_scf_t *config, - const NR_DL_FRAME_PARMS *frame_parms) +int nr_generate_prs(int slot, c16_t *txdataF, int16_t amp, prs_config_t *prs_cfg, const NR_DL_FRAME_PARMS *frame_parms) { int k_prime = 0, k = 0, idx; diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h index 29ae5bb612..a38bf9b6bb 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h @@ -40,12 +40,7 @@ NR_gNB_PHY_STATS_t *get_phy_stats(PHY_VARS_gNB *gNB, uint16_t rnti); -int nr_generate_prs(int slot, - c16_t *txdataF, - int16_t amp, - prs_config_t *prs_cfg, - nfapi_nr_config_request_scf_t *config, - const NR_DL_FRAME_PARMS *frame_parms); +int nr_generate_prs(int slot, c16_t *txdataF, int16_t amp, prs_config_t *prs_cfg, const NR_DL_FRAME_PARMS *frame_parms); /*! \fn int nr_generate_pss @@ -224,7 +219,6 @@ void nr_fill_srs(PHY_VARS_gNB *gNB, int nr_get_srs_signal(PHY_VARS_gNB *gNB, c16_t **rxdataF, - frame_t frame, slot_t slot, nfapi_nr_srs_pdu_t *srs_pdu, nr_srs_info_t *nr_srs_info, diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 61bdce06b2..a5a69a0f12 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1372,67 +1372,3 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, uci_pdu->pduBitmap|=8; } } - -void nr_dump_uci_stats(FILE *fd,PHY_VARS_gNB *gNB,int frame) { - int strpos = 0; - char output[16384]; - - for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { - NR_gNB_PHY_STATS_t *stats = &gNB->phy_stats[i]; - if (!stats->active) - return; - NR_gNB_UCI_STATS_t *uci_stats = &stats->uci_stats; - if (uci_stats->pucch0_sr_trials > 0) - strpos += sprintf(output + strpos, - "UCI %d RNTI %x: pucch0_sr_trials %d, pucch0_n00 %d dB, pucch0_n01 %d dB, pucch0_sr_thres %d dB, current " - "pucch1_stat0 %d dB, current pucch1_stat1 %d dB, positive SR count %d\n", - i, - stats->rnti, - uci_stats->pucch0_sr_trials, - uci_stats->pucch0_n00, - uci_stats->pucch0_n01, - uci_stats->pucch0_sr_thres, - dB_fixed(uci_stats->current_pucch0_sr_stat0), - dB_fixed(uci_stats->current_pucch0_sr_stat1), - uci_stats->pucch0_positive_SR); - if (uci_stats->pucch01_trials > 0) - strpos += sprintf(output + strpos, - "UCI %d RNTI %x: pucch01_trials %d, pucch0_n00 %d dB, pucch0_n01 %d dB, pucch0_thres %d dB, current " - "pucch0_stat0 %d dB, current pucch1_stat1 %d dB, pucch01_DTX %d\n", - i, - stats->rnti, - uci_stats->pucch01_trials, - uci_stats->pucch0_n01, - uci_stats->pucch0_n01, - uci_stats->pucch0_thres, - dB_fixed(uci_stats->current_pucch0_stat0), - dB_fixed(uci_stats->current_pucch0_stat1), - uci_stats->pucch01_DTX); - - if (uci_stats->pucch02_trials > 0) - strpos += sprintf(output + strpos, - "UCI %d RNTI %x: pucch01_trials %d, pucch0_n00 %d dB, pucch0_n01 %d dB, pucch0_thres %d dB, current " - "pucch0_stat0 %d dB, current pucch0_stat1 %d dB, pucch01_DTX %d\n", - i, - stats->rnti, - uci_stats->pucch02_trials, - uci_stats->pucch0_n00, - uci_stats->pucch0_n01, - uci_stats->pucch0_thres, - dB_fixed(uci_stats->current_pucch0_stat0), - dB_fixed(uci_stats->current_pucch0_stat1), - uci_stats->pucch02_DTX); - - if (uci_stats->pucch2_trials > 0) - strpos += sprintf(output + strpos, - "UCI %d RNTI %x: pucch2_trials %d, pucch2_DTX %d\n", - i, - stats->rnti, - uci_stats->pucch2_trials, - uci_stats->pucch2_DTX); - } - if (fd) - fprintf(fd, "%s", output); - else - printf("%s", output); -} diff --git a/openair1/PHY/NR_TRANSPORT/srs_rx.c b/openair1/PHY/NR_TRANSPORT/srs_rx.c index 5d84c11c99..0637a8abce 100644 --- a/openair1/PHY/NR_TRANSPORT/srs_rx.c +++ b/openair1/PHY/NR_TRANSPORT/srs_rx.c @@ -75,7 +75,6 @@ void nr_fill_srs(PHY_VARS_gNB *gNB, frame_t frame, slot_t slot, nfapi_nr_srs_pdu int nr_get_srs_signal(PHY_VARS_gNB *gNB, c16_t **rxdataF, - frame_t frame, slot_t slot, nfapi_nr_srs_pdu_t *srs_pdu, nr_srs_info_t *nr_srs_info, diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c b/openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c index a407282c1b..1568c9e68e 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c @@ -34,7 +34,6 @@ int nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, PHY_VARS_NR_UE *ue, - module_id_t gNB_id, const int estimateSz, struct complex16 dl_ch_estimates_time[][estimateSz], uint8_t frame, diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 8978527095..f0e53a1c04 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -1295,7 +1295,7 @@ void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, float beta_dmrs_pdsch = get_beta_dmrs(dlsch->n_dmrs_cdm_groups, config_type == NFAPI_NR_DMRS_TYPE2); int16_t dmrs_scaling = (int16_t)((1 / beta_dmrs_pdsch) * (1 << 14)); const uint32_t *gold = nr_gold_pdsch(fp->N_RB_DL, fp->symbols_per_slot, dlsch->dlDmrsScramblingId, dlsch->nscid, slot, symbol); - nr_pdsch_dmrs_rx(fp->Ncp, slot, gold, pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type, dmrs_scaling); + nr_pdsch_dmrs_rx(fp->Ncp, gold, pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type, dmrs_scaling); delay_t delay = {0}; @@ -1380,8 +1380,7 @@ void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, * 2) Interpolate PTRS estimated value in TD after all PTRS symbols * 3) Compensate signal with PTRS estimation for slot *********************************************************************/ -void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, - int nbRx, +void nr_pdsch_ptrs_processing(int nbRx, c16_t ptrs_phase_per_slot[][14], int32_t ptrs_re_per_slot[][14], uint32_t rx_size_symbol, @@ -1389,7 +1388,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, NR_DL_FRAME_PARMS *frame_parms, NR_DL_UE_HARQ_t *dlsch0_harq, NR_DL_UE_HARQ_t *dlsch1_harq, - uint8_t gNB_id, uint8_t nr_slot_rx, unsigned char symbol, uint16_t rnti, @@ -1478,8 +1476,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, *ptrsReOffset, *nb_rb, rnti, - nr_slot_rx, - symbol, frame_parms->ofdm_symbol_size, (int16_t *)(rxdataF_comp[0][aarx] + symbol * rx_size_symbol), gold, diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h index 4a67f2956e..9b0f4a642a 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h @@ -94,7 +94,6 @@ void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, int nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, PHY_VARS_NR_UE *ue, - module_id_t gNB_id, int estimateSz, struct complex16 dl_ch_estimates_time[][estimateSz], uint8_t frame, @@ -108,7 +107,6 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, int32_t dl_ch_estimates[][pdsch_est_size]); uint32_t nr_ue_calculate_ssb_rsrp(const NR_DL_FRAME_PARMS *fp, - const UE_nr_rxtx_proc_t *proc, const c16_t rxdataF[][fp->samples_per_slot_wCP], int symbol_offset, int ssb_start_subcarrier); @@ -139,8 +137,7 @@ void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue, uint32_t rx_power_fil_dB, uint8_t gNB_id); -void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, - int nbRx, +void nr_pdsch_ptrs_processing(int nbRx, c16_t ptrs_phase_per_slot[][14], int32_t ptrs_re_per_slot[][14], uint32_t rx_size_symbol, @@ -148,7 +145,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, NR_DL_FRAME_PARMS *frame_parms, NR_DL_UE_HARQ_t *dlsch0_harq, NR_DL_UE_HARQ_t *dlsch1_harq, - uint8_t gNB_id, uint8_t nr_slot_rx, unsigned char symbol, uint16_t rnti, diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c index 8a59470cbf..8b8fb62c53 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c @@ -154,7 +154,6 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, // This function calculates: // - SS reference signal received digital power in dB/RE uint32_t nr_ue_calculate_ssb_rsrp(const NR_DL_FRAME_PARMS *fp, - const UE_nr_rxtx_proc_t *proc, const c16_t rxdataF[][fp->samples_per_slot_wCP], int symbol_offset, int ssb_start_subcarrier) @@ -242,7 +241,7 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue, if (fp->half_frame_bit) symbol_offset += (fp->slots_per_frame >> 1) * fp->symbols_per_slot; - uint32_t rsrp_avg = nr_ue_calculate_ssb_rsrp(fp, proc, rxdataF, symbol_offset, fp->ssb_start_subcarrier); + uint32_t rsrp_avg = nr_ue_calculate_ssb_rsrp(fp, rxdataF, symbol_offset, fp->ssb_start_subcarrier); float rsrp_db_per_re = 10 * log10(rsrp_avg); openair0_config_t *cfg0 = &openair0_cfg[ue->rf_map.card]; @@ -489,7 +488,7 @@ void do_neighboring_cell_measurements(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *u } // RSRP measurements - neighboring_cell_info->ssb_rsrp = nr_ue_calculate_ssb_rsrp(frame_parms, proc, rxdataF, 0, frame_parms->ssb_start_subcarrier); + neighboring_cell_info->ssb_rsrp = nr_ue_calculate_ssb_rsrp(frame_parms, rxdataF, 0, frame_parms->ssb_start_subcarrier); neighboring_cell_info->ssb_rsrp_dBm = 10 * log10(neighboring_cell_info->ssb_rsrp) + 30 - SQ15_SQUARED_NORM_FACTOR_DB diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index d8604d4570..e190bcc031 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -730,7 +730,6 @@ int nr_csi_rs_cqi_estimation(const uint32_t precoded_sinr, } static void nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue, - const UE_nr_rxtx_proc_t *proc, const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu, uint32_t *interference_plus_noise_power, const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) @@ -822,7 +821,7 @@ void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, LOG_I(NR_PHY, "csiim_config_pdu->l_csiim = %i.%i.%i.%i\n", csiim_config_pdu->l_csiim[0], csiim_config_pdu->l_csiim[1], csiim_config_pdu->l_csiim[2], csiim_config_pdu->l_csiim[3]); #endif - nr_csi_im_power_estimation(ue, proc, csiim_config_pdu, &ue->nr_csi_info->interference_plus_noise_power, rxdataF); + nr_csi_im_power_estimation(ue, csiim_config_pdu, &ue->nr_csi_info->interference_plus_noise_power, rxdataF); ue->nr_csi_info->csi_im_meas_computed = true; } diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index b5f26266e5..65a0247046 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -324,7 +324,6 @@ static void nr_pdcch_detection_mrc(int nb_ant, int sz, c16_t rxdataF_comp[][sz]) static void nr_rx_pdcch_symbol(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, int symbol, - int rel_symb_monOcc, int ss_idx, nr_phy_data_t *phy_data, int llr_size_symbol, @@ -430,12 +429,6 @@ int get_max_pdcch_monOcc(const NR_UE_PDCCH_CONFIG *phy_pdcch_config) return monOcc; } -static void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, - const UE_nr_rxtx_proc_t *proc, - c16_t *pdcch_e_rx, - fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, - fapi_nr_dci_indication_t *dci_ind); - void set_first_last_pdcch_symb(const NR_UE_PDCCH_CONFIG *phy_pdcch_config, int *first_symb, int *last_symb) { *first_symb = NR_SYMBOLS_PER_SLOT; // max first pdcch symbol @@ -478,7 +471,6 @@ void nr_pdcch_generate_llr(PHY_VARS_NR_UE *ue, nr_rx_pdcch_symbol(ue, proc, symbol, - rel_symb_monOcc, ss_idx, phy_data, llr_size_symbol, @@ -489,64 +481,6 @@ void nr_pdcch_generate_llr(PHY_VARS_NR_UE *ue, } } -/* Decode DCI from LLRs for each Search-Space and send to MAC */ -void nr_pdcch_dci_indication(const UE_nr_rxtx_proc_t *proc, - int llr_size, - int max_monOcc, - PHY_VARS_NR_UE *ue, - nr_phy_data_t *phy_data, - c16_t llr[phy_data->phy_pdcch_config.nb_search_space][max_monOcc][llr_size]) -{ - NR_UE_PDCCH_CONFIG *phy_pdcch_config = &phy_data->phy_pdcch_config; - - nr_downlink_indication_t dl_indication; - fapi_nr_dci_indication_t dci_ind = {.SFN = proc->frame_rx, .slot = proc->nr_slot_rx}; - - for (int ss_idx = 0; ss_idx < phy_pdcch_config->nb_search_space; ss_idx++) { - fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &phy_pdcch_config->pdcch_config[ss_idx]; - uint8_t unused_start_symb[NR_SYMBOLS_PER_SLOT] = {0}; - const int num_monitoring_occ = get_pdcch_mon_occasions_slot(rel15, unused_start_symb); - const int llr_stride = llr_size / rel15->coreset.duration; - int n_rb, cset_start; - get_coreset_rballoc(rel15->coreset.frequency_domain_resource, &n_rb, &cset_start); - - for (int m = 0; m < num_monitoring_occ; m++) { - /// PDCCH/DCI e-sequence (input to rate matching). - c16_t pdcch_e_rx[NR_MAX_PDCCH_SIZE]; - - nr_pdcch_demapping_deinterleaving(n_rb, - llr[ss_idx][m], - pdcch_e_rx, - rel15->coreset.duration, - rel15->coreset.RegBundleSize, - rel15->coreset.InterleaverSize, - rel15->coreset.ShiftIndex, - rel15->number_of_candidates, - rel15->CCE, - rel15->L, - llr_stride); - - nr_dci_decoding_procedure(ue, proc, pdcch_e_rx, rel15, &dci_ind); - } - } - - for (int i = 0; i < dci_ind.number_of_dcis; i++) { - LOG_D(PHY, - "Frame.slot: %d.%d: DCI %i of %d total DCIs found --> rnti %x : format %d\n", - proc->frame_rx, - proc->nr_slot_rx, - i + 1, - dci_ind.number_of_dcis, - dci_ind.dci_list[i].rnti, - dci_ind.dci_list[i].dci_format); - } - - /* Send to MAC */ - nr_fill_dl_indication(&dl_indication, &dci_ind, NULL, proc, ue, phy_data); - ue->if_inst->dl_indication(&dl_indication); - phy_pdcch_config->nb_search_space = 0; -} - static void nr_pdcch_unscrambling(c16_t *e_rx, uint16_t scrambling_RNTI, uint32_t length, @@ -566,8 +500,7 @@ static void nr_pdcch_unscrambling(c16_t *e_rx, } } -static void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, - const UE_nr_rxtx_proc_t *proc, +static void nr_dci_decoding_procedure(const UE_nr_rxtx_proc_t *proc, c16_t *pdcch_e_rx, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, fapi_nr_dci_indication_t *dci_ind) @@ -659,3 +592,61 @@ static void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, e_rx_cand_idx += RE_PER_RB_OUT_DMRS * L * 6; // e_rx index for next candidate (L CCEs, 6 REGs per CCE and 9 REs per REG ) } } + +/* Decode DCI from LLRs for each Search-Space and send to MAC */ +void nr_pdcch_dci_indication(const UE_nr_rxtx_proc_t *proc, + int llr_size, + int max_monOcc, + PHY_VARS_NR_UE *ue, + nr_phy_data_t *phy_data, + c16_t llr[phy_data->phy_pdcch_config.nb_search_space][max_monOcc][llr_size]) +{ + NR_UE_PDCCH_CONFIG *phy_pdcch_config = &phy_data->phy_pdcch_config; + + nr_downlink_indication_t dl_indication; + fapi_nr_dci_indication_t dci_ind = {.SFN = proc->frame_rx, .slot = proc->nr_slot_rx}; + + for (int ss_idx = 0; ss_idx < phy_pdcch_config->nb_search_space; ss_idx++) { + fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &phy_pdcch_config->pdcch_config[ss_idx]; + uint8_t unused_start_symb[NR_SYMBOLS_PER_SLOT] = {0}; + const int num_monitoring_occ = get_pdcch_mon_occasions_slot(rel15, unused_start_symb); + const int llr_stride = llr_size / rel15->coreset.duration; + int n_rb, cset_start; + get_coreset_rballoc(rel15->coreset.frequency_domain_resource, &n_rb, &cset_start); + + for (int m = 0; m < num_monitoring_occ; m++) { + /// PDCCH/DCI e-sequence (input to rate matching). + c16_t pdcch_e_rx[NR_MAX_PDCCH_SIZE]; + + nr_pdcch_demapping_deinterleaving(n_rb, + llr[ss_idx][m], + pdcch_e_rx, + rel15->coreset.duration, + rel15->coreset.RegBundleSize, + rel15->coreset.InterleaverSize, + rel15->coreset.ShiftIndex, + rel15->number_of_candidates, + rel15->CCE, + rel15->L, + llr_stride); + + nr_dci_decoding_procedure(proc, pdcch_e_rx, rel15, &dci_ind); + } + } + + for (int i = 0; i < dci_ind.number_of_dcis; i++) { + LOG_D(PHY, + "Frame.slot: %d.%d: DCI %i of %d total DCIs found --> rnti %x : format %d\n", + proc->frame_rx, + proc->nr_slot_rx, + i + 1, + dci_ind.number_of_dcis, + dci_ind.dci_list[i].rnti, + dci_ind.dci_list[i].dci_format); + } + + /* Send to MAC */ + nr_fill_dl_indication(&dl_indication, &dci_ind, NULL, proc, ue, phy_data); + ue->if_inst->dl_indication(&dl_indication); + phy_pdcch_config->nb_search_space = 0; +} diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index 73bcbfab46..8333dead75 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -60,7 +60,6 @@ static void nr_dlsch_mmse(uint32_t rx_size_symbol, c16_t dl_ch_magb[][n_rx][rx_size_symbol], c16_t dl_ch_magr[][n_rx][rx_size_symbol], int32_t dl_ch_estimates_ext[][rx_size_symbol], - unsigned short nb_rb, unsigned char mod_order, int shift, unsigned char symbol, @@ -86,7 +85,6 @@ static void nr_dlsch_llr(uint32_t rx_size_symbol, c16_t dl_ch_mag[rx_size_symbol], c16_t dl_ch_magb[rx_size_symbol], c16_t dl_ch_magr[rx_size_symbol], - NR_DL_UE_HARQ_t *dlsch0_harq, NR_DL_UE_HARQ_t *dlsch1_harq, unsigned char symbol, uint32_t len, @@ -614,7 +612,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, dl_ch_magb, dl_ch_magr, dl_ch_estimates_ext, - nb_rb_pdsch, dlsch_config->qamModOrder, *log2_maxh, symbol, @@ -649,8 +646,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, /* Check for PTRS bitmap and process it respectively */ if((pduBitmap & 0x1) && (dlsch[0].rnti_type == TYPE_C_RNTI_)) { - nr_pdsch_ptrs_processing(ue, - nbRx, + nr_pdsch_ptrs_processing(nbRx, ptrs_phase_per_slot, ptrs_re_per_slot, rx_size_symbol, @@ -658,7 +654,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, fp, dlsch0_harq, dlsch1_harq, - gNB_id, nr_slot_rx, symbol, dlsch[0].rnti, @@ -674,7 +669,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, dl_ch_mag[0][0], dl_ch_magb[0][0], dl_ch_magr[0][0], - dlsch0_harq, dlsch1_harq, symbol, dl_valid_re[symbol], @@ -1364,7 +1358,6 @@ static void nr_dlsch_mmse(uint32_t rx_size_symbol, c16_t dl_ch_magb[][n_rx][rx_size_symbol], c16_t dl_ch_magr[][n_rx][rx_size_symbol], int32_t dl_ch_estimates_ext[][rx_size_symbol], - unsigned short nb_rb, unsigned char mod_order, int shift, unsigned char symbol, @@ -1556,7 +1549,6 @@ static void nr_dlsch_llr(uint32_t rx_size_symbol, c16_t dl_ch_mag[rx_size_symbol], c16_t dl_ch_magb[rx_size_symbol], c16_t dl_ch_magr[rx_size_symbol], - NR_DL_UE_HARQ_t *dlsch0_harq, NR_DL_UE_HARQ_t *dlsch1_harq, unsigned char symbol, uint32_t len, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 9d2db73e66..31566fd3fd 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -374,7 +374,7 @@ void nr_scan_ssb(void *arg) &ssbInfo->pbchResult, rxdataF); // start pbch detection at first symbol after pss if (ssbInfo->syncRes.cell_detected) { - uint32_t rsrp_avg = nr_ue_calculate_ssb_rsrp(ssbInfo->fp, ssbInfo->proc, rxdataF, 0, ssbInfo->gscnInfo.ssbFirstSC); + uint32_t rsrp_avg = nr_ue_calculate_ssb_rsrp(ssbInfo->fp, rxdataF, 0, ssbInfo->gscnInfo.ssbFirstSC); int rsrp_db_per_re = 10 * log10(rsrp_avg); ssbInfo->adjust_rxgain = TARGET_RX_POWER - rsrp_db_per_re; LOG_I(PHY, "pbch rx ok. rsrp:%d dB/RE, adjust_rxgain:%d dB\n", rsrp_db_per_re, ssbInfo->adjust_rxgain); @@ -388,7 +388,6 @@ void nr_scan_ssb(void *arg) nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames, - int sa, nr_gscn_info_t gscnInfo[MAX_GSCN_BAND], int numGscn) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c index 321281fcda..e407459bc8 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c @@ -151,7 +151,6 @@ static int sl_nr_pss_correlation(PHY_VARS_NR_UE *UE, int frame_index) } static void sl_nr_extract_sss(PHY_VARS_NR_UE *ue, - UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max, c16_t rxdataF[][ue->SL_UE_PHY_PARAMS.sl_frame_params.samples_per_slot_wCP]) @@ -440,7 +439,7 @@ nr_initial_sync_t sl_nr_slss_search(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc, UE->common_vars.rxdata); } - sl_nr_extract_sss(UE, NULL, &metric_tdd_ncp, &phase_tdd_ncp, rxdataF); + sl_nr_extract_sss(UE, &metric_tdd_ncp, &phase_tdd_ncp, rxdataF); // save detected cell id to psbch rx_slss_id = UE->SL_UE_PHY_PARAMS.sync_params.N_sl_id; @@ -510,7 +509,7 @@ nr_initial_sync_t sl_nr_slss_search(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc, sl_nr_rx_indication_t rx_ind = {0}; uint16_t number_pdus = 1; nr_fill_sl_indication(&sl_indication, &rx_ind, NULL, proc, UE, NULL); - nr_fill_sl_rx_indication(&rx_ind, SL_NR_RX_PDU_TYPE_SSB, UE, number_pdus, proc, (void *)decoded_output, rx_slss_id); + nr_fill_sl_rx_indication(&rx_ind, SL_NR_RX_PDU_TYPE_SSB, UE, number_pdus, (void *)decoded_output, rx_slss_id); LOG_D(PHY, "Sidelink SLSS SEARCH PSBCH RX OK. Send SL-SSB TO MAC\n"); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index 3daaaf0eee..6872306dfe 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -126,8 +126,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue, const uint8_t slot, unsigned int *G, int nb_ulsch, - uint8_t *ULSCH_ids, - uint16_t number_dmrs_symbols); + uint8_t *ULSCH_ids); /*! \brief Perform PUSCH scrambling. TS 38.211 V15.4.0 subclause 6.3.1.1 @param[in] in Pointer to input bits @@ -242,7 +241,6 @@ double nr_ue_pbch_freq_offset(const NR_DL_FRAME_PARMS *frame_parms, nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *phy_vars_ue, int n_frames, - int sa, nr_gscn_info_t gscnInfo[MAX_GSCN_BAND], int numGscn); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c index 852e87c071..4b769a8668 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c @@ -159,8 +159,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue, const uint8_t slot, unsigned int *G, int nb_ulsch, - uint8_t *ULSCH_ids, - uint16_t number_dmrs_symbols) + uint8_t *ULSCH_ids) { start_meas_nr_ue_phy(ue, ULSCH_ENCODING_STATS); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 94ee8022a8..881ce016bc 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -435,8 +435,7 @@ static void map_current_symbol(const nr_phy_pxsch_params_t p, /* TS 38.211 table 6.4.1.1.3-1 and 2 */ -static void dmrs_amp_mult(const uint32_t dmrs_port, - const int Wt, +static void dmrs_amp_mult(const int Wt, const int Wf[2], const c16_t *mod_dmrs, c16_t *mod_dmrs_out, @@ -493,9 +492,9 @@ static void map_symbols(const nr_phy_pxsch_params_t p, c16_t mod_dmrs[ALNARS_16_4(n_dmrs)] __attribute((aligned(16))); if (p.transform_precoding == transformPrecoder_disabled) { nr_modulation(gold, n_dmrs * 2, DMRS_MOD_ORDER, (int16_t *)mod_dmrs); - dmrs_amp_mult(p.dmrs_port, p.Wt, p.Wf, mod_dmrs, mod_dmrs_amp, n_dmrs, p.dmrs_type, p.num_cdm_no_data); + dmrs_amp_mult(p.Wt, p.Wf, mod_dmrs, mod_dmrs_amp, n_dmrs, p.dmrs_type, p.num_cdm_no_data); } else { - dmrs_amp_mult(p.dmrs_port, p.Wt, p.Wf, dmrs_seq, mod_dmrs_amp, n_dmrs, p.dmrs_type, p.num_cdm_no_data); + dmrs_amp_mult(p.Wt, p.Wf, dmrs_seq, mod_dmrs_amp, n_dmrs, p.dmrs_type, p.num_cdm_no_data); } } else if ((p.pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) && ptrs_symbol) { AssertFatal(p.transform_precoding == transformPrecoder_disabled, "PTRS NOT SUPPORTED IF TRANSFORM PRECODING IS ENABLED\n"); @@ -1190,7 +1189,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, rm_info = calc_rate_match_info_uci(pusch_pdu, harq_process_ul_ue, nl_qm, &G[pusch_id]); } - if (nr_ulsch_encoding(UE, &phy_data->ulsch, frame, slot, G, 1, ULSCH_ids, number_dmrs_symbols) == -1) { + if (nr_ulsch_encoding(UE, &phy_data->ulsch, frame, slot, G, 1, ULSCH_ids) == -1) { stop_meas_nr_ue_phy(UE, PUSCH_PROC_STATS); return; } diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c index 51285edd0b..5f54b916b1 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c @@ -52,8 +52,7 @@ //#define ONE_OVER_SQRT2 23170 // 32767/sqrt(2) = 23170 (ONE_OVER_SQRT2) //#define POLAR_CODING_DEBUG -void nr_generate_pucch0(const PHY_VARS_NR_UE *ue, - c16_t **txdataF, +void nr_generate_pucch0(c16_t **txdataF, const NR_DL_FRAME_PARMS *frame_parms, const int16_t amp16, const int nr_slot_tx, @@ -156,8 +155,7 @@ void nr_generate_pucch0(const PHY_VARS_NR_UE *ue, } } -void nr_generate_pucch1(const PHY_VARS_NR_UE *ue, - c16_t **txdataF, +void nr_generate_pucch1(c16_t **txdataF, const NR_DL_FRAME_PARMS *frame_parms, const int16_t amp16, const int nr_slot_tx, @@ -752,8 +750,7 @@ void nr_uci_encoding(uint64_t payload, uint8_t nr_bit, uint8_t nrofPRB, bool uci } } //#if 0 -void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, - c16_t **txdataF, +void nr_generate_pucch2(c16_t **txdataF, const NR_DL_FRAME_PARMS *frame_parms, const int16_t amp16, const int nr_slot_tx, @@ -937,8 +934,7 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, } } //#if 0 -void nr_generate_pucch3_4(const PHY_VARS_NR_UE *ue, - c16_t **txdataF, +void nr_generate_pucch3_4(c16_t **txdataF, const NR_DL_FRAME_PARMS *frame_parms, const int16_t amp16, const int nr_slot_tx, diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h index 7f769872de..47b86c31c0 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h @@ -42,29 +42,25 @@ #include "T.h" #define ONE_OVER_SQRT2 23170 // 32767/sqrt(2) = 23170 (ONE_OVER_SQRT2) -void nr_generate_pucch0(const PHY_VARS_NR_UE *ue, - c16_t **txdataF, +void nr_generate_pucch0(c16_t **txdataF, const NR_DL_FRAME_PARMS *frame_parms, const int16_t amp, const int nr_slot_tx, const fapi_nr_ul_config_pucch_pdu *pucch_pdu); -void nr_generate_pucch1(const PHY_VARS_NR_UE *ue, - c16_t **txdataF, +void nr_generate_pucch1(c16_t **txdataF, const NR_DL_FRAME_PARMS *frame_parms, const int16_t amp, const int nr_slot_tx, const fapi_nr_ul_config_pucch_pdu *pucch_pdu); -void nr_generate_pucch2(const PHY_VARS_NR_UE *ue, - c16_t **txdataF, +void nr_generate_pucch2(c16_t **txdataF, const NR_DL_FRAME_PARMS *frame_parms, const int16_t amp, const int nr_slot_tx, const fapi_nr_ul_config_pucch_pdu *pucch_pdu); -void nr_generate_pucch3_4(const PHY_VARS_NR_UE *ue, - c16_t **txdataF, +void nr_generate_pucch3_4(c16_t **txdataF, const NR_DL_FRAME_PARMS *frame_parms, const int16_t amp, const int nr_slot_tx, diff --git a/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c index da27ca8603..46a2ebfa31 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c @@ -256,7 +256,6 @@ static int do_pss_sss_extract_nr( c16_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR], uint8_t doPss, uint8_t doSss, - uint8_t subframe, int ssb_start_subcarrier, c16_t rxdataF[][frame_parms->samples_per_slot_wCP]) // add flag to indicate extracting only PSS, only SSS, or both { @@ -333,7 +332,6 @@ static int do_pss_sss_extract_nr( static int pss_sss_extract_nr(const NR_DL_FRAME_PARMS *frame_parms, c16_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR], c16_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR], - uint8_t subframe, int ssb_start_subcarrier, c16_t rxdataF[][frame_parms->samples_per_slot_wCP]) { @@ -342,7 +340,6 @@ static int pss_sss_extract_nr(const NR_DL_FRAME_PARMS *frame_parms, sss_ext, 1 /* doPss */, 1 /* doSss */, - subframe, ssb_start_subcarrier, rxdataF); } @@ -381,7 +378,7 @@ bool rx_sss_nr(const NR_DL_FRAME_PARMS *frame_parms, // pss sss extraction - pss_sss_extract_nr(frame_parms, pss_ext, sss_ext, 0, ssb_start_subcarrier, rxdataF); /* subframe */ + pss_sss_extract_nr(frame_parms, pss_ext, sss_ext, ssb_start_subcarrier, rxdataF); /* subframe */ #ifdef DEBUG_PLOT_SSS diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index e304fe3dc9..cdf0a650b8 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -209,10 +209,7 @@ void clear_slot_beamid(PHY_VARS_gNB *gNB, int slot) } } -static void nr_generate_csi_rs_gNB(PHY_VARS_gNB *gNB, - int slot, - const nfapi_nr_config_request_scf_t *cfg, - const nfapi_nr_dl_tti_csi_rs_pdu *csi_rs_pdu) +static void nr_generate_csi_rs_gNB(PHY_VARS_gNB *gNB, int slot, const nfapi_nr_dl_tti_csi_rs_pdu *csi_rs_pdu) { const nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params = &csi_rs_pdu->csi_rs_pdu_rel15; if (csi_params->csi_type == 2) // ZP-CSI @@ -253,8 +250,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, const nfapi_nr_tx_data_request_t *TX_req, const nfapi_nr_ul_dci_request_t *UL_dci_req, int frame, - int slot, - int do_meas) + int slot) { const NR_DL_FRAME_PARMS *fp = &gNB->frame_parms; nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; @@ -280,7 +276,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, { int slot_prs = (slot - i * prs_config->PRSResourceTimeGap + fp->slots_per_frame) % fp->slots_per_frame; LOG_D(PHY,"gNB_TX: frame %d, slot %d, slot_prs %d, PRS Resource ID %d\n",frame, slot, slot_prs, rsc_id); - nr_generate_prs(slot_prs, &gNB->common_vars.txdataF[0][0][txdataF_offset], AMP, prs_config, cfg, fp); + nr_generate_prs(slot_prs, &gNB->common_vars.txdataF[0][0][txdataF_offset], AMP, prs_config, fp); } } } @@ -299,7 +295,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, nr_generate_dci(gNB, &dl_tti_pdu->pdcch_pdu.pdcch_pdu_rel15, txdataF_offset, &gNB->frame_parms, slot); break; case NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE: - nr_generate_csi_rs_gNB(gNB, slot, cfg, &dl_tti_pdu->csi_rs_pdu); + nr_generate_csi_rs_gNB(gNB, slot, &dl_tti_pdu->csi_rs_pdu); break; case NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE: { int tx_data_idx = dl_tti_pdu->pdsch_pdu.pdsch_pdu_rel15.pduIndex; @@ -721,7 +717,6 @@ static void fill_ul_rb_mask(PHY_VARS_gNB *gNB, static int fill_srs_reported_symbol(nfapi_nr_srs_reported_symbol_t *reported_symbol, const nfapi_nr_srs_pdu_t *srs_pdu, - const int N_RB_UL, const int16_t *snr_per_rb, const int srs_est) { @@ -890,7 +885,7 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB, stop_meas(&gNB->generate_srs_stats); c16_t **rxdataF = gNB->common_vars.rxdataF[srs->beam_nb]; start_meas(&gNB->get_srs_signal_stats); - *srs_est = nr_get_srs_signal(gNB, rxdataF, frame_rx, slot_rx, srs_pdu, nr_srs_info, srs_received_signal, srs_received_noise); + *srs_est = nr_get_srs_signal(gNB, rxdataF, slot_rx, srs_pdu, nr_srs_info, srs_received_signal, srs_received_noise); stop_meas(&gNB->get_srs_signal_stats); uint32_t signal_power_avg = 0; @@ -1275,7 +1270,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N AssertFatal(nr_srs_bf_report.num_reported_symbols == 1, "nr_srs_bf_report.num_reported_symbols %i not handled yet!\n", nr_srs_bf_report.num_reported_symbols); - fill_srs_reported_symbol(&nr_srs_bf_report.reported_symbol_list[0], srs_pdu, frame_parms->N_RB_UL, snr_per_rb, srs_est); + fill_srs_reported_symbol(&nr_srs_bf_report.reported_symbol_list[0], srs_pdu, snr_per_rb, srs_est); #ifdef SRS_IND_DEBUG LOG_I(NR_PHY, "nr_srs_bf_report.prg_size = %i\n", nr_srs_bf_report.prg_size); diff --git a/openair1/SCHED_NR/sched_nr.h b/openair1/SCHED_NR/sched_nr.h index 84691e9584..fbfb665ed1 100644 --- a/openair1/SCHED_NR/sched_nr.h +++ b/openair1/SCHED_NR/sched_nr.h @@ -38,8 +38,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, const nfapi_nr_tx_data_request_t *TX_req, const nfapi_nr_ul_dci_request_t *UL_dci_req, int frame, - int slot, - int do_meas); + int slot); void nr_save_ul_tti_req(PHY_VARS_gNB *gNB, nfapi_nr_ul_tti_request_t *UL_tti_req); int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, NR_UL_IND_t *UL_INFO); void L1_nr_prach_procedures(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_rach_indication_t *rach_ind); diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h index 5fe6e0c1bb..394b5592f5 100644 --- a/openair1/SCHED_NR_UE/defs.h +++ b/openair1/SCHED_NR_UE/defs.h @@ -172,7 +172,6 @@ void nr_fill_sl_rx_indication(sl_nr_rx_indication_t *rx_ind, uint8_t pdu_type, PHY_VARS_NR_UE *ue, uint16_t n_pdus, - const UE_nr_rxtx_proc_t *proc, void *typeSpecific, uint16_t rx_slss_id); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 2da33ce205..cc6a2ee23b 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1066,7 +1066,6 @@ int pbch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_da TracyCZone(ctx, true); int frame_rx = proc->frame_rx; int nr_slot_rx = proc->nr_slot_rx; - int gNB_id = proc->gNB_id; NR_DL_FRAME_PARMS *fp = &ue->frame_parms; int sampleShift = INT_MAX; nr_ue_dlsch_init(phy_data->dlsch, NR_MAX_NB_LAYERS>4 ? 2:1, ue->max_ldpc_iterations); @@ -1152,7 +1151,7 @@ int pbch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_da if (ue->no_timing_correction == 0 && pbchSuccess == 0) { LOG_D(PHY,"start adjust sync slot = %d no timing %d\n", nr_slot_rx, ue->no_timing_correction); sampleShift = - nr_adjust_synch_ue(fp, ue, gNB_id, fp->ofdm_symbol_size, dl_ch_estimates_time, frame_rx, nr_slot_rx, 16384); + nr_adjust_synch_ue(fp, ue, fp->ofdm_symbol_size, dl_ch_estimates_time, frame_rx, nr_slot_rx, 16384); } if (get_nrUE_params()->cont_fo_comp && pbchSuccess == 0) { diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c index 1e2151d1d3..9b17546f61 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c @@ -66,7 +66,6 @@ void nr_fill_sl_rx_indication(sl_nr_rx_indication_t *rx_ind, uint8_t pdu_type, PHY_VARS_NR_UE *ue, uint16_t n_pdus, - const UE_nr_rxtx_proc_t *proc, void *typeSpecific, uint16_t rx_slss_id) { @@ -157,7 +156,7 @@ static int nr_ue_psbch_procedures(PHY_VARS_NR_UE *ue, } nr_fill_sl_indication(&sl_indication, &rx_ind, NULL, proc, ue, phy_data); - nr_fill_sl_rx_indication(&rx_ind, SL_NR_RX_PDU_TYPE_SSB, ue, number_pdus, proc, (void *)result, rx_slss_id); + nr_fill_sl_rx_indication(&rx_ind, SL_NR_RX_PDU_TYPE_SSB, ue, number_pdus, (void *)result, rx_slss_id); if (ue->if_inst && ue->if_inst->sl_indication) ue->if_inst->sl_indication(&sl_indication); @@ -232,7 +231,7 @@ int psbch_pscch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr if (ue->no_timing_correction == 0 && psbchSuccess == 0) { LOG_D(NR_PHY, "start adjust sync slot = %d no timing %d\n", nr_slot_rx, ue->no_timing_correction); sampleShift = - nr_adjust_synch_ue(fp, ue, proc->gNB_id, fp->ofdm_symbol_size, dl_ch_estimates_time, frame_rx, nr_slot_rx, 16384); + nr_adjust_synch_ue(fp, ue, fp->ofdm_symbol_size, dl_ch_estimates_time, frame_rx, nr_slot_rx, 16384); } LOG_D(NR_PHY, "Doing N0 measurements in %s\n", __FUNCTION__); diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 03c14af9b9..be1187f574 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -176,17 +176,17 @@ void pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, switch(pucch_pdu->format_type) { case 0: - nr_generate_pucch0(ue, txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu); + nr_generate_pucch0(txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu); break; case 1: - nr_generate_pucch1(ue, txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu); + nr_generate_pucch1(txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu); break; case 2: - nr_generate_pucch2(ue, txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu); + nr_generate_pucch2(txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu); break; case 3: case 4: - nr_generate_pucch3_4(ue, txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu); + nr_generate_pucch3_4(txdataF, &ue->frame_parms, tx_amp, nr_slot_tx, pucch_pdu); break; } } diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index 076f05db48..6f4282f130 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -506,7 +506,7 @@ int main(int argc, char **argv) unsigned char output[nb_rb * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * NR_MAX_NB_LAYERS] __attribute__((aligned(64))); bzero(output, sizeof(output)); if (input_fd == NULL) { - nr_dlsch_encoding(gNB, 1, dlsch, frame, slot, frame_parms, output, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + nr_dlsch_encoding(gNB, 1, dlsch, frame, slot, output, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } for (SNR = snr0; SNR < snr1 && !stop; SNR += snr_step) { @@ -620,7 +620,7 @@ int main(int argc, char **argv) free(RC.gNB); free_nr_ue_dl_harq(UE->dl_harq_processes, 8, nb_rb); - term_nr_ue_signal(UE, 1); + term_nr_ue_signal(UE); free(UE); for (i = 0; i < 2; i++) { diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index bcce053231..b068936739 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -1120,7 +1120,7 @@ int main(int argc, char **argv) } start_meas(&gNB->phy_proc_tx); - phy_procedures_gNB_TX(gNB, &Sched_INFO->DL_req, &Sched_INFO->TX_req, &Sched_INFO->UL_dci_req, frame, slot, 1); + phy_procedures_gNB_TX(gNB, &Sched_INFO->DL_req, &Sched_INFO->TX_req, &Sched_INFO->UL_dci_req, frame, slot); stop_meas(&gNB->phy_proc_tx); int txdataF_offset = slot * frame_parms->samples_per_slot_wCP; diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 087b17ab06..5702be2cf9 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -654,7 +654,7 @@ int main(int argc, char **argv) nr_gscn_info_t gscnInfo[MAX_GSCN_BAND] = {0}; const int numGscn = 1; gscnInfo[0].ssbFirstSC = frame_parms->ssb_start_subcarrier; - nr_initial_sync_t ret = nr_initial_sync(&proc, UE, 1, 0, gscnInfo, numGscn); + nr_initial_sync_t ret = nr_initial_sync(&proc, UE, 1, gscnInfo, numGscn); printf("nr_initial_sync1 returns %s\n", ret.cell_detected ? "cell detected" : "cell not detected"); if (!ret.cell_detected) n_errors++; @@ -761,7 +761,7 @@ int main(int argc, char **argv) free(RC.gNB[0]); free(RC.gNB); - term_nr_ue_signal(UE, 1); + term_nr_ue_signal(UE); free(UE); for (i=0; i<2; i++) { diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 4da1accfe8..1f00bdd6cf 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -844,7 +844,7 @@ int main(int argc, char **argv){ free(RC.gNB[0]); free(RC.gNB); - term_nr_ue_signal(UE, 1); + term_nr_ue_signal(UE); free(UE->nrUE_config.prach_config.num_prach_fd_occasions_list); free(UE); free(PHY_vars_UE_g[0]); diff --git a/openair1/SIMULATION/NR_PHY/psbchsim.c b/openair1/SIMULATION/NR_PHY/psbchsim.c index 49d07616c4..cb78915cbb 100644 --- a/openair1/SIMULATION/NR_PHY/psbchsim.c +++ b/openair1/SIMULATION/NR_PHY/psbchsim.c @@ -673,8 +673,8 @@ int main(int argc, char **argv) free(r_re); free(r_im); - term_nr_ue_signal(UE_TX, 1); - term_nr_ue_signal(UE_RX, 1); + term_nr_ue_signal(UE_TX); + term_nr_ue_signal(UE_RX); free(UE_TX); free(UE_RX); diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 980beac6b3..bfa294a55f 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -551,11 +551,11 @@ int main(int argc, char **argv) for (int aatx=0;aatx<1;aatx++) bzero(txdataF[aatx],frame_parms->ofdm_symbol_size*sizeof(int)); if(format==0 && do_DTX==0){ - nr_generate_pucch0(UE, txdataF, frame_parms, amp, nr_slot_tx, &pucch_tx_pdu); + nr_generate_pucch0(txdataF, frame_parms, amp, nr_slot_tx, &pucch_tx_pdu); } else if (format == 1 && do_DTX==0){ - nr_generate_pucch1(UE, txdataF, frame_parms, amp, nr_slot_tx, &pucch_tx_pdu); + nr_generate_pucch1(txdataF, frame_parms, amp, nr_slot_tx, &pucch_tx_pdu); } else if (do_DTX == 0){ - nr_generate_pucch2(UE, txdataF, frame_parms, amp, nr_slot_tx, &pucch_tx_pdu); + nr_generate_pucch2(txdataF, frame_parms, amp, nr_slot_tx, &pucch_tx_pdu); } // SNR Computation @@ -784,7 +784,7 @@ int main(int argc, char **argv) free(RC.gNB[0]); free(RC.gNB); - term_nr_ue_signal(UE, 1); + term_nr_ue_signal(UE); free(UE); for (int aatx=0; aatxgNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list); free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list); - term_nr_ue_signal(UE, 1); + term_nr_ue_signal(UE); free(UE); abortTpool(&gNB->threadPool); diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 667ab25093..d9c581be23 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -816,7 +816,7 @@ void RCconfig_nr_prs(void) /** * @brief Get number or blacklisted UL PRBs and their mapping from gNB config */ -static int get_prb_blacklist(uint8_t instance, uint16_t *prbbl) +static int get_prb_blacklist(uint16_t *prbbl) { paramdef_t GNBSParams[] = GNBSPARAMS_DESC; paramlist_def_t GNBParamList = {GNB_CONFIG_STRING_GNB_LIST, NULL, 0}; @@ -870,7 +870,7 @@ void RCconfig_NR_L1(void) // PRB Blacklist uint16_t prbbl[MAX_BWP_SIZE] = {0}; - int num_ulprbbl = get_prb_blacklist(j, prbbl); + int num_ulprbbl = get_prb_blacklist(prbbl); if (num_ulprbbl != -1) { RC.gNB[j]->num_ulprbbl = num_ulprbbl; LOG_D(NR_PHY, "Copying %d blacklisted PRB to L1 context\n", RC.gNB[j]->num_ulprbbl); @@ -943,7 +943,7 @@ bool is_pattern2_config(paramdef_t *param) return true; } -static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cfg, int minRXTXTIME, int do_SRS) +static NR_ServingCellConfigCommon_t *get_scc_config(int minRXTXTIME, int do_SRS) { NR_ServingCellConfigCommon_t *scc = calloc_or_fail(1, sizeof(*scc)); uint64_t ssb_bitmap=0xff; @@ -1039,8 +1039,7 @@ static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cf return scc; } -static int read_du_cell_info(configmodule_interface_t *cfg, - bool separate_du, +static int read_du_cell_info(bool separate_du, uint32_t *gnb_id, uint64_t *gnb_du_id, char **name, @@ -1211,7 +1210,7 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id, return req; } -static nr_ptrs_config_t *get_ptrs_config(int gnb_idx) +static nr_ptrs_config_t *get_ptrs_config() { char aprefix[MAX_OPTNAME_SIZE * 2 + 8]; snprintf(aprefix, sizeof(aprefix), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0); @@ -1471,7 +1470,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) AssertFatal(config.maxMIMO_layers != 0 && config.maxMIMO_layers <= tot_ant, "Invalid maxMIMO_layers %d\n", config.maxMIMO_layers); config.redcap = get_redcap_config(0); - config.ptrs = get_ptrs_config(0); + config.ptrs = get_ptrs_config(); char aprefix[MAX_OPTNAME_SIZE * 2 + 8]; snprintf(aprefix, sizeof(aprefix), "%s.[%d].%s", GNB_CONFIG_STRING_GNB_LIST, 0, GNB_CONFIG_STRING_TIMERS_CONFIG); @@ -1523,7 +1522,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) config.num_agg_level_candidates[PDCCH_AGG_LEVEL8], config.num_agg_level_candidates[PDCCH_AGG_LEVEL16]); - NR_ServingCellConfigCommon_t *scc = get_scc_config(cfg, config.minRXTXTIME, config.do_SRS); + NR_ServingCellConfigCommon_t *scc = get_scc_config(config.minRXTXTIME, config.do_SRS); // BWP get_bwp_config(&config, scc); AssertFatal(config.num_additional_bwps <= 4, "Impossible to configure more than 4 additional BWPs\n"); @@ -1622,7 +1621,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) RC.nrmac[j]->identity_pm = *(MacRLC_ParamList.paramarray[j][MACRLC_IDENTITY_PM_IDX].u8ptr); // PRB Blacklist uint16_t prbbl[MAX_BWP_SIZE] = {0}; - int num_ulprbbl = get_prb_blacklist(j, prbbl); + int num_ulprbbl = get_prb_blacklist(prbbl); if (num_ulprbbl != -1) { LOG_I(NR_PHY, "Copying %d blacklisted PRB to L1 context\n", num_ulprbbl); memcpy(RC.nrmac[j]->ulprbbl, prbbl, MAX_BWP_SIZE * sizeof(prbbl[0])); @@ -1667,7 +1666,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) uint32_t gnb_id = 0; char *name = NULL; f1ap_served_cell_info_t info; - read_du_cell_info(cfg, NODE_IS_DU(node_type), &gnb_id, &gnb_du_id, &name, &info, 1); + read_du_cell_info(NODE_IS_DU(node_type), &gnb_id, &gnb_du_id, &name, &info, 1); NR_COMMON_channels_t *cc = &RC.nrmac[0]->common_channels[0]; cc->du_SIBs = fill_du_sibs(GNBParamList.paramarray[0]); diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 2a5c8e041d..d16653487f 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -717,9 +717,7 @@ static void update_ss(void *ue_ss_in, void *nw_ss_in) } } -static void configure_common_ss_coreset(const NR_UE_MAC_INST_t *mac, - NR_BWP_PDCCH_t *pdcch, - NR_PDCCH_ConfigCommon_t *pdcch_ConfigCommon) +static void configure_common_ss_coreset(NR_BWP_PDCCH_t *pdcch, NR_PDCCH_ConfigCommon_t *pdcch_ConfigCommon) { if (!pdcch_ConfigCommon) return; @@ -1778,7 +1776,7 @@ static void configure_common_BWP_dl(NR_UE_MAC_INST_t *mac, int bwp_id, NR_BWP_Do NR_BWP_PDCCH_t *pdcch = &mac->config_BWP_PDCCH[bwp_id]; if (dl_common->pdcch_ConfigCommon) { if (dl_common->pdcch_ConfigCommon->present == NR_SetupRelease_PDCCH_ConfigCommon_PR_setup) - configure_common_ss_coreset(mac, pdcch, dl_common->pdcch_ConfigCommon->choice.setup); + configure_common_ss_coreset(pdcch, dl_common->pdcch_ConfigCommon->choice.setup); if (dl_common->pdcch_ConfigCommon->present == NR_SetupRelease_PDCCH_ConfigCommon_PR_release) release_common_ss_cset(pdcch); } diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c b/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c index e6d872da81..809ce054f4 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c @@ -394,8 +394,7 @@ int nr_rrc_mac_config_req_sl_preconfig(module_id_t module_id, //Copies the values of SSB time allocation from ASN format to MAC context -static void sl_mac_config_ssb_time_alloc(uint8_t module_id, - NR_SL_SSB_TimeAllocation_r16_t *sl_SSB_TimeAllocation_r16, +static void sl_mac_config_ssb_time_alloc(NR_SL_SSB_TimeAllocation_r16_t *sl_SSB_TimeAllocation_r16, sl_ssb_timealloc_t *ssb_time_alloc) { @@ -432,9 +431,7 @@ void nr_rrc_mac_transmit_slss_req(module_id_t module_id, sl_mac->tx_sl_bch.num_ssb = 0; sl_mac->tx_sl_bch.ssb_slot = 0; - sl_mac_config_ssb_time_alloc(module_id, - ssb_ta, - &sl_mac->tx_sl_bch.ssb_time_alloc); + sl_mac_config_ssb_time_alloc(ssb_ta, &sl_mac->tx_sl_bch.ssb_time_alloc); LOG_I(NR_MAC,"[UE%d]SL RRC->MAC: TX SLSS REQ SLSS-id:%d, SL-MIB:%x, numssb:%d, offset:%d, interval:%d\n", module_id, sl_mac->tx_sl_bch.slss_id, @@ -489,9 +486,7 @@ void nr_rrc_mac_config_req_sl_mib(module_id_t module_id, sl_mac->rx_sl_bch.num_ssb = 0; sl_mac->rx_sl_bch.ssb_slot = 0; - sl_mac_config_ssb_time_alloc(module_id, - ssb_ta, - &sl_mac->rx_sl_bch.ssb_time_alloc); + sl_mac_config_ssb_time_alloc(ssb_ta, &sl_mac->rx_sl_bch.ssb_time_alloc); LOG_I(NR_MAC,"[UE%d]SL RRC->MAC: RX SLSS REQ SLSS-id:%d, SL-MIB:%x, numssb:%d, offset:%d, interval:%d\n", module_id, sl_mac->rx_sl_bch.slss_id, diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index 9ee1bfab28..d01c014527 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -166,11 +166,7 @@ typedef struct { enum { b_none, b_long, b_short, b_short_trunc, b_long_trunc } type_bsr; } type_bsr_t; -int nr_write_ce_ulsch_pdu(uint8_t *mac_ce, - NR_UE_MAC_INST_t *mac, - NR_SINGLE_ENTRY_PHR_MAC_CE *power_headroom, - const type_bsr_t *bsr, - uint8_t *mac_ce_end); +int nr_write_ce_ulsch_pdu(uint8_t *mac_ce, NR_SINGLE_ENTRY_PHR_MAC_CE *power_headroom, const type_bsr_t *bsr, uint8_t *mac_ce_end); void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl_config, const frame_t frame, const int slot); void set_precoding_information_parameters(nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, @@ -241,10 +237,9 @@ int get_sum_delta_pucch(NR_UE_MAC_INST_t *mac, int slot, frame_t frame); void ul_ports_config(NR_UE_MAC_INST_t *mac, int *n_front_load_symb, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, - dci_pdu_rel15_t *dci, - nr_dci_format_t dci_format); + dci_pdu_rel15_t *dci); -bool init_RA(NR_UE_MAC_INST_t *mac, int frame); +bool init_RA(NR_UE_MAC_INST_t *mac); /* Random Access */ /* \brief This function schedules the PRACH according to prach_ConfigurationIndex and TS 38.211 tables 6.3.3.2.x @@ -262,7 +257,7 @@ void configure_csi_resource_mapping(fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_c bool is_lcid_suspended(NR_UE_MAC_INST_t *mac, int lcid); void nr_ra_contention_resolution_failed(NR_UE_MAC_INST_t *mac); -void nr_ra_succeeded(NR_UE_MAC_INST_t *mac, const uint8_t gNB_index, const frame_t frame, const int slot); +void nr_ra_succeeded(NR_UE_MAC_INST_t *mac, const frame_t frame, const int slot); void nr_ra_backoff_setting(RA_config_t *ra); void nr_get_RA_window(NR_UE_MAC_INST_t *mac); void prepare_msg4_msgb_feedback(NR_UE_MAC_INST_t *mac, int pid, int ack_nack); @@ -283,7 +278,7 @@ int16_t get_prach_tx_power(NR_UE_MAC_INST_t *mac); void schedule_RA_after_SR_failure(NR_UE_MAC_INST_t *mac); void nr_rar_not_successful(NR_UE_MAC_INST_t *mac); void ra_resource_selection(NR_UE_MAC_INST_t *mac); -void nr_Msg3_transmitted(NR_UE_MAC_INST_t *mac, uint8_t CC_id, frame_t frameP, slot_t slotP, uint8_t gNB_id); +void nr_Msg3_transmitted(NR_UE_MAC_INST_t *mac); void trigger_MAC_UE_RA(NR_UE_MAC_INST_t *mac, dci_pdu_rel15_t *pdcch_order); void nr_get_Msg3_MsgA_PUSCH_payload(NR_UE_MAC_INST_t *mac, uint8_t *buf, int TBS_max); void handle_time_alignment_timer_expired(NR_UE_MAC_INST_t *mac); diff --git a/openair2/LAYER2/NR_MAC_UE/mac_tables.c b/openair2/LAYER2/NR_MAC_UE/mac_tables.c index a313600609..90cdc26fe4 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_tables.c +++ b/openair2/LAYER2/NR_MAC_UE/mac_tables.c @@ -470,8 +470,7 @@ void set_antenna_port_parameters(fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_pdu, void ul_ports_config(NR_UE_MAC_INST_t *mac, int *n_front_load_symb, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, - dci_pdu_rel15_t *dci, - nr_dci_format_t dci_format) + dci_pdu_rel15_t *dci) { uint8_t rank = pusch_config_pdu->nrOfLayers; NR_PUSCH_Config_t *pusch_Config = mac->current_UL_BWP->pusch_Config; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 47277f8a66..a93ad9f8d2 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -819,7 +819,7 @@ static void setup_ra_response_window(NR_UE_MAC_INST_t *mac, // Random Access procedure initialization as per 5.1.1 and initialization of variables specific // to Random Access type as specified in clause 5.1.1a (3GPP TS 38.321 version 16.2.1 Release 16) -bool init_RA(NR_UE_MAC_INST_t *mac, int frame) +bool init_RA(NR_UE_MAC_INST_t *mac) { RA_config_t *ra = &mac->ra; LOG_D(NR_MAC, "Initialization of RA\n"); @@ -1023,7 +1023,7 @@ bool init_RA(NR_UE_MAC_INST_t *mac, int frame) return true; } -void nr_Msg3_transmitted(NR_UE_MAC_INST_t *mac, uint8_t CC_id, frame_t frameP, slot_t slotP, uint8_t gNB_id) +void nr_Msg3_transmitted(NR_UE_MAC_INST_t *mac) { RA_config_t *ra = &mac->ra; NR_RACH_ConfigCommon_t *nr_rach_ConfigCommon = mac->current_UL_BWP->rach_ConfigCommon; @@ -1109,7 +1109,7 @@ void nr_get_Msg3_MsgA_PUSCH_payload(NR_UE_MAC_INST_t *mac, uint8_t *buf, int TBS // according to section 5 of 3GPP TS 38.321 version 16.2.1 Release 16 // todo: // - complete handling of received contention-based RA preamble -void nr_ra_succeeded(NR_UE_MAC_INST_t *mac, const uint8_t gNB_index, const frame_t frame, const int slot) +void nr_ra_succeeded(NR_UE_MAC_INST_t *mac, const frame_t frame, const int slot) { RA_config_t *ra = &mac->ra; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_power_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_power_procedures.c index a409cbe653..668efba2f5 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_power_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_power_procedures.c @@ -59,7 +59,7 @@ static const int nb_symbols_excluding_dmrs[11][2][2] }; // ∆MPR according to Table 6.2.2-3 38.101-1 -static float get_delta_mpr(uint16_t nr_band, frame_type_t frame_type, int scs, int channel_bandwidth, int n_prbs, int start_prb, int power_class) +static float get_delta_mpr(uint16_t nr_band, frame_type_t frame_type, int scs, int channel_bandwidth, int power_class) { if (compare_relative_ul_channel_bw(nr_band, scs, channel_bandwidth, frame_type)) { if (power_class == 3) { @@ -191,7 +191,7 @@ float nr_get_Pcmax(int p_Max, int delta_TC = 0; float MPR = get_mpr(Qm, N_RB_UL, is_transform_precoding, n_prbs, start_prb, power_class); - float delta_MPR = get_delta_mpr(nr_band, frame_type, scs, channel_bandwidth, n_prbs, start_prb, power_class); + float delta_MPR = get_delta_mpr(nr_band, frame_type, scs, channel_bandwidth, power_class); int A_MPR = 0; // TODO too complicated to implement for now (see 6.2.3 in 38.101-1) int delta_rx_SRS = 0; // TODO for SRS int P_MPR = 0; // to ensure compliance with applicable electromagnetic energy absorption requirements diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 52ed7580c6..2c3ee539fc 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -3296,7 +3296,7 @@ static void nr_ue_process_rar(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *d rar = (NR_MAC_RAR *) (dlsch_buffer + n_subheaders + (n_subPDUs - 1) * sizeof(NR_MAC_RAR)); handle_rar_reception(mac, rar, frame, slot); if (ra->cfra) - nr_ra_succeeded(mac, dl_info->gNB_index, frame, slot); + nr_ra_succeeded(mac, frame, slot); break; } if (rarh->E == 0) { @@ -3818,12 +3818,7 @@ static bool check_ra_contention_resolution(const uint8_t *pdu, const uint8_t *co return true; } -static int nr_ue_validate_successrar(uint8_t *pduP, - int32_t pdu_len, - NR_UE_MAC_INST_t *mac, - uint8_t gNB_index, - frame_t frameP, - int slot) +static int nr_ue_validate_successrar(uint8_t *pduP, int32_t pdu_len, NR_UE_MAC_INST_t *mac, frame_t frameP, int slot) { // TS 38.321 - Figure 6.1.5a-1: BI MAC subheader // TS 38.321 - Figure 6.1.5a-3: SuccessRAR MAC subheader @@ -3885,7 +3880,7 @@ static int nr_ue_validate_successrar(uint8_t *pduP, if (ra->RA_active && ra_success) { nr_timer_stop(&ra->response_window_timer); - nr_ra_succeeded(mac, gNB_index, frameP, slot); + nr_ra_succeeded(mac, frameP, slot); } else if (!ra_success) { nr_ra_backoff_setting(ra); } @@ -3943,7 +3938,6 @@ static void nr_ue_process_mac_pdu(NR_UE_MAC_INST_t *mac, nr_downlink_indication_ fapi_nr_pdsch_pdu_t *pdsch_pdu = &(dl_info->rx_ind->rx_indication_body + pdu_id)->pdsch_pdu; uint8_t *pduP = pdsch_pdu->pdu; int32_t pdu_len = (int32_t)pdsch_pdu->pdu_length; - uint8_t gNB_index = dl_info->gNB_index; uint8_t CC_id = dl_info->cc_id; uint8_t done = 0; RA_config_t *ra = &mac->ra; @@ -3963,7 +3957,7 @@ static void nr_ue_process_mac_pdu(NR_UE_MAC_INST_t *mac, nr_downlink_indication_ dl_info->rx_ind->number_pdus); if (ra->ra_type == RA_2_STEP && ra->ra_state == nrRA_WAIT_MSGB) { - int n = nr_ue_validate_successrar(pduP, pdu_len, mac, gNB_index, frameP, slot); + int n = nr_ue_validate_successrar(pduP, pdu_len, mac, frameP, slot); pduP += n; pdu_len -= n; } @@ -4095,7 +4089,7 @@ static void nr_ue_process_mac_pdu(NR_UE_MAC_INST_t *mac, nr_downlink_indication_ bool ra_success = check_ra_contention_resolution(&pduP[1], ra->cont_res_id); if (ra->RA_active && ra_success) { - nr_ra_succeeded(mac, gNB_index, frameP, slot); + nr_ra_succeeded(mac, frameP, slot); } else if (!ra_success) { // consider this Contention Resolution not successful and discard the successfully decoded MAC PDU nr_ra_contention_resolution_failed(mac); @@ -4135,14 +4129,9 @@ static void nr_ue_process_mac_pdu(NR_UE_MAC_INST_t *mac, nr_downlink_indication_ * Function: generating MAC CEs (MAC CE and subheader) for the ULSCH PDU * Parameters: * @mac_ce pointer to the MAC sub-PDUs including the MAC CEs - * @mac pointer to the MAC instance * Return: number of written bytes */ -int nr_write_ce_ulsch_pdu(uint8_t *mac_ce, - NR_UE_MAC_INST_t *mac, - NR_SINGLE_ENTRY_PHR_MAC_CE *power_headroom, - const type_bsr_t *bsr, - uint8_t *mac_ce_end) +int nr_write_ce_ulsch_pdu(uint8_t *mac_ce, NR_SINGLE_ENTRY_PHR_MAC_CE *power_headroom, const type_bsr_t *bsr, uint8_t *mac_ce_end) { uint8_t *pdu = mac_ce; if (power_headroom) { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index d06c8302a6..cc933b50e4 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -324,7 +324,7 @@ fapi_nr_dl_config_request_t *get_dl_config_request(NR_UE_MAC_INST_t *mac, int sl return &mac->dl_config_request[slot]; } -void ul_layers_config(NR_UE_MAC_INST_t *mac, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, dci_pdu_rel15_t *dci, nr_dci_format_t dci_format) +static void ul_layers_config(NR_UE_MAC_INST_t *mac, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, dci_pdu_rel15_t *dci) { NR_UE_UL_BWP_t *current_UL_BWP = mac->current_UL_BWP; NR_SRS_Config_t *srs_config = current_UL_BWP->srs_Config; @@ -583,8 +583,8 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, else pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2; } else if (dci_format == NR_UL_DCI_FORMAT_0_1) { - ul_layers_config(mac, pusch_config_pdu, dci, dci_format); - ul_ports_config(mac, &dmrslength, pusch_config_pdu, dci, dci_format); + ul_layers_config(mac, pusch_config_pdu, dci); + ul_ports_config(mac, &dmrslength, pusch_config_pdu, dci); } else { LOG_E(NR_MAC, "UL grant from DCI format %d is not handled...\n", dci_format); mac->stats.bad_dci++; @@ -1459,7 +1459,7 @@ static void nr_update_sr(NR_UE_MAC_INST_t *mac, bool BSRsent) } } -static void nr_update_rlc_buffers_status(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slotP, uint8_t gNB_index) +static void nr_update_rlc_buffers_status(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slotP) { for (int i = 0; i < mac->lc_ordered_list.count; i++) { nr_lcordered_info_t *lc_info = mac->lc_ordered_list.array[i]; @@ -1987,10 +1987,8 @@ static uint8_t nr_locate_BsrIndexByBufferSize(int size, int value) } static void nr_ue_get_sdu_mac_ce_pre(NR_UE_MAC_INST_t *mac, - int CC_id, frame_t frame, slot_t slot, - uint8_t gNB_index, uint8_t *ulsch_buffer, uint32_t buflen, uint32_t *LCG_bytes, @@ -2172,8 +2170,7 @@ static void nr_ue_get_sdu_mac_ce_post(NR_UE_MAC_INST_t *mac, } } - int size = - nr_write_ce_ulsch_pdu(mac_ce_p->cur_ptr, mac, mac_ce_p->phr_len ? &mac_ce_p->phr : NULL, &mac_ce_p->bsr, mac_ce_p->pdu_end); + int size = nr_write_ce_ulsch_pdu(mac_ce_p->cur_ptr, mac_ce_p->phr_len ? &mac_ce_p->phr : NULL, &mac_ce_p->bsr, mac_ce_p->pdu_end); LOG_D(NR_MAC, "Added %d bytes of BSR\n", size); mac_ce_p->cur_ptr += size; } @@ -2272,7 +2269,6 @@ static uint select_logical_channels(NR_UE_MAC_INST_t *mac, nr_lcordered_info_t * static bool fill_mac_sdu(NR_UE_MAC_INST_t *mac, frame_t frame, slot_t slot, - uint8_t gNB_index, int lcid, uint count_same_priority_lcids, uint32_t buflen_ep, @@ -2406,18 +2402,14 @@ static bool fill_mac_sdu(NR_UE_MAC_INST_t *mac, to generate the complete MAC PDU with sub-headers and MAC CEs according to ULSCH MAC PDU generation (6.1.2 TS 38.321) the selected sub-header for the payload sub-PDUs is NR_MAC_SUBHEADER_LONG * @module_idP Module ID - * @CC_id Component Carrier index * @frame current UL frame * @slot current UL slot - * @gNB_index gNB index * @ulsch_buffer Pointer to ULSCH PDU * @buflen TBS */ static uint8_t nr_ue_get_sdu(NR_UE_MAC_INST_t *mac, - int CC_id, frame_t frame, slot_t slot, - uint8_t gNB_index, uint8_t *ulsch_buffer, const uint32_t buflen, int tx_power, @@ -2436,7 +2428,7 @@ static uint8_t nr_ue_get_sdu(NR_UE_MAC_INST_t *mac, uint32_t LCG_bytes[NR_MAX_NUM_LCGID] = {0}; nr_update_bsr(mac, LCG_bytes); - nr_ue_get_sdu_mac_ce_pre(mac, CC_id, frame, slot, gNB_index, ulsch_buffer, buflen, LCG_bytes, &mac_ce_info, tx_power, P_CMAX); + nr_ue_get_sdu_mac_ce_pre(mac, frame, slot, ulsch_buffer, buflen, LCG_bytes, &mac_ce_info, tx_power, P_CMAX); LOG_D(NR_MAC, "[UE %d] [%d.%d] process UL transport block with size TBS = %d bytes, number of existing LCids %d \n", @@ -2510,7 +2502,6 @@ static uint8_t nr_ue_get_sdu(NR_UE_MAC_INST_t *mac, if (!fill_mac_sdu(mac, frame, slot, - gNB_index, lcid, count_same_priority_lcids, buflen_ep, @@ -2563,12 +2554,10 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info) int cc_id = ul_info->cc_id; frame_t frame_tx = ul_info->frame; slot_t slot_tx = ul_info->slot; - uint32_t gNB_index = ul_info->gNB_index; - RA_config_t *ra = &mac->ra; if (mac->state == UE_PERFORMING_RA && ra->ra_state == nrRA_UE_IDLE) { - init_RA(mac, frame_tx); + init_RA(mac); // perform the Random Access Resource selection procedure (see clause 5.1.2 and .2a) ra_resource_selection(mac); } @@ -2579,7 +2568,7 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info) bool BSRsent = false; if (mac->state == UE_CONNECTED) { nr_ue_periodic_srs_scheduling(mac, frame_tx, slot_tx); - nr_update_rlc_buffers_status(mac, frame_tx, slot_tx, gNB_index); + nr_update_rlc_buffers_status(mac, frame_tx, slot_tx); } // Schedule ULSCH only if the current frame and slot match those in ul_config_req @@ -2637,7 +2626,7 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info) pdu->rb_size, pdu->rb_start); - nr_ue_get_sdu(mac, cc_id, frame_tx, slot_tx, gNB_index, ulsch_input_buffer, TBS_bytes, tx_power, P_CMAX, &BSRsent); + nr_ue_get_sdu(mac, frame_tx, slot_tx, ulsch_input_buffer, TBS_bytes, tx_power, P_CMAX, &BSRsent); pdu->tx_request_body.fapiTxPdu = ulsch_input_buffer; pdu->tx_request_body.pdu_length = TBS_bytes; number_of_pdus++; @@ -2654,11 +2643,11 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info) LOG_I(NR_MAC, "[RAPROC][%d.%d] RA-Msg3 retransmitted\n", frame_tx, slot_tx); // 38.321 restart the ra-ContentionResolutionTimer at each HARQ retransmission in the first symbol after the end of the Msg3 // transmission - nr_Msg3_transmitted(mac, cc_id, frame_tx, slot_tx, gNB_index); + nr_Msg3_transmitted(mac); } if (ra->ra_state == nrRA_WAIT_RAR && !ra->cfra) { LOG_A(NR_MAC, "[RAPROC][%d.%d] RA-Msg3 transmitted\n", frame_tx, slot_tx); - nr_Msg3_transmitted(mac, cc_id, frame_tx, slot_tx, gNB_index); + nr_Msg3_transmitted(mac); } if (ra->ra_state == nrRA_WAIT_MSGB && !ra->cfra) { LOG_A(NR_MAC, "[RAPROC][%d.%d] RA-MsgA-PUSCH transmitted\n", frame_tx, slot_tx); diff --git a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp index f7fc520d06..cdbb3e9e3e 100644 --- a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp +++ b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp @@ -101,9 +101,8 @@ TEST(test_init_ra, four_step_cbra) mac.frame_structure.frame_type = TDD; mac.frame_structure.numb_slots_frame = 20; mac.frequency_range = FR1; - int frame = 151; - init_RA(&mac, frame); + init_RA(&mac); EXPECT_EQ(mac.ra.ra_type, RA_4_STEP); EXPECT_EQ(mac.state, UE_PERFORMING_RA); @@ -135,14 +134,13 @@ TEST(test_init_ra, four_step_cfra) mac.frame_structure.frame_type = TDD; mac.frame_structure.numb_slots_frame = 20; mac.frequency_range = FR1; - int frame = 151; NR_RACH_ConfigDedicated_t rach_ConfigDedicated = {0}; NR_CFRA_t cfra; rach_ConfigDedicated.cfra = &cfra; ra->rach_ConfigDedicated = &rach_ConfigDedicated; - init_RA(&mac, frame); + init_RA(&mac); EXPECT_EQ(mac.ra.ra_type, RA_4_STEP); EXPECT_EQ(mac.state, UE_PERFORMING_RA); diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 73845551af..5fb8ad78dd 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -106,7 +106,6 @@ void print_ue_mac_stats(const module_id_t mod, const int frame_rx, const int slo static int handle_bcch_bch(NR_UE_MAC_INST_t *mac, int cc_id, unsigned int gNB_index, - void *phy_data, uint8_t *pduP, unsigned int additional_bits, uint32_t ssb_index_mod8, @@ -149,17 +148,13 @@ static int handle_bcch_dlsch(NR_UE_MAC_INST_t *mac, } // L2 Abstraction Layer -static nr_dci_format_t handle_dci(NR_UE_MAC_INST_t *mac, - unsigned int gNB_index, - frame_t frame, - int slot, - fapi_nr_dci_indication_pdu_t *dci) +static nr_dci_format_t handle_dci(NR_UE_MAC_INST_t *mac, frame_t frame, int slot, fapi_nr_dci_indication_pdu_t *dci) { // if notification of a reception of a PDCCH transmission of the SpCell is received from lower layers // if the C-RNTI MAC CE was included in Msg3 // consider this Contention Resolution successful if (mac->msg3_C_RNTI && mac->ra.ra_state == nrRA_WAIT_CONTENTION_RESOLUTION) - nr_ra_succeeded(mac, gNB_index, frame, slot); + nr_ra_succeeded(mac, frame, slot); // suspend RAR response window timer // (in RFsim running multiple slot in parallel it might expire while decoding MSG2) @@ -245,11 +240,7 @@ static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indicatio LOG_T(MAC, "[L2][IF MODULE][DL INDICATION][DCI_IND]\n"); for (int i = 0; i < dl_info->dci_ind->number_of_dcis; i++) { LOG_T(MAC, ">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n", i, dl_info->dci_ind->number_of_dcis); - nr_dci_format_t dci_format = handle_dci(mac, - dl_info->gNB_index, - dl_info->frame, - dl_info->slot, - dl_info->dci_ind->dci_list + i); + nr_dci_format_t dci_format = handle_dci(mac, dl_info->frame, dl_info->slot, dl_info->dci_ind->dci_list + i); /* The check below filters out UL_DCIs which are being processed as DL_DCIs. */ if (dci_format != NR_DL_DCI_FORMAT_1_0 && dci_format != NR_DL_DCI_FORMAT_1_1) { @@ -291,7 +282,6 @@ static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indicatio ret_mask |= (handle_bcch_bch(mac, dl_info->cc_id, dl_info->gNB_index, - dl_info->phy_data, rx_indication_body.ssb_pdu.pdu, rx_indication_body.ssb_pdu.additional_bits, rx_indication_body.ssb_pdu.ssb_index,