From d12a824433e11c082f2bfb0af747e38464e529ee Mon Sep 17 00:00:00 2001 From: Khalid Ahmed Date: Thu, 25 Jul 2019 15:22:47 +0200 Subject: [PATCH] TDD in rfsimulator --- executables/nr-gnb.c | 4 +++- executables/nr-ru.c | 7 ++++++- executables/nr-ue.c | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 5151f0cf82..f96c6f27a9 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -191,7 +191,9 @@ static inline int rxtx(PHY_VARS_gNB *gNB,int frame_rx, int slot_rx, int frame_tx } // UE-specific RX processing for subframe n - if (nfapi_mode == 0 || nfapi_mode == 1) */ { + if (nfapi_mode == 0 || nfapi_mode == 1) */ + + if (slot_rx == NR_UPLINK_SLOT || gNB->frame_parms.frame_type == FDD) { nfapi_nr_ul_config_ulsch_pdu_rel15_t *ulsch_pdu_rel15 = &gNB->ulsch[1][0]->harq_processes[0]->ulsch_pdu.ulsch_pdu_rel15; phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx, ulsch_pdu_rel15->start_symbol, ulsch_pdu_rel15->start_symbol + ulsch_pdu_rel15->number_symbols); } diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 807495f0b4..18fa3582ef 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1471,7 +1471,12 @@ static void *ru_thread( void *param ) { if (ru->idx!=0) proc->frame_tx = (proc->frame_tx+proc->frame_offset)&1023; // do RX front-end processing (frequency-shift, dft) if needed - if (ru->feprx) ru->feprx(ru,proc->tti_rx); + + if (proc->tti_rx == NR_UPLINK_SLOT || fp->frame_type == FDD) { + + if (ru->feprx) ru->feprx(ru,proc->tti_rx); + + } LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx); LOG_D(PHY,"Copying rxdataF from RU to gNB\n"); diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 4770f2dc15..29e9bb3c23 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -432,12 +432,13 @@ void UE_processing(void *arg) { (UE->frame_parms.frame_type == FDD) ) #endif */ - //if (proc->nr_tti_tx == NR_UPLINK_SLOT){ + + if (proc->nr_tti_tx == NR_UPLINK_SLOT || UE->frame_parms.frame_type == FDD){ if (UE->mode != loop_through_memory) phy_procedures_nrUE_TX(UE,proc,0,0); - //} + } //phy_procedures_UE_TX(UE,proc,0,0,UE->mode,no_relay);