From b61a80baf1a7ef443d66393f723bc52eedf0ae52 Mon Sep 17 00:00:00 2001 From: Francesco Mani Date: Fri, 6 Dec 2019 12:48:44 +0100 Subject: [PATCH] fix on ru procedures for slot select --- executables/nr-ru.c | 3 +-- openair1/PHY/impl_defs_nr.h | 1 + openair1/SCHED_NR/nr_ru_procedures.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index dce556f599..c73142cd46 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -532,7 +532,7 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *slot) { if (((nr_slot_select(ru->nr_frame_parms,frame_tx,slot_tx) & NR_DOWNLINK_SLOT) > 0) && (symbol_number == 0)) start_meas(&ru->rx_fhaul); - LOG_D(PHY,"subframe %d (%d): frame %d, subframe %d, symbol %d\n", + LOG_D(PHY,"slot %d (%d): frame %d, slot %d, symbol %d\n", *slot,nr_slot_select(ru->nr_frame_parms,frame_tx,*slot),frame_tx,slot_tx,symbol_number); if (proc->first_tx != 0) { @@ -724,7 +724,6 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { int slot_type = nr_slot_select(ru->nr_frame_parms,frame,slot%fp->slots_per_frame); int sf_extension = 0; - //nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame); if ((slot == 0) || (slot == 1) || IS_SOFTMODEM_RFSIM ) { diff --git a/openair1/PHY/impl_defs_nr.h b/openair1/PHY/impl_defs_nr.h index 7b648515f5..6a5cf76f98 100644 --- a/openair1/PHY/impl_defs_nr.h +++ b/openair1/PHY/impl_defs_nr.h @@ -97,6 +97,7 @@ SystemInformationBlockType1_nr_t; #define NR_DOWNLINK_SLOT (0x01) #define NR_UPLINK_SLOT (0x02) +#define NR_MIXED_SLOT (0x03) #define FRAME_DURATION_MICRO_SEC (10000) /* frame duration in microsecond */ diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index 3e24dc2f58..3ebef0f227 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -131,7 +131,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 1 ); - if (nr_slot_select(fp,frame_tx,slot)==SF_DL) { + if (nr_slot_select(fp,frame_tx,slot)==NR_DOWNLINK_SLOT) { // If this is not an S-tti if (pthread_mutex_timedlock(&proc->mutex_feptx,&wait) != 0) { printf("[RU] ERROR pthread_mutex_lock for feptx thread (IC %d)\n", proc->instance_cnt_feptx); @@ -230,8 +230,8 @@ void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx) { memcpy((void*)ru->common.txdataF_BF[aa], (void*)ru->gNB_list[0]->common_vars.txdataF[aa], fp->samples_per_slot_wCP*sizeof(int32_t)); - if ((nr_slot_select(fp,frame_tx,slot)==SF_DL)|| - ((nr_slot_select(fp,frame_tx,slot)==SF_S))) { + if ((nr_slot_select(fp,frame_tx,slot)==NR_DOWNLINK_SLOT)|| + ((nr_slot_select(fp,frame_tx,slot)==NR_MIXED_SLOT))) { // LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot); nr_feptx0(ru,slot,0,fp->symbols_per_slot);