From a4bdaddaaf18e98019880f3e0ce4a4958f5fb8da Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 23 Nov 2016 14:05:36 +0800 Subject: [PATCH 1/2] commit from other machine prior to merge --- targets/RT/USER/lte-enb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 5024154f40..6af84b605d 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -761,13 +761,11 @@ void fh_if4p5_asynch_DL(PHY_VARS_eNB *eNB,int *frame,int *subframe) { else { if (frame_tx != *frame) { LOG_E(PHY,"fh_if4p5_asynch_DL: frame_tx %d is not what we expect %d\n",frame_tx,*frame); - *frame = frame_tx; - // exit_fun("Exiting"); + exit_fun("Exiting"); } if (subframe_tx != *subframe) { LOG_E(PHY,"fh_if4p5_asynch_DL: subframe_tx %d is not what we expect %d\n",subframe_tx,*subframe); - *subframe = subframe_tx; - // exit_fun("Exiting"); + exit_fun("Exiting"); } } if (packet_type == IF4p5_PDLFFT) { From 8bc94223b411e6b0a9426691cf4ced2581f79bc4 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 24 Nov 2016 15:55:00 +0800 Subject: [PATCH 2/2] remove debugging traces from lte-enb.c and if4_tools.c. modulo 1024 bug on frame counter in lte-enb.c --- openair1/PHY/LTE_TRANSPORT/if4_tools.c | 6 +++--- targets/RT/USER/lte-enb.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c index 4ecdd6688d..97f3cd9ae9 100755 --- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c @@ -119,7 +119,7 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type gen_IF4p5_ul_header(packet_header, frame, subframe); for (symbol_id=0; symbol_idsymbols_per_tti; symbol_id++) { - LOG_I(PHY,"IF4p5_PULFFT: frame %d, subframe %d, symbol %d\n",frame,subframe,symbol_id); + LOG_D(PHY,"IF4p5_PULFFT: frame %d, subframe %d, symbol %d\n",frame,subframe,symbol_id); for (element_id=0; element_idflags == ETH_RAW_IF4p5_MODE) { packet_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES); @@ -234,7 +234,7 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t if (*packet_type == IF4p5_PDLFFT) { *symbol_number = ((packet_header->frame_status)>>26)&0x000f; - LOG_I(PHY,"DL_IF4p5: CC_id %d : frame %d, subframe %d, symbol %d\n",eNB->CC_id,*frame,*subframe,*symbol_number); + LOG_D(PHY,"DL_IF4p5: CC_id %d : frame %d, subframe %d, symbol %d\n",eNB->CC_id,*frame,*subframe,*symbol_number); slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size) + (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1; blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1; diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 97c877c8ea..eadff1ffe3 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -908,9 +908,9 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) { } proc->frame_rx = ((proc->timestamp_rx-eNB->ts_offset) / (fp->samples_per_tti*10))&1023; proc->subframe_rx = ((proc->timestamp_rx-eNB->ts_offset) / fp->samples_per_tti)%10; - proc->frame_rx = (proc->frame_rx+proc->frame_offset)%1023; + proc->frame_rx = (proc->frame_rx+proc->frame_offset)&1023; proc->frame_tx = proc->frame_rx; - if (proc->subframe_rx > 5) proc->frame_tx=(proc->frame_tx+1)%1023; + if (proc->subframe_rx > 5) proc->frame_tx=(proc->frame_tx+1)&1023; // synchronize first reception to frame 0 subframe 0 proc->timestamp_tx = proc->timestamp_rx+(4*fp->samples_per_tti); @@ -921,9 +921,9 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) { LOG_E(PHY,"rx_rf: Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->timestamp_rx,proc->subframe_rx,*subframe); exit_fun("Exiting"); } - int f2 = *frame+proc->frame_offset; + int f2 = (*frame+proc->frame_offset)&1023; if (proc->frame_rx != f2) { - LOG_E(PHY,"rx_rf: Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->timestamp_rx,proc->frame_rx,*frame); + LOG_E(PHY,"rx_rf: Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d, frame_offset %d, f2 %d)\n",proc->timestamp_rx,proc->frame_rx,*frame,proc->frame_offset,f2); exit_fun("Exiting"); } } else {