Commit 9ec5b6c2 authored by Raymond Knoppp's avatar Raymond Knoppp

Merge branch 'ru_rau_enhancement-external-timing' of...

Merge branch 'ru_rau_enhancement-external-timing' of https://gitlab.eurecom.fr/oai/openairinterface5g into ru_rau_enhancement-external-timing
parents de284e9e 9b3e36a7
......@@ -97,44 +97,26 @@ void feptx0(RU_t *ru,int slot) {
*/
if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) {
int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32)));
int32_t *dmrsp[2] = {&dmrs[(3-ru->frame_parms.Ncp)*ru->frame_parms.ofdm_symbol_size],NULL};
//int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32)));
//int32_t *dmrsp[2] ={dmrs,NULL}; //{&dmrs[(3-ru->frame_parms.Ncp)*ru->frame_parms.ofdm_symbol_size],NULL};
//generate_ul_ref_sigs();
//ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms.ofdm_symbol_size*2*sizeof(int16_t));
generate_drs_pusch((PHY_VARS_UE *)NULL,
(UE_rxtx_proc_t*)NULL,
fp,
dmrsp,//ru->common.txdataF_BF,
ru->common.txdataF_BF,
0,
AMP,
1,
0,
0,
fp->N_RB_DL,
aa);
idft1024((int16_t*)dmrsp[0],
(int16_t*)&ru->common.txdata[aa][slot_offset],
1);
/*normal_prefix_mod((int16_t*)dmrsp[0],
(int*)&ru->common.txdata[aa][slot_offset],
1,
fp);
*/
normal_prefix_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF],
(int*)&ru->common.txdata[aa][slot_offset],
3,
fp);
}
else {
normal_prefix_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF],
}
normal_prefix_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF],
(int*)&ru->common.txdata[aa][slot_offset],
7,
fp);
}
}
/*
len = fp->samples_per_tti>>1;
......
......@@ -966,8 +966,6 @@ extern "C" {
#endif
extern "C" {
* \param openair0_cfg RF frontend parameters set by application
*/
int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
LOG_D(PHY, "openair0_cfg[0].sdr_addrs == '%s'\n", openair0_cfg[0].sdr_addrs);
LOG_D(PHY, "openair0_cfg[0].clock_source == '%d'\n", openair0_cfg[0].clock_source);
......@@ -1103,11 +1101,14 @@ extern "C" {
s->usrp = uhd::usrp::multi_usrp::make(args);
// lock mboard clocks
if (openair0_cfg[0].clock_source == internal)
if (openair0_cfg[0].clock_source == internal) {
s->usrp->set_clock_source("internal");
else
printf("Setting clock source to internal\n");
}
else {
s->usrp->set_clock_source("external");
printf("Setting clock source to external\n");
}
if (device->type==USRP_X300_DEV) {
openair0_cfg[0].rx_gain_calib_table = calib_table_x310;
#if defined(USRP_REC_PLAY)
......
......@@ -720,7 +720,10 @@ void tx_rf(RU_t *ru) {
int siglen=fp->samples_per_tti,flags=1;
if (SF_type == SF_S) {
siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
int txsymb = fp->dl_symbols_in_S_subframe+(ru->is_slave==0 ? 1 : 0);
AssertFatal(txsymb>0,"illegal txsymb %d\n",txsymb);
siglen = fp->nb_prefix_samples0 + (txsymb*fp->ofdm_symbol_size) + (txsymb-1)*fp->nb_prefix_samples;
//siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
flags=3; // end of burst
}
if ((fp->frame_type == TDD) &&
......@@ -797,10 +800,10 @@ void tx_rf(RU_t *ru) {
ru->nb_tx,
flags);
ru->south_out_cnt++;
//int se = dB_fixed(signal_energy(txp[0],siglen+sf_extension));
int se = dB_fixed(signal_energy(txp[0],siglen+sf_extension));
//LOG_D(PHY,"[TXPATH] RU %d tx_rf (en %d,len %d), writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",ru->idx,se,siglen+sf_extension,
// (long long unsigned int)proc->timestamp_tx,proc->frame_tx,proc->frame_tx_unwrap,proc->subframe_tx);
if (SF_type == SF_S) LOG_D(PHY,"[TXPATH] RU %d tx_rf (en %d,len %d), writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",ru->idx,se,siglen+sf_extension,
(long long unsigned int)proc->timestamp_tx,proc->frame_tx,proc->frame_tx_unwrap,proc->subframe_tx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
......@@ -2645,11 +2648,9 @@ void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t ti
ru->ts_offset = 0;
if (ru->is_slave == 1) {
ru->in_synch = 0;
ru->dmrssync = 0;
}
else {
ru->in_synch = 1;
ru->dmrssync = 0;
ru->generate_dmrs_sync=send_dmrssync;
}
ru->cmd = EMPTY;
......
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