Merge remote-tracking branch 'origin/NR_UE_TA_procedures_at_MAC' into integration_2023_w16b
This commit is contained in:
@@ -234,9 +234,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
ue->bitrate[gNB_id] = 0;
|
||||
ue->total_received_bits[gNB_id] = 0;
|
||||
|
||||
ue->ul_time_alignment[gNB_id].apply_ta = 0;
|
||||
ue->ul_time_alignment[gNB_id].ta_frame = -1;
|
||||
ue->ul_time_alignment[gNB_id].ta_slot = -1;
|
||||
}
|
||||
// init NR modulation lookup tables
|
||||
nr_generate_modulation_table();
|
||||
@@ -691,6 +688,8 @@ void init_N_TA_offset(PHY_VARS_NR_UE *ue){
|
||||
}
|
||||
|
||||
ue->N_TA_offset = (int)(N_TA_offset * factor);
|
||||
ue->ta_frame = -1;
|
||||
ue->ta_slot = -1;
|
||||
|
||||
LOG_I(PHY,"UE %d Setting N_TA_offset to %d samples (factor %f, UL Freq %lu, N_RB %d, mu %d)\n", ue->Mod_id, ue->N_TA_offset, factor, fp->ul_CarrierFreq, fp->N_RB_DL, fp->numerology_index);
|
||||
}
|
||||
|
||||
@@ -980,9 +980,8 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t r
|
||||
fapi_nr_rx_indication_t rx_ind = {0};
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, NULL);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_CSIRS_IND, ue, NULL, NULL, 1, proc, (void *)&csirs_measurements, NULL);
|
||||
if (ue->if_inst && ue->if_inst->dl_indication) {
|
||||
ue->if_inst->dl_indication(&dl_indication, NULL);
|
||||
}
|
||||
if (ue->if_inst && ue->if_inst->dl_indication)
|
||||
ue->if_inst->dl_indication(&dl_indication);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
}
|
||||
|
||||
// if stand alone and sync on ssb do sib1 detection as part of initial sync
|
||||
if (sa==1 && ret==0) {
|
||||
if (sa == 1 && ret == 0) {
|
||||
nr_ue_dlsch_init(phy_data.dlsch, 1, ue->max_ldpc_iterations);
|
||||
bool dec = false;
|
||||
proc->gNB_id = 0; //FIXME
|
||||
@@ -524,7 +524,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
int32_t pdcch_est_size = ((((fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH))+15)/16)*16);
|
||||
__attribute__ ((aligned(16))) int32_t pdcch_dl_ch_estimates[4*fp->nb_antennas_rx][pdcch_est_size];
|
||||
|
||||
for(int n_ss = 0; n_ss<phy_pdcch_config->nb_search_space; n_ss++) {
|
||||
for(int n_ss = 0; n_ss < phy_pdcch_config->nb_search_space; n_ss++) {
|
||||
proc->nr_slot_rx = phy_pdcch_config->slot; // setting PDCCH slot to proc
|
||||
uint8_t nb_symb_pdcch = phy_pdcch_config->pdcch_config[n_ss].coreset.duration;
|
||||
int start_symb = phy_pdcch_config->pdcch_config[n_ss].coreset.StartSymbolIndex;
|
||||
|
||||
@@ -520,7 +520,7 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, phy_data);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, ue, NULL, NULL, number_pdus, proc, NULL, NULL);
|
||||
if (ue->if_inst && ue->if_inst->dl_indication)
|
||||
ue->if_inst->dl_indication(&dl_indication, NULL);
|
||||
ue->if_inst->dl_indication(&dl_indication);
|
||||
return(decoderState);
|
||||
}
|
||||
// printf("polar decoder output 0x%08x\n",pbch_a_prime);
|
||||
@@ -591,7 +591,7 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, ue, NULL, NULL, number_pdus, proc, (void *)result, NULL);
|
||||
|
||||
if (ue->if_inst && ue->if_inst->dl_indication)
|
||||
ue->if_inst->dl_indication(&dl_indication, NULL);
|
||||
ue->if_inst->dl_indication(&dl_indication);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -358,18 +358,6 @@ typedef struct UE_NR_SCAN_INFO_s {
|
||||
int32_t freq_offset_Hz[3][10];
|
||||
} UE_NR_SCAN_INFO_t;
|
||||
|
||||
typedef struct NR_UL_TIME_ALIGNMENT {
|
||||
/// flag used by MAC to inform PHY about a TA to be applied
|
||||
unsigned char apply_ta;
|
||||
/// frame and slot when to apply the TA as stated in TS 38.213 setion 4.2
|
||||
int16_t ta_frame;
|
||||
char ta_slot;
|
||||
/// TA command and TAGID received from the gNB
|
||||
uint16_t ta_command;
|
||||
uint32_t ta_total;
|
||||
uint8_t tag_id;
|
||||
} NR_UL_TIME_ALIGNMENT_t;
|
||||
|
||||
/// Top-level PHY Data Structure for UE
|
||||
typedef struct {
|
||||
/// \brief Module ID indicator for this instance
|
||||
@@ -519,7 +507,6 @@ typedef struct {
|
||||
int dlsch_mcch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
int dlsch_mtch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
int current_dlsch_cqi[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
unsigned char first_run_timing_advance[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
uint8_t decode_SIB;
|
||||
uint8_t decode_MIB;
|
||||
uint8_t init_sync_frame;
|
||||
@@ -533,9 +520,11 @@ typedef struct {
|
||||
|
||||
/// Timing Advance updates variables
|
||||
/// Timing advance update computed from the TA command signalled from gNB
|
||||
int timing_advance;
|
||||
int N_TA_offset; ///timing offset used in TDD
|
||||
NR_UL_TIME_ALIGNMENT_t ul_time_alignment[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
int timing_advance;
|
||||
int N_TA_offset; ///timing offset used in TDD
|
||||
int ta_frame;
|
||||
int ta_slot;
|
||||
int ta_command;
|
||||
|
||||
/// Flag to tell if UE is secondary user (cognitive mode)
|
||||
unsigned char is_secondary_ue;
|
||||
@@ -546,9 +535,6 @@ typedef struct {
|
||||
/// holds the maximum channel/precoder coefficient
|
||||
char log2_maxp;
|
||||
|
||||
/// if ==0 enables phy only test mode
|
||||
int mac_enabled;
|
||||
|
||||
/// Flag to initialize averaging of PHY measurements
|
||||
int init_averaging;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user