From 23e6341237d81044db1e585672b5b710669d7a91 Mon Sep 17 00:00:00 2001 From: Arash Sahbafard Date: Tue, 17 May 2022 23:48:31 +0200 Subject: [PATCH] Logs: initial TA and color != 31, various others --- executables/nr-ru.c | 5 +++-- openair1/PHY/INIT/nr_parms.c | 6 ++++-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 6 +++++- targets/ARCH/rfsimulator/simulator.c | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index baff757312..8bbaddc095 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -844,12 +844,13 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) { cfg->tx_gain[i] = ru->att_tx; cfg->rx_gain[i] = ru->max_rxgain-ru->att_rx; cfg->configFilename = rf_config_file; - LOG_I(PHY, "Channel %d: setting tx_gain offset %.0f, rx_gain offset %.0f, tx_freq %.0f Hz, rx_freq %.0f Hz, tune_offset %.0f Hz\n", + LOG_I(PHY, "Channel %d: setting tx_gain offset %.0f, rx_gain offset %.0f, tx_freq %.0f Hz, rx_freq %.0f Hz, tune_offset %.0f Hz, sample_rate %.0f Hz\n", i, cfg->tx_gain[i], cfg->rx_gain[i], cfg->tx_freq[i], cfg->rx_freq[i], - cfg->tune_offset); + cfg->tune_offset, + cfg->sample_rate); } } diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index 458c8b3403..2b85c93480 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -193,8 +193,8 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL) fp->first_carrier_offset = fp->ofdm_symbol_size - (N_RB_DL * 12 / 2); fp->nb_prefix_samples = fp->ofdm_symbol_size / 128 * 9; fp->nb_prefix_samples0 = fp->ofdm_symbol_size / 128 * (9 + (1 << mu)); - LOG_I(PHY,"Init: N_RB_DL %d, first_carrier_offset %d, nb_prefix_samples %d,nb_prefix_samples0 %d\n", - N_RB_DL,fp->first_carrier_offset,fp->nb_prefix_samples,fp->nb_prefix_samples0); + LOG_W(PHY,"Init: N_RB_DL %d, first_carrier_offset %d, nb_prefix_samples %d,nb_prefix_samples0 %d, ofdm_symbol_size %d\n", + N_RB_DL,fp->first_carrier_offset,fp->nb_prefix_samples,fp->nb_prefix_samples0, fp->ofdm_symbol_size); } uint32_t get_samples_per_slot(int slot, NR_DL_FRAME_PARMS* fp) @@ -417,6 +417,8 @@ void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink frame_parms->get_samples_slot_timestamp = &get_samples_slot_timestamp; frame_parms->samples_per_frame = 10 * frame_parms->samples_per_subframe; + LOG_W(PHY, "samples_per_subframe %d/per second %d, wCP %d\n", frame_parms->samples_per_subframe, 1000*frame_parms->samples_per_subframe, frame_parms->samples_per_subframe_wCP); + } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 63dd78f4f0..c820968a15 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -3724,7 +3724,10 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, #endif */ - LOG_I(NR_MAC, "[%d.%d] Received TA_COMMAND %u TAGID %u CC_id %d\n", frameP, slot, ul_time_alignment->ta_command, ul_time_alignment->tag_id, CC_id); + if (ta == 31) + LOG_D(NR_MAC, "[%d.%d] Received TA_COMMAND %u TAGID %u CC_id %d TA total %d\n", frameP, slot, ta, tag, CC_id, ul_time_alignment->ta_total); + else + LOG_I(NR_MAC, "[%d.%d] Received TA_COMMAND %u TAGID %u CC_id %d TA total %d\n", frameP, slot, ta, tag, CC_id, ul_time_alignment->ta_total); break; case DL_SCH_LCID_CON_RES_ID: @@ -4100,6 +4103,7 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t const int ta = rar->TA2 + (rar->TA1 << 5); ul_time_alignment->ta_command = 31 + ta; ul_time_alignment->ta_total = ta; + LOG_W(MAC, "received TA command %d\n", ul_time_alignment->ta_command); #ifdef DEBUG_RAR // CSI diff --git a/targets/ARCH/rfsimulator/simulator.c b/targets/ARCH/rfsimulator/simulator.c index 682c7cf220..b26fd5f6c6 100644 --- a/targets/ARCH/rfsimulator/simulator.c +++ b/targets/ARCH/rfsimulator/simulator.c @@ -936,6 +936,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { rfsimulator->sample_rate=openair0_cfg->sample_rate; rfsimulator->tx_bw=openair0_cfg->tx_bw; rfsimulator_readconfig(rfsimulator); + LOG_W(HW, "rfsim: sample_rate %f\n", rfsimulator->sample_rate); pthread_mutex_init(&Sockmutex, NULL); LOG_I(HW,"rfsimulator: running as %s\n", rfsimulator-> typeStamp == ENB_MAGICDL ? "server waiting opposite rfsimulators to connect" : "client: will connect to a rfsimulator server side"); device->trx_start_func = rfsimulator->typeStamp == ENB_MAGICDL ?