testing with 2x2 and 4x4 with N310, small modifications in nr_ru_procedures and usrp_lib.cpp for multiple antennas
This commit is contained in:
@@ -1374,6 +1374,7 @@ void *ru_thread( void *param ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// At this point, all information for subframe has been received on FH interface
|
// At this point, all information for subframe has been received on FH interface
|
||||||
res = pullTpool(gNB->resp_L1, gNB->threadPool);
|
res = pullTpool(gNB->resp_L1, gNB->threadPool);
|
||||||
syncMsg = (processingData_L1_t *)NotifiedFifoData(res);
|
syncMsg = (processingData_L1_t *)NotifiedFifoData(res);
|
||||||
@@ -1386,6 +1387,7 @@ void *ru_thread( void *param ) {
|
|||||||
res->key = proc->tti_rx;
|
res->key = proc->tti_rx;
|
||||||
pushTpool(gNB->threadPool, res);
|
pushTpool(gNB->threadPool, res);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf( "Exiting ru_thread \n");
|
printf( "Exiting ru_thread \n");
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ int nr_phy_init_RU(RU_t *ru) {
|
|||||||
|
|
||||||
LOG_I(PHY,"[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB);
|
LOG_I(PHY,"[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB);
|
||||||
|
|
||||||
|
if (ru->do_precoding == 1) {
|
||||||
int beam_count = 0;
|
int beam_count = 0;
|
||||||
if (ru->nb_tx>1) {//Enable beamforming when nb_tx > 1
|
if (ru->nb_tx>1) {//Enable beamforming when nb_tx > 1
|
||||||
for (p=0;p<ru->nb_log_antennas;p++) {
|
for (p=0;p<ru->nb_log_antennas;p++) {
|
||||||
@@ -154,6 +155,7 @@ int nr_phy_init_RU(RU_t *ru) {
|
|||||||
ru->common.beam_id[i] = (uint8_t*)malloc16_clear(fp->symbols_per_slot*fp->slots_per_frame*sizeof(uint8_t));
|
ru->common.beam_id[i] = (uint8_t*)malloc16_clear(fp->symbols_per_slot*fp->slots_per_frame*sizeof(uint8_t));
|
||||||
memset(ru->common.beam_id[i],255,fp->symbols_per_slot*fp->slots_per_frame);
|
memset(ru->common.beam_id[i],255,fp->symbols_per_slot*fp->slots_per_frame);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // !=IF5
|
} // !=IF5
|
||||||
|
|
||||||
ru->common.sync_corr = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_subframe_wCP );
|
ru->common.sync_corr = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_subframe_wCP );
|
||||||
|
|||||||
@@ -302,14 +302,15 @@ static void *nr_feptx_thread(void *param) {
|
|||||||
////////////precoding////////////
|
////////////precoding////////////
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 1);
|
||||||
|
|
||||||
start_meas(&ru->precoding_stats);
|
if (aa==0 && l==0) start_meas(&ru->precoding_stats);
|
||||||
|
|
||||||
|
if (ru->do_precoding == 1) {
|
||||||
for(i=0; i<ru->nb_log_antennas; ++i) {
|
for(i=0; i<ru->nb_log_antennas; ++i) {
|
||||||
memcpy((void*) &ru->common.beam_id[i][slot*fp->symbols_per_slot+l],
|
memcpy((void*) &ru->common.beam_id[i][slot*fp->symbols_per_slot+l],
|
||||||
(void*) &ru->gNB_list[0]->common_vars.beam_id[i][slot*fp->symbols_per_slot+l],
|
(void*) &ru->gNB_list[0]->common_vars.beam_id[i][slot*fp->symbols_per_slot+l],
|
||||||
(fp->symbols_per_slot>>1)*sizeof(uint8_t));
|
(fp->symbols_per_slot>>1)*sizeof(uint8_t));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ru->nb_tx == 1 && ru->nb_log_antennas == 1) {
|
if (ru->nb_tx == 1 && ru->nb_log_antennas == 1) {
|
||||||
memcpy((void*)&ru->common.txdataF_BF[0][l*fp->ofdm_symbol_size],
|
memcpy((void*)&ru->common.txdataF_BF[0][l*fp->ofdm_symbol_size],
|
||||||
@@ -318,7 +319,6 @@ static void *nr_feptx_thread(void *param) {
|
|||||||
}
|
}
|
||||||
else if (ru->do_precoding == 0) {
|
else if (ru->do_precoding == 0) {
|
||||||
int gNB_tx = ru->gNB_list[0]->frame_parms.nb_antennas_tx;
|
int gNB_tx = ru->gNB_list[0]->frame_parms.nb_antennas_tx;
|
||||||
for (int aa=0;aa<ru->nb_tx;aa++)
|
|
||||||
memcpy((void*)&ru->common.txdataF_BF[aa][l*fp->ofdm_symbol_size],
|
memcpy((void*)&ru->common.txdataF_BF[aa][l*fp->ofdm_symbol_size],
|
||||||
(void*)&ru->gNB_list[0]->common_vars.txdataF[aa%gNB_tx][txdataF_offset + l*fp->ofdm_symbol_size],
|
(void*)&ru->gNB_list[0]->common_vars.txdataF[aa%gNB_tx][txdataF_offset + l*fp->ofdm_symbol_size],
|
||||||
(fp->samples_per_slot_wCP>>1)*sizeof(int32_t));
|
(fp->samples_per_slot_wCP>>1)*sizeof(int32_t));
|
||||||
@@ -337,13 +337,13 @@ static void *nr_feptx_thread(void *param) {
|
|||||||
txdataF_offset);//here
|
txdataF_offset);//here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stop_meas(&ru->precoding_stats);
|
if (aa==0 && l==0) stop_meas(&ru->precoding_stats);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 0);
|
||||||
|
|
||||||
////////////FEPTX////////////
|
////////////FEPTX////////////
|
||||||
start_meas(&ru->ofdm_mod_stats);
|
if (aa==0 && l==0) start_meas(&ru->ofdm_mod_stats);
|
||||||
nr_feptx0(ru,slot,start,fp->symbols_per_slot>>1,aa);
|
nr_feptx0(ru,slot,start,fp->symbols_per_slot>>1,aa);
|
||||||
stop_meas(&ru->ofdm_mod_stats);
|
if (aa==0 && l==0) stop_meas(&ru->ofdm_mod_stats);
|
||||||
|
|
||||||
if (release_thread(&feptx->mutex_feptx,&feptx->instance_cnt_feptx,"NR feptx thread")<0) break;
|
if (release_thread(&feptx->mutex_feptx,&feptx->instance_cnt_feptx,"NR feptx thread")<0) break;
|
||||||
|
|
||||||
|
|||||||
@@ -385,14 +385,14 @@ static int trx_usrp_write(openair0_device *device,
|
|||||||
#if defined(__x86_64) || defined(__i386__)
|
#if defined(__x86_64) || defined(__i386__)
|
||||||
#ifdef __AVX2__
|
#ifdef __AVX2__
|
||||||
nsamps2 = (nsamps+7)>>3;
|
nsamps2 = (nsamps+7)>>3;
|
||||||
__m256i buff_tx[8][nsamps2];
|
__m256i buff_tx[cc<2?2:cc][nsamps2];
|
||||||
#else
|
#else
|
||||||
nsamps2 = (nsamps+3)>>2;
|
nsamps2 = (nsamps+3)>>2;
|
||||||
__m128i buff_tx[8][nsamps2];
|
__m128i buff_tx[cc<2?2:cc][nsamps2];
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
nsamps2 = (nsamps+3)>>2;
|
nsamps2 = (nsamps+3)>>2;
|
||||||
int16x8_t buff_tx[8][nsamps2];
|
int16x8_t buff_tx[cc<2?2:cc][nsamps2];
|
||||||
#else
|
#else
|
||||||
#error Unsupported CPU architecture, USRP device cannot be built
|
#error Unsupported CPU architecture, USRP device cannot be built
|
||||||
#endif
|
#endif
|
||||||
@@ -523,14 +523,14 @@ void *trx_usrp_write_thread(void * arg){
|
|||||||
#if defined(__x86_64) || defined(__i386__)
|
#if defined(__x86_64) || defined(__i386__)
|
||||||
#ifdef __AVX2__
|
#ifdef __AVX2__
|
||||||
nsamps2 = (nsamps+7)>>3;
|
nsamps2 = (nsamps+7)>>3;
|
||||||
__m256i buff_tx[8][nsamps2];
|
__m256i buff_tx[cc<2?2:cc][nsamps2];
|
||||||
#else
|
#else
|
||||||
nsamps2 = (nsamps+3)>>2;
|
nsamps2 = (nsamps+3)>>2;
|
||||||
__m128i buff_tx[8][nsamps2];
|
__m128i buff_tx[cc<2?2:cc][nsamps2];
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
nsamps2 = (nsamps+3)>>2;
|
nsamps2 = (nsamps+3)>>2;
|
||||||
int16x8_t buff_tx[8][nsamps2];
|
int16x8_t buff_tx[cc<2?2:cc][nsamps2];
|
||||||
#else
|
#else
|
||||||
#error Unsupported CPU architecture, USRP device cannot be built
|
#error Unsupported CPU architecture, USRP device cannot be built
|
||||||
#endif
|
#endif
|
||||||
@@ -625,14 +625,14 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
|
|||||||
#if defined(__x86_64) || defined(__i386__)
|
#if defined(__x86_64) || defined(__i386__)
|
||||||
#ifdef __AVX2__
|
#ifdef __AVX2__
|
||||||
nsamps2 = (nsamps+7)>>3;
|
nsamps2 = (nsamps+7)>>3;
|
||||||
__m256i buff_tmp[4][nsamps2];
|
__m256i buff_tmp[cc<2 ? 2 : cc][nsamps2];
|
||||||
#else
|
#else
|
||||||
nsamps2 = (nsamps+3)>>2;
|
nsamps2 = (nsamps+3)>>2;
|
||||||
__m128i buff_tmp[4][nsamps2];
|
__m128i buff_tmp[cc<2 ? 2 : cc][nsamps2];
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
nsamps2 = (nsamps+3)>>2;
|
nsamps2 = (nsamps+3)>>2;
|
||||||
int16x8_t buff_tmp[4][nsamps2];
|
int16x8_t buff_tmp[cc<2 ? 2 : cc][nsamps2];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rxshift;
|
int rxshift;
|
||||||
|
|||||||
Reference in New Issue
Block a user