From 971821a5bb895f0d8209b46f6a8d5bf1b7188fcf Mon Sep 17 00:00:00 2001 From: Francesco Mani Date: Wed, 18 Dec 2019 16:21:14 +0100 Subject: [PATCH] minor fixes --- executables/nr-ru.c | 42 +++++++++++------------ openair1/SCHED_NR/fapi_nr_l1.c | 2 +- openair1/SCHED_NR/nr_ru_procedures.c | 2 -- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 10 +++--- openair2/RRC/NR/nr_rrc_proto.h | 2 ++ openair2/RRC/NR/rrc_gNB_nsa.c | 3 +- 6 files changed, 30 insertions(+), 31 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 824d22ed3f..d58974a500 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -724,31 +724,30 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { int slot_type = nr_slot_select(cfg,frame,slot%((1<ssb_config.scs_common.value)*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)); int prevslot_type = nr_slot_select(cfg,frame,(slot+(((1<ssb_config.scs_common.value)*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)-1))%((1<ssb_config.scs_common.value)*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)); int sf_extension = 0; + int siglen=fp->samples_per_slot; + int flags=1; + //nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame); - if (slot_type == NR_DOWNLINK_SLOT || - slot_type == NR_MIXED_SLOT) { - int siglen=fp->samples_per_slot,flags=1; + if (slot_type == NR_DOWNLINK_SLOT || slot_type == NR_MIXED_SLOT) { - if(slot_type == NR_MIXED_SLOT) { - txsymb = 0; - for(int symbol_count =0;symbol_counttdd_table.max_tdd_periodicity_list[slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value==0) { - txsymb++; - } - } - AssertFatal(txsymb>0,"illegal txsymb %d\n",txsymb); - siglen = (fp->ofdm_symbol_size + fp->nb_prefix_samples0) - + (txsymb - 1) * (fp->ofdm_symbol_size + fp->nb_prefix_samples); + if(slot_type == NR_MIXED_SLOT) { + txsymb = 0; + for(int symbol_count =0;symbol_counttdd_table.max_tdd_periodicity_list[slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value==0) + txsymb++; + } + AssertFatal(txsymb>0,"illegal txsymb %d\n",txsymb); + siglen = (fp->ofdm_symbol_size + fp->nb_prefix_samples0) + (txsymb - 1) * (fp->ofdm_symbol_size + fp->nb_prefix_samples); //+ ru->end_of_burst_delay; - flags=3; // end of burst - } + flags=3; // end of burst + } - if (cfg->cell_config.frame_duplex_type.value == TDD && - slot_type == NR_DOWNLINK_SLOT && - prevslot_type == NR_UPLINK_SLOT) { - flags = 2; // start of burst - //sf_extension = ru->sf_extension; - } + if (cfg->cell_config.frame_duplex_type.value == TDD && + slot_type == NR_DOWNLINK_SLOT && + prevslot_type == NR_UPLINK_SLOT) + + flags = 2; // start of burst + //sf_extension = ru->sf_extension; /*if ((slot == 0) || (slot == 1)) { @@ -785,7 +784,6 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, slot ); - for (i=0; inb_tx; i++) txp[i] = (void *)&ru->common.txdata[i][(slot*fp->samples_per_slot)-sf_extension]; diff --git a/openair1/SCHED_NR/fapi_nr_l1.c b/openair1/SCHED_NR/fapi_nr_l1.c index af657e2d33..159d42a5c5 100644 --- a/openair1/SCHED_NR/fapi_nr_l1.c +++ b/openair1/SCHED_NR/fapi_nr_l1.c @@ -151,7 +151,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ if (UL_tti_req != NULL) number_ul_pdu = UL_tti_req->n_pdus; - LOG_I(PHY,"NFAPI: Sched_INFO:SFN/SLOT:%04d%d DL_req:SFN/SLO:%04d%d:dl_pdu:%d tx_req:SFN/SLOT:%04d%d:pdus:%d;\n", + LOG_D(PHY,"NFAPI: Sched_INFO:SFN/SLOT:%04d%d DL_req:SFN/SLO:%04d%d:dl_pdu:%d tx_req:SFN/SLOT:%04d%d:pdus:%d;\n", frame,slot, DL_req->SFN,DL_req->Slot,number_dl_pdu, TX_req->SFN,TX_req->Slot,TX_req->Number_of_PDUs); diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index 663983313d..dd66026035 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -224,9 +224,7 @@ static void *nr_feptx_thread(void *param) { NR_DL_FRAME_PARMS *fp; int ofdm_mask_full; - while (!oai_exit) { - ret = 0; if (wait_on_condition(&feptx->mutex_feptx,&feptx->cond_feptx,&feptx->instance_cnt_feptx,"NR feptx thread")<0) break; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+feptx->index+1 , 1 ); diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index b92df6550f..6b68f08ce5 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -127,18 +127,18 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) { nr_set_ssb_first_subcarrier(cfg, fp); // setting the first subcarrier LOG_D(PHY,"SS TX: frame %d, slot %d, start_symbol %d\n",frame,slot, ssb_start_symbol); - nr_generate_pss(gNB->d_pss, txdataF[0], AMP, ssb_start_symbol, cfg, fp); - nr_generate_sss(gNB->d_sss, txdataF[0], AMP, ssb_start_symbol, cfg, fp); + nr_generate_pss(gNB->d_pss, txdataF[ssb_index], AMP, ssb_start_symbol, cfg, fp); + nr_generate_sss(gNB->d_sss, txdataF[ssb_index], AMP, ssb_start_symbol, cfg, fp); if (fp->Lmax == 4) - nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index],txdataF[0], AMP, ssb_start_symbol, cfg, fp); + nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index],txdataF[ssb_index], AMP, ssb_start_symbol, cfg, fp); else - nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index],txdataF[0], AMP, ssb_start_symbol, cfg, fp); + nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index],txdataF[ssb_index], AMP, ssb_start_symbol, cfg, fp); nr_generate_pbch(&gNB->pbch, &gNB->ssb_pdu, gNB->nr_pbch_interleaver, - txdataF[0], + txdataF[ssb_index], AMP, ssb_start_symbol, n_hf,fp->Lmax, diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index ac3c3cb800..bd13c6cc22 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -83,6 +83,8 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon int n_physical_antenna_ports, int initial_csi_index); +void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig); + int generate_CG_Config(gNB_RRC_INST *rrc, NR_CG_Config_t *cg_Config, NR_RRCReconfiguration_t *reconfig, diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index e4c77a8f00..ea3e33f16d 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -36,6 +36,7 @@ //#include "NR_UE-CapabilityRAT-ContainerList.h" #include "LTE_UE-CapabilityRAT-ContainerList.h" #include "NR_CG-Config.h" +#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc,LTE_UE_CapabilityRAT_ContainerList_t *UE_CapabilityRAT_ContainerList) { @@ -64,7 +65,7 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc,LTE_UE_CapabilityRAT_ContainerL ueCapabilityRAT_Container_nr->size, 0, 0); if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) { - LOG_E(RRC, "Failed to decode UE NR capabilities (%zu bytes) container size %d\n", dec_rval.consumed,ueCapabilityRAT_Container_nr->size); + LOG_E(RRC, "Failed to decode UE NR capabilities (%zu bytes) container size %lu\n", dec_rval.consumed,ueCapabilityRAT_Container_nr->size); ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, ue_context_p->ue_context.UE_Capability_nr); ue_context_p->ue_context.UE_Capability_nr = 0;