From a05753dff38ff20377331b9f8a8e719393ca44bf Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 15 Mar 2019 11:40:59 +0100 Subject: [PATCH] PHY: bugfix: compute start/end of burst correctly for TDD Start of burst is to start TDD DL transmission in the driver (tested with USRP for the moment). End of burst is to stop DL transmission. Start of burst can only happen for a DL subframe when the previous subframe was an UL subframe. End of burst can only happen for an S subframe. It's impossible for a subframe to be both the start of a burst and the end of a burst. This can be checked with eg. http://niviuk.free.fr/lte_resource_grid.html (or reading the specs). --- targets/RT/USER/lte-ru.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 5a16a2ab7a..cedd0be270 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -818,7 +818,6 @@ void tx_rf(RU_t *ru) { T_INT(0), T_BUFFER(&ru->common.txdata[0][proc->subframe_tx * fp->samples_per_tti], fp->samples_per_tti * 4)); lte_subframe_t SF_type = subframe_select(fp,proc->subframe_tx%10); lte_subframe_t prevSF_type = subframe_select(fp,(proc->subframe_tx+9)%10); - lte_subframe_t nextSF_type = subframe_select(fp,(proc->subframe_tx+1)%10); int sf_extension = 0; if ((SF_type == SF_DL) || @@ -831,22 +830,13 @@ void tx_rf(RU_t *ru) { flags=3; // end of burst } - if ((fp->frame_type == TDD) && - (SF_type == SF_DL)&& - (prevSF_type == SF_UL) && - (nextSF_type == SF_DL)) { + if (fp->frame_type == TDD && + SF_type == SF_DL && + prevSF_type == SF_UL) { flags = 2; // start of burst sf_extension = ru->sf_extension; } - if ((fp->frame_type == TDD) && - (SF_type == SF_DL)&& - (prevSF_type == SF_UL) && - (nextSF_type == SF_UL)) { - flags = 4; // start of burst and end of burst (only one DL SF between two UL) - sf_extension = ru->sf_extension; - } - #if defined(__x86_64) || defined(__i386__) #ifdef __AVX2__ sf_extension = (sf_extension)&0xfffffff8;