Commit a05753df authored by Cedric Roux's avatar Cedric Roux

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).
parent 1e71749c
...@@ -818,7 +818,6 @@ void tx_rf(RU_t *ru) { ...@@ -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)); 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 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 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; int sf_extension = 0;
if ((SF_type == SF_DL) || if ((SF_type == SF_DL) ||
...@@ -831,22 +830,13 @@ void tx_rf(RU_t *ru) { ...@@ -831,22 +830,13 @@ void tx_rf(RU_t *ru) {
flags=3; // end of burst flags=3; // end of burst
} }
if ((fp->frame_type == TDD) && if (fp->frame_type == TDD &&
(SF_type == SF_DL)&& SF_type == SF_DL &&
(prevSF_type == SF_UL) && prevSF_type == SF_UL) {
(nextSF_type == SF_DL)) {
flags = 2; // start of burst flags = 2; // start of burst
sf_extension = ru->sf_extension; 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__) #if defined(__x86_64) || defined(__i386__)
#ifdef __AVX2__ #ifdef __AVX2__
sf_extension = (sf_extension)&0xfffffff8; sf_extension = (sf_extension)&0xfffffff8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment