testing FEP parrelization, default set back to single-thread. Reduced logging in MAC
This commit is contained in:
@@ -165,9 +165,10 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
|
||||
if (fftsize==128)
|
||||
#endif
|
||||
{
|
||||
for (j=0; j<fftsize ; j++) {
|
||||
/*for (j=0; j<fftsize ; j++) {
|
||||
output_ptr[j] = temp_ptr[j];
|
||||
}
|
||||
}*/
|
||||
memcpy((void*)output_ptr,(void*)temp_ptr,fftsize<<2);
|
||||
}
|
||||
|
||||
j=fftsize;
|
||||
|
||||
@@ -66,7 +66,7 @@ extern int oai_exit;
|
||||
void feptx0(RU_t *ru,int slot) {
|
||||
|
||||
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
|
||||
int dummy_tx_b[7680*2] __attribute__((aligned(32)));
|
||||
//int dummy_tx_b[7680*2] __attribute__((aligned(32)));
|
||||
|
||||
unsigned int aa,slot_offset;
|
||||
int i,j, tx_offset;
|
||||
@@ -82,20 +82,20 @@ void feptx0(RU_t *ru,int slot) {
|
||||
|
||||
for (aa=0; aa<ru->nb_tx; aa++) {
|
||||
if (fp->Ncp == EXTENDED) PHY_ofdm_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF],
|
||||
dummy_tx_b,
|
||||
fp->ofdm_symbol_size,
|
||||
6,
|
||||
fp->nb_prefix_samples,
|
||||
CYCLIC_PREFIX);
|
||||
(int*)&ru->common.txdata[aa][slot_offset],
|
||||
fp->ofdm_symbol_size,
|
||||
6,
|
||||
fp->nb_prefix_samples,
|
||||
CYCLIC_PREFIX);
|
||||
else normal_prefix_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF],
|
||||
dummy_tx_b,
|
||||
7,
|
||||
fp);
|
||||
|
||||
(int*)&ru->common.txdata[aa][slot_offset],
|
||||
7,
|
||||
fp);
|
||||
|
||||
/*
|
||||
len = fp->samples_per_tti>>1;
|
||||
|
||||
// cyclic extension
|
||||
|
||||
if ((slot_offset+len)>(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti)) {
|
||||
tx_offset = (int)slot_offset;
|
||||
txdata = (int16_t*)&ru->common.txdata[aa][tx_offset];
|
||||
@@ -111,20 +111,17 @@ void feptx0(RU_t *ru,int slot) {
|
||||
else {
|
||||
tx_offset = (int)slot_offset;
|
||||
txdata = (int16_t*)&ru->common.txdata[aa][tx_offset];
|
||||
|
||||
for (i=0; i<(len<<1); i++) {
|
||||
txdata[i] = ((int16_t*)dummy_tx_b)[i];
|
||||
}
|
||||
memcpy((void*)txdata,(void*)dummy_tx_b,len<<2);
|
||||
}
|
||||
|
||||
*/
|
||||
// TDD: turn on tx switch N_TA_offset before by setting buffer in these samples to 0
|
||||
if ((slot == 0) &&
|
||||
((((fp->tdd_config==0) ||
|
||||
(fp->tdd_config==1) ||
|
||||
(fp->tdd_config==2) ||
|
||||
(fp->tdd_config==6)) &&
|
||||
(subframe==0)) || (subframe==5))) {
|
||||
|
||||
(fp->frame_type == TDD) &&
|
||||
((fp->tdd_config==0) ||
|
||||
(fp->tdd_config==1) ||
|
||||
(fp->tdd_config==2) ||
|
||||
(fp->tdd_config==6)) &&
|
||||
((subframe==0) || (subframe==5))) {
|
||||
for (i=0; i<ru->N_TA_offset; i++) {
|
||||
tx_offset = (int)slot_offset+i-ru->N_TA_offset/2;
|
||||
if (tx_offset<0)
|
||||
@@ -136,9 +133,6 @@ void feptx0(RU_t *ru,int slot) {
|
||||
ru->common.txdata[aa][tx_offset] = 0x00000000;
|
||||
}
|
||||
}
|
||||
LOG_D(PHY,"feptx_ofdm (TXPATH): frame %d, subframe %d: txp (time %p) %d dB, txp (freq) %d dB\n",
|
||||
ru->proc.frame_tx,subframe,txdata,dB_fixed(signal_energy((int32_t*)txdata,fp->samples_per_tti)),
|
||||
dB_fixed(signal_energy_nodc(ru->common.txdataF_BF[aa],2*slot_sizeF)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +171,7 @@ void feptx_ofdm_2thread(RU_t *ru) {
|
||||
wait.tv_sec=0;
|
||||
wait.tv_nsec=5000000L;
|
||||
|
||||
start_meas(&ru->ofdm_demod_stats);
|
||||
start_meas(&ru->ofdm_mod_stats);
|
||||
|
||||
if (subframe_select(fp,subframe) == SF_UL) return;
|
||||
|
||||
@@ -209,12 +203,10 @@ void feptx_ofdm_2thread(RU_t *ru) {
|
||||
}
|
||||
|
||||
// call first slot in this thread
|
||||
|
||||
feptx0(ru,0);
|
||||
|
||||
wait_on_busy_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread");
|
||||
|
||||
stop_meas(&ru->ofdm_demod_stats);
|
||||
stop_meas(&ru->ofdm_mod_stats);
|
||||
|
||||
}
|
||||
|
||||
@@ -329,11 +321,12 @@ void feptx_ofdm(RU_t *ru) {
|
||||
}
|
||||
}
|
||||
*/
|
||||
if ((((fp->tdd_config==0) ||
|
||||
(fp->tdd_config==1) ||
|
||||
(fp->tdd_config==2) ||
|
||||
(fp->tdd_config==6)) &&
|
||||
(subframe==0)) || (subframe==5)) {
|
||||
if ((fp->frame_type == TDD) &&
|
||||
((fp->tdd_config==0) ||
|
||||
(fp->tdd_config==1) ||
|
||||
(fp->tdd_config==2) ||
|
||||
(fp->tdd_config==6)) &&
|
||||
((subframe==0) || (subframe==5))) {
|
||||
// turn on tx switch N_TA_offset before
|
||||
//LOG_D(HW,"subframe %d, time to switch to tx (N_TA_offset %d, slot_offset %d) \n",subframe,ru->N_TA_offset,slot_offset);
|
||||
for (i=0; i<ru->N_TA_offset; i++) {
|
||||
|
||||
@@ -388,7 +388,7 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
||||
{
|
||||
|
||||
if ((RA_template->Msg2_frame == frameP) && (RA_template->Msg2_subframe == subframeP)) {
|
||||
LOG_I(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, RA_active %d format 1A (%d,%d))\n",
|
||||
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, RA_active %d format 1A (%d,%d))\n",
|
||||
module_idP, CC_idP, frameP, subframeP,
|
||||
RA_template->RA_active,
|
||||
|
||||
@@ -860,7 +860,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
||||
1, // ndi
|
||||
0, // rv
|
||||
0); // vrb_flag
|
||||
LOG_I(MAC,"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d\n",
|
||||
LOG_D(MAC,"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d\n",
|
||||
frameP,
|
||||
subframeP,
|
||||
dl_req->number_pdu,
|
||||
@@ -947,7 +947,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
|
||||
(cc->p_eNB==1 ) ? 1 : 2, // transmission mode
|
||||
1, // num_bf_prb_per_subband
|
||||
1); // num_bf_vector
|
||||
LOG_I(MAC,"Filled DLSCH config, pdu number %d, non-dci pdu_index %d\n",dl_req->number_pdu,eNB->pdu_index[CC_idP]);
|
||||
LOG_D(MAC,"Filled DLSCH config, pdu number %d, non-dci pdu_index %d\n",dl_req->number_pdu,eNB->pdu_index[CC_idP]);
|
||||
|
||||
// DL request
|
||||
eNB->TX_req[CC_idP].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_idP].tx_request_body,
|
||||
@@ -1082,7 +1082,7 @@ void check_Msg4_retransmission(module_id_t module_idP,int CC_idP,frame_t frameP,
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdu++;
|
||||
|
||||
LOG_I(MAC,"msg4 retransmission for rnti %x (round %d) fsf %d/%d\n", RA_template->rnti, round, frameP, subframeP);
|
||||
LOG_D(MAC,"msg4 retransmission for rnti %x (round %d) fsf %d/%d\n", RA_template->rnti, round, frameP, subframeP);
|
||||
// DLSCH Config
|
||||
fill_nfapi_dlsch_config(eNB,
|
||||
dl_req,
|
||||
@@ -1164,7 +1164,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
if (RA_template->RA_active == TRUE) {
|
||||
|
||||
LOG_I(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA %d is active (generate RAR %d, generate_Msg4 %d, wait_ack_Msg4 %d, rnti %x)\n",
|
||||
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA %d is active (generate RAR %d, generate_Msg4 %d, wait_ack_Msg4 %d, rnti %x)\n",
|
||||
module_idP,frameP,subframeP,CC_id,i,RA_template->generate_rar,RA_template->generate_Msg4,RA_template->wait_ack_Msg4, RA_template->rnti);
|
||||
|
||||
if (RA_template->generate_rar == 1) generate_Msg2(module_idP,CC_id,frameP,subframeP,RA_template);
|
||||
|
||||
@@ -148,7 +148,7 @@ void rx_sdu(const module_id_t enb_mod_idP,
|
||||
"maxHARQ %d should be greater than 1\n",
|
||||
(int)eNB->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx);
|
||||
|
||||
LOG_I(MAC,"[eNB %d][PUSCH %d] CC_id %d Received ULSCH sdu round %d from PHY (rnti %x, RA_id %d) ul_cqi %d\n",enb_mod_idP,harq_pid,CC_idP,
|
||||
LOG_D(MAC,"[eNB %d][PUSCH %d] CC_id %d Received ULSCH sdu round %d from PHY (rnti %x, RA_id %d) ul_cqi %d\n",enb_mod_idP,harq_pid,CC_idP,
|
||||
RA_template[RA_id].msg3_round,
|
||||
rntiP,RA_id,ul_cqi);
|
||||
|
||||
|
||||
@@ -1336,6 +1336,7 @@ static void* ru_stats_thread(void* param) {
|
||||
if (ru->feptx_ofdm) print_meas(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL);
|
||||
}
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
static void* ru_thread( void* param ) {
|
||||
@@ -1581,7 +1582,10 @@ int start_rf(RU_t *ru) {
|
||||
extern void fep_full(RU_t *ru);
|
||||
extern void ru_fep_full_2thread(RU_t *ru);
|
||||
extern void feptx_ofdm(RU_t *ru);
|
||||
extern void feptx_ofdm_2thread(RU_t *ru);
|
||||
extern void feptx_prec(RU_t *ru);
|
||||
extern void init_fep_thread(RU_t *ru,pthread_attr_t *attr);
|
||||
extern void init_feptx_thread(RU_t *ru,pthread_attr_t *attr);
|
||||
|
||||
void init_RU_proc(RU_t *ru) {
|
||||
|
||||
@@ -1665,7 +1669,10 @@ void init_RU_proc(RU_t *ru) {
|
||||
|
||||
}
|
||||
|
||||
init_fep_thread(ru,NULL);
|
||||
if (get_nprocs()>=2) {
|
||||
if (ru->feprx) init_fep_thread(ru,NULL);
|
||||
if (ru->feptx_ofdm) init_feptx_thread(ru,NULL);
|
||||
}
|
||||
if (opp_enabled == 1) pthread_create(&ru->ru_stats_thread,NULL,ru_stats_thread,(void*)ru);
|
||||
|
||||
}
|
||||
@@ -1920,8 +1927,8 @@ void init_RU(char *rf_config_file) {
|
||||
ru->fh_north_out = fh_if4p5_north_out; // send_IF4p5 on reception
|
||||
ru->fh_south_out = tx_rf; // send output to RF
|
||||
ru->fh_north_asynch_in = fh_if4p5_north_asynch_in; // TX packets come asynchronously
|
||||
ru->feprx = (get_nprocs()<=2) ? fep_full :fep_full; // RX DFTs
|
||||
ru->feptx_ofdm = feptx_ofdm; // this is fep with idft only (no precoding in RRU)
|
||||
ru->feprx = (get_nprocs()<=4) ? fep_full :ru_fep_full_2thread; // RX DFTs
|
||||
ru->feptx_ofdm = (get_nprocs()<=4) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU)
|
||||
ru->feptx_prec = NULL;
|
||||
ru->start_if = start_if; // need to start the if interface for if4p5
|
||||
ru->ifdevice.host_type = RRU_HOST;
|
||||
@@ -1938,8 +1945,8 @@ void init_RU(char *rf_config_file) {
|
||||
}
|
||||
else if (ru->function == eNodeB_3GPP) {
|
||||
ru->do_prach = 0; // no prach processing in RU
|
||||
ru->feprx = (get_nprocs()<=2) ? fep_full : ru_fep_full_2thread; // RX DFTs
|
||||
ru->feptx_ofdm = feptx_ofdm; // this is fep with idft and precoding
|
||||
ru->feprx = (get_nprocs()<=4) ? fep_full : ru_fep_full_2thread; // RX DFTs
|
||||
ru->feptx_ofdm = (get_nprocs()<=4) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft and precoding
|
||||
ru->feptx_prec = feptx_prec; // this is fep with idft and precoding
|
||||
ru->fh_north_in = NULL; // no incoming fronthaul from north
|
||||
ru->fh_north_out = NULL; // no outgoing fronthaul to north
|
||||
@@ -1968,7 +1975,7 @@ void init_RU(char *rf_config_file) {
|
||||
ru->do_prach = 0;
|
||||
ru->feprx = (get_nprocs()<=2) ? fep_full : fep_full; // this is frequency-shift + DFTs
|
||||
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
|
||||
ru->feptx_ofdm = feptx_ofdm; // need to do transmit Precoding + IDFTs
|
||||
ru->feptx_ofdm = (get_nprocs()<=2) ? feptx_ofdm : feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs
|
||||
if (ru->if_timing == synch_to_other) {
|
||||
ru->fh_south_in = fh_slave_south_in; // synchronize to master
|
||||
ru->fh_south_out = fh_if5_mobipass_south_out; // use send_IF5 for mobipass
|
||||
|
||||
Reference in New Issue
Block a user