Commit 79b6e1d8 authored by Raymond Knopp's avatar Raymond Knopp

PSS detection

parent 16526c7c
......@@ -346,7 +346,9 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
uint8_t pa,
uint8_t threequarter_fs,
uint8_t osf,
uint32_t perfect_ce);
uint32_t perfect_ce,
uint8_t sidelink_active,
uint8_t SLonly);
#if defined(Rel10) || defined(Rel14)
......
This diff is collapsed.
......@@ -51,7 +51,9 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
uint8_t pa,
uint8_t threequarter_fs,
uint8_t osf,
uint32_t perfect_ce)
uint32_t perfect_ce,
uint8_t sidelink_active,
uint8_t SLonly)
{
LTE_DL_FRAME_PARMS *frame_parms;
......@@ -143,6 +145,9 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
UE->measurements.adj_cell_id[1] = Nid_cell+2;
for (i=0; i<3; i++)
lte_gold(frame_parms,UE->lte_gold_table[i],Nid_cell+i);
UE->sidelink_active = sidelink_active;
UE->SLonly = SLonly;
printf("Calling init_lte_ue_signal\n");
init_lte_ue_signal(UE,1,0);
generate_pcfich_reg_mapping(&UE->frame_parms);
......
......@@ -62,6 +62,10 @@ int lte_sync_time(int **rxdata,
LTE_DL_FRAME_PARMS *frame_parms,
int *eNB_id);
int lte_sync_timeSL(PHY_VARS_UE *ue,
int *ind,
int64_t *lev,
int64_t *avg);
/*!
\brief This function performs the coarse frequency and PSS synchronization.
The algorithm uses a frequency-domain correlation. It scans over 20 MHz/10ms signal chunks using each of the 3 PSS finding the most likely (strongest) carriers and their frequency offset (+-2.5 kHz).
......
This diff is collapsed.
......@@ -84,7 +84,9 @@ int generate_slbch(int32_t **txdataF,
for (symb=0;symb<10;symb++) {
k = (frame_parms->ofdm_symbol_size<<1)-72;
txptr = (int16_t*)&txdataF[0][subframe*Nsymb*frame_parms->ofdm_symbol_size+(symb*frame_parms->ofdm_symbol_size)];
printf("Generating PSBCH in symbol %d offset %d\n",symb,
(subframe*Nsymb*frame_parms->ofdm_symbol_size)+(symb*frame_parms->ofdm_symbol_size));
txptr = (int16_t*)&txdataF[0][(subframe*Nsymb*frame_parms->ofdm_symbol_size)+(symb*frame_parms->ofdm_symbol_size)];
// first half (negative frequencies)
for (int i=0;i<72;i++) {
if (*eptr++ == 1) txptr[k] =-a;
......
......@@ -470,12 +470,13 @@ void sldch_codingmodulation(PHY_VARS_UE *ue,int frame_tx,int subframe_tx,int npr
tx_amp = AMP;
#endif
for (int aa=0; aa<ue->frame_parms.nb_antennas_tx; aa++) {
memset(&ue->common_vars.txdataF[aa][subframe_tx*ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti],
0,
ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti*sizeof(int32_t));
}
if (ue->generate_ul_signal[subframe_tx][0] == 0)
for (int aa=0; aa<ue->frame_parms.nb_antennas_tx; aa++) {
memset(&ue->common_vars.txdataF[aa][subframe_tx*ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti],
0,
ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti*sizeof(int32_t));
}
ulsch_modulation(ue->common_vars.txdataF,
tx_amp,
frame_tx,
......
......@@ -455,11 +455,12 @@ void pscch_codingmodulation(PHY_VARS_UE *ue,int frame_tx,int subframe_tx,uint32_
int32_t *txptr;
for (int aa=0; aa<ue->frame_parms.nb_antennas_tx; aa++) {
memset(&ue->common_vars.txdataF[aa][subframe_tx*ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti],
0,
ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti*sizeof(int32_t));
}
if (ue->generate_ul_signal[subframe_tx][0] == 0)
for (int aa=0; aa<ue->frame_parms.nb_antennas_tx; aa++) {
memset(&ue->common_vars.txdataF[aa][subframe_tx*ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti],
0,
ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti*sizeof(int32_t));
}
for (int j=0,l=0; l<Nsymb2; l++) {
re_offset = re_offset0;
......@@ -591,11 +592,12 @@ void slsch_codingmodulation(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_tx,in
tx_amp = AMP;
#endif
for (int aa=0; aa<ue->frame_parms.nb_antennas_tx; aa++) {
memset(&ue->common_vars.txdataF[aa][subframe_tx*ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti],
0,
ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti*sizeof(int32_t));
}
if (ue->generate_ul_signal[subframe_tx][0] == 0)
for (int aa=0; aa<ue->frame_parms.nb_antennas_tx; aa++) {
memset(&ue->common_vars.txdataF[aa][subframe_tx*ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti],
0,
ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti*sizeof(int32_t));
}
ulsch_modulation(ue->common_vars.txdataF,
tx_amp,
......
......@@ -43,6 +43,8 @@ void check_and_generate_slss(PHY_VARS_UE *ue,int frame_tx,int subframe_tx) {
int tx_amp;
AssertFatal(slss!=NULL,"slss is null\n");
LOG_I(PHY,"check_and_generate_slss: frame_tx %d, subframe_tx %d : slss->SL_offsetIndicator %d, slss->slmib_length %d\n",
frame_tx,subframe_tx,slss->SL_OffsetIndicator, slss->slmib_length);
......@@ -66,33 +68,37 @@ void check_and_generate_slss(PHY_VARS_UE *ue,int frame_tx,int subframe_tx) {
tx_amp = AMP;
#endif
for (int aa=0; aa<ue->frame_parms.nb_antennas_tx; aa++) {
memset(&ue->common_vars.txdataF[aa][subframe_tx*ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti],
0,
ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti*sizeof(int32_t));
}
if (ue->generate_ul_signal[subframe_tx][0] == 0)
for (int aa=0; aa<ue->frame_parms.nb_antennas_tx; aa++) {
memset(&ue->common_vars.txdataF[aa][subframe_tx*ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti],
0,
ue->frame_parms.ofdm_symbol_size*ue->frame_parms.symbols_per_tti*sizeof(int32_t));
}
// PSS
generate_slpss(ue->common_vars.txdataF,
tx_amp,
&ue->frame_parms,
1,
subframe_tx
);
);
generate_slpss(ue->common_vars.txdataF,
tx_amp,
&ue->frame_parms,
2,
subframe_tx
);
/*
generate_slbch(ue->common_vars.txdataF,
tx_amp,
&ue->frame_parms,
subframe_tx,
ue->slss->slmib);
*/
generate_slsss(ue->common_vars.txdataF,
subframe_tx,
tx_amp,
......@@ -104,8 +110,9 @@ void check_and_generate_slss(PHY_VARS_UE *ue,int frame_tx,int subframe_tx) {
&ue->frame_parms,
12);
ue->sl_chan = PSBCH;
ue->sl_chan = PSBCH;
generate_drs_pusch(ue,
NULL,
0,
......@@ -117,8 +124,10 @@ void check_and_generate_slss(PHY_VARS_UE *ue,int frame_tx,int subframe_tx) {
NULL,
0);
ue->generate_ul_signal[subframe_tx][0] = 1;
ue->slss_generated = 1;
LOG_D(PHY,"ULSCH (after slss) : signal F energy %d dB (txdataF %p)\n",dB_fixed(signal_energy(&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size],14*ue->frame_parms.ofdm_symbol_size)),&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size]);
// write_output("txdataF_pre.m","txF_pre",&ue->common_vars.txdataF[0][subframe_tx*14*ue->frame_parms.ofdm_symbol_size],14*ue->frame_parms.ofdm_symbol_size,1,1);
......
......@@ -307,26 +307,30 @@ int rx_slsss(PHY_VARS_UE *ue,int32_t *tot_metric,uint8_t *phase_max,int Nid2,int
#endif
// Do FFTs for SSS/PSS
// SSS
LOG_I(PHY,"Doing SSS detection at offset %d\n",ue->rx_offsetSL);
RU_t ru_tmp;
memset((void*)&ru_tmp,0,sizeof(RU_t));
memcpy((void*)&ru_tmp.frame_parms,(void*)&ue->frame_parms,sizeof(LTE_DL_FRAME_PARMS));
ru_tmp.N_TA_offset=0;
ru_tmp.common.rxdata = ue->common_vars.rxdata;
ru_tmp.common.rxdata_7_5kHz = (int32_t**)rxdata_7_5kHz;
ru_tmp.common.rxdata_7_5kHz = (int32_t**)malloc16(ue->frame_parms.nb_antennas_rx*sizeof(int32_t*));
for (int aa=0;aa<ue->frame_parms.nb_antennas_rx;aa++)
ru_tmp.common.rxdata_7_5kHz[aa] = (int32_t*)&rxdata_7_5kHz[aa][ue->rx_offsetSL*2];
ru_tmp.common.rxdataF = (int32_t**)rxdataF;
ru_tmp.nb_rx = ue->frame_parms.nb_antennas_rx;
remove_7_5_kHz(&ru_tmp,(subframe_rx<<1));
remove_7_5_kHz(&ru_tmp,(subframe_rx<<1)+1);
// remove_7_5_kHz(&ru_tmp,(subframe_rx<<1));
// remove_7_5_kHz(&ru_tmp,(subframe_rx<<1)+1);
// PSS
slot_fep_ul(&ru_tmp,1,0,0);
slot_fep_ul(&ru_tmp,2,0,0);
// SSS
slot_fep_ul(&ru_tmp,11,1,0);
slot_fep_ul(&ru_tmp,12,1,0);
slot_fep_ul(&ru_tmp,4,1,0);
slot_fep_ul(&ru_tmp,5,1,0);
free(ru_tmp.common.rxdata_7_5kHz);
} else { // TDD
AssertFatal(1==0,"TDD not supported for Sidelink\n");
}
......@@ -337,12 +341,12 @@ int rx_slsss(PHY_VARS_UE *ue,int32_t *tot_metric,uint8_t *phase_max,int Nid2,int
pss1_ext,
sss1_ext,
0);
/*
write_output("rxsig0.m","rxs0",&ue->common_vars.rxdata[0][0],ue->frame_parms.samples_per_tti,1,1);
write_output("rxdataF0.m","rxF0",&ue->common_vars.rxdataF[0][0],2*14*ue->frame_parms.ofdm_symbol_size,2,1);
write_output("pss_ext0.m","pssext0",pss_ext,72,1,1);
write_output("rxdataF0.m","rxF0",&rxdataF[0][0],2*14*ue->frame_parms.ofdm_symbol_size,1,1);
write_output("pss_ext0.m","pssext0",pss0_ext,72,1,1);
write_output("sss0_ext0.m","sss0ext0",sss0_ext,72,1,1);
*/
exit(-1);
// get conjugated channel estimate from PSS (symbol 6), H* = R* \cdot PSS
// and do channel estimation and compensation based on PSS
......
......@@ -1414,6 +1414,7 @@ typedef struct {
uint8_t destination_id;
// DMRS group-hopping sequences for PSBCH (index 0) and 256 possible PSSCH (indices 1...256)
uint32_t gh[257][20];
uint8_t slss_generated;
uint8_t pscch_coded;
uint8_t pscch_generated;
uint8_t pssch_generated;
......
......@@ -63,6 +63,8 @@ extern unsigned char primary_synch2_tab[72];
extern const int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
extern const int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
extern const int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
extern const int16_t *primary_synch0SL_time;
extern const int16_t *primary_synch1SL_time;
extern int *sync_corr_ue0; //!< index [0..10*samples_per_tti[
extern int *sync_corr_ue1; //!< index [0..10*samples_per_tti[
extern int *sync_corr_ue2; //!< index [0..10*samples_per_tti[
......
......@@ -977,7 +977,11 @@ typedef struct {
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES+2048[
int32_t **rxdata;
/// \brief holds the received data vector used for SL primary synchronization (40ms)
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: sample [0..4*FRAME_LENGTH_COMPLEX_SAMPLES+2048[
int16_t **rxdata_syncSL;
LTE_UE_COMMON_PER_THREAD common_vars_rx_data_per_thread[RX_NB_TH_MAX];
/// holds output of the sync correlator
......
......@@ -37,10 +37,10 @@ const int16_t *primary_synch0_time;
const int16_t *primary_synch1_time;
const int16_t *primary_synch2_time;
#ifdef Rel14
const int16_t *primary_synch0SL_time;
const int16_t *primary_synch1SL_time;
#endif
#include "PHY/CODING/vars.h"
......
......@@ -2369,6 +2369,9 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
}
}
ue->slss_generated=0;
// check for SLBCH/SLSS
AssertFatal(0==pthread_mutex_lock(&ue->slss_mutex),"");
if ((ue->slss = ue_get_slss(ue->Mod_id,ue->CC_id,frame_tx,subframe_tx)) != NULL) check_and_generate_slss(ue,frame_tx,subframe_tx);
......
......@@ -63,6 +63,8 @@ int main(int argc, char **argv) {
int log_level = LOG_INFO;
SLSCH_t slsch;
SLDCH_t sldch;
SLSS_t slss;
SCM_t channel_model=AWGN;
UE_rxtx_proc_t proc;
double snr0 = 35;
......@@ -74,8 +76,12 @@ int main(int argc, char **argv) {
int nb_rb=20;
char channel_model_input[20];
int pscch_errors=0;
int do_SLSS=0;
int index;
int64_t psslevel;
int64_t avglevel;
AssertFatal(load_configmodule(argc,argv) != NULL,
"cannot load configuration module, exiting\n");
logInit();
......@@ -86,7 +92,7 @@ int main(int argc, char **argv) {
char c;
while ((c = getopt (argc, argv, "hf:m:n:g:r:z:w:s:")) != -1) {
while ((c = getopt (argc, argv, "hf:m:n:g:r:z:w:s:S")) != -1) {
switch (c) {
case 'f':
snr_step= atof(optarg);
......@@ -179,6 +185,10 @@ int main(int argc, char **argv) {
}
break;
case 'S':
do_SLSS=1;
break;
case 'h':
default:
printf("%s -h(elp) -a(wgn on) -m mcs -n n_frames -s snr0 -z RXant \n",argv[0]);
......@@ -191,6 +201,7 @@ int main(int argc, char **argv) {
printf("-r number of resource blocks\n");
printf("-g [A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')\n");
printf("-z Number of RX antennas used in UE\n");
printf("-S Run SL synchronization procedures\n");
exit(1);
break;
}
......@@ -212,7 +223,9 @@ int main(int argc, char **argv) {
0, //pa
0, //threequart_fs
1, //osf
0); //perfect_ce
0, //perfect_ce
1, //sidelink_active
1); //SLonly
UE2UE[0][0][0] = new_channel_desc_scm(UE->frame_parms.nb_antennas_tx,
UE->frame_parms.nb_antennas_rx,
......@@ -229,8 +242,11 @@ int main(int argc, char **argv) {
PHY_vars_UE_g[0] = (PHY_VARS_UE**) malloc(sizeof(PHY_VARS_UE*));
PHY_vars_UE_g[0][0] = UE;
init_lte_ue_transport(UE,0);
if (do_SLSS==1) lte_sync_time_init(&UE->frame_parms);
UE->rx_total_gain_dB = 120.0;
UE->rx_offset = 0;
UE->timing_advance = 0;
......@@ -238,6 +254,8 @@ int main(int argc, char **argv) {
UE->hw_timing_advance = 0;
UE->slsch = &slsch;
UE->sldch = &sldch;
UE->slss = &slss;
// SLSCH/CCH Configuration
slsch.N_SL_RB_data = 20;
slsch.prb_Start_data = 5;
......@@ -253,7 +271,7 @@ int main(int argc, char **argv) {
slsch.SL_SC_Period = 320;
slsch.bitmap1 = 0xffffffffff;
// SCI Paramters and Payload
slsch.n_pscch = 1111;
slsch.n_pscch = 13;
slsch.format = 0;
slsch.freq_hopping_flag = 0;
slsch.resource_block_coding = 127;
......@@ -290,6 +308,19 @@ int main(int argc, char **argv) {
sldch.bitmap1 = 0xffff;
sldch.bitmap_length = 16;
sldch.payload_length = 256;
memset((void*)&slss,0,sizeof(slss));
if (do_SLSS == 1) {
slss.SL_OffsetIndicator = 0;
slss.slss_id = 169;
slss.slmib_length = 5;
slss.slmib[0] = 0;
slss.slmib[1] = 1;
slss.slmib[2] = 2;
slss.slmib[3] = 3;
slss.slmib[4] = 4;
}
// copy sidelink parameters, PSCCH and PSSCH payloads will get overwritten
memcpy((void*)&UE->slsch_rx,(void*)UE->slsch,sizeof(SLSCH_t));
......@@ -312,7 +343,9 @@ int main(int argc, char **argv) {
UE->pscch_coded=0;
UE->pscch_generated=0;
UE->psdch_generated=0;
for (int absSF=0;absSF<10240;absSF++) {
UE->slss_generated=0;
frame = absSF/10;
subframe= absSF%10;
check_and_generate_psdch(UE,frame,subframe);
......@@ -321,14 +354,22 @@ int main(int argc, char **argv) {
proc.subframe_tx = subframe;
proc.frame_tx = frame;
check_and_generate_pssch(UE,&proc,frame,subframe);
if (UE->psdch_generated>0 || UE->pscch_generated > 0 || UE->pssch_generated > 0) {
check_and_generate_slss(UE,frame,subframe);
if (UE->psdch_generated>0 || UE->pscch_generated > 0 || UE->pssch_generated > 0 || UE->slss_generated > 0) {
AssertFatal(UE->pscch_generated<3,"Illegal pscch_generated %d\n",UE->pscch_generated);
// FEP
ulsch_common_procedures(UE,&proc,0);
// write_output("txsig0SL.m","txs0",&UE->common_vars.txdata[0][UE->frame_parms.samples_per_tti*subframe],UE->frame_parms.samples_per_tti,1,1);
printf("Running do_SL_sig for subframe %d, slot_ind %d\n",subframe,UE->pscch_generated);
// write_output("txsig0SL.m","txs0",&UE->common_vars.txdata[0][UE->frame_parms.samples_per_tti*subframe],UE->frame_parms.samples_per_tti,1,1);
// printf("Running do_SL_sig for frame %d subframe %d (%d,%d,%d,%d)\n",frame,subframe,UE->slss_generated,UE->pscch_generated,UE->psdch_generated,UE->pssch_generated);
do_SL_sig(0,UE2UE,subframe,UE->pscch_generated,&UE->frame_parms,frame,0);
// write_output("rxsig0.m","rxs0",&UE->common_vars.rxdata[0][UE->frame_parms.samples_per_tti*subframe],UE->frame_parms.samples_per_tti,1,1);
// write_output("rxsig0.m","rxs0",&UE->common_vars.rxdata[0][UE->frame_parms.samples_per_tti*subframe],UE->frame_parms.samples_per_tti,1,1);
if (do_SLSS==1)
memcpy((void*)&UE->common_vars.rxdata_syncSL[0][(((frame&3)*10)+subframe)*2*UE->frame_parms.samples_per_tti],
(void*)&UE->common_vars.rxdata[0][subframe*UE->frame_parms.samples_per_tti],
2*UE->frame_parms.samples_per_tti*sizeof(int16_t));
// write_output("rxsyncb0.m","rxsyncb0",(void*)UE->common_vars.rxdata_syncSL[0],(UE->frame_parms.samples_per_tti),1,1);
// exit(-1);
UE->pscch_generated = 0;
UE->pssch_generated = 0;
UE->psdch_generated = 0;
......@@ -336,7 +377,26 @@ int main(int argc, char **argv) {
}
rx_slcch(UE,frame,subframe);
rx_slsch(UE,&proc,frame,subframe);
if ((absSF % 40) == 3 && do_SLSS==1) {
printf("Running Initial synchronization for SL\n");
// initial synch for SL
// write_output("rxsyncb.m","rxsyncb",(void*)UE->common_vars.rxdata_syncSL[0],(UE->frame_parms.samples_per_tti),1,1);
UE->rx_offsetSL = lte_sync_timeSL(UE,
&index,
&psslevel,
&avglevel);
printf("absSF %d: Frame %d, index %d, psslevel %lld dB avglevel %lld dB => %d sample offset\n",
absSF,frame,index,dB_fixed(psslevel),dB_fixed(avglevel),UE->rx_offsetSL);
int32_t sss_metric;
int32_t phase_max;
rx_slsss(UE,&sss_metric,&phase_max,index,subframe);
// write_output("rxsynca.m","rxsynca",(void*)UE->common_vars.rxdata_syncSL[0],(UE->frame_parms.samples_per_tti),1,1);
// exit(-1);
}
UE->sl_fep_done = 0;
if ((absSF%320) == 319) {
if (UE->slcch_received == 0) pscch_errors++;
......
......@@ -703,8 +703,21 @@ static void *UE_thread_synchSL(void *arg)
AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synchSL), "");
// Do initial synch here
LOG_I(PHY,"Running PSS timing estimation first\n");
int MLind;
int64_t maxlev;
int64_t avglev;
int rxoffset = lte_sync_timeSL(UE,
&MLind,
&maxlev,
&avglev);
if (rxoffset>=0) LOG_I(PHY,"Most likely Nid_SL/168 = %d with rxoffset %d, lev %d dB, avg %d dB\n",
MLind,rxoffset,dB_fixed(maxlev),dB_fixed(avglev));
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synchSL), "");
UE->proc.instance_cnt_synchSL--;
UE->is_synchronizedSL = 0;
AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synchSL), "");
}
}
/*!
......@@ -1659,6 +1672,7 @@ void *UE_threadSL(void *arg) {
AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0,"Could not start the device");
while (!oai_exit) {
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
int instance_cnt_synch = UE->proc.instance_cnt_synchSL;
......@@ -1670,9 +1684,9 @@ void *UE_threadSL(void *arg) {
if (is_synchronized == 0 && UE->is_SynchRef == 0) {
if (instance_cnt_synch < 0) { // we can invoke the synch
// grab 10 ms of signal and wakeup synch thread
// grab 40 ms of signal and wakeup synch thread
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
rxp[i] = (void*)&UE->common_vars.rxdata[i][0];
rxp[i] = (void*)&UE->common_vars.rxdata_syncSL[i][0];
AssertFatal( UE->frame_parms.samples_per_tti*10 ==
UE->rfdevice.trx_read_func(&UE->rfdevice,
......@@ -1844,6 +1858,9 @@ void *UE_threadSL(void *arg) {
} // start_rx_stream==1
} // UE->is_synchronized==0 && UE->is_SynchRef==0
} // while !oai_exit
for (int i=0; i<UE->frame_parms.nb_antennas_rx;i++) free(rxdata[i]);
return NULL;
}
......
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