Commit b446c472 authored by Xu Bo's avatar Xu Bo

add flag to inform scheduler_dlsch that txdataF generation finished and change...

add flag to inform scheduler_dlsch that txdataF generation finished and change sleep time from 200us to 10us
parent 4c30882f
...@@ -409,6 +409,10 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP, ...@@ -409,6 +409,10 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP,
} }
#ifdef UE_EXPANSION
extern volatile int16_t phy_tx_txdataF_end;
extern int oai_exit;
#endif
// changes to pre-processor for eMTC // changes to pre-processor for eMTC
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -546,6 +550,12 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -546,6 +550,12 @@ schedule_ue_spec(module_id_t module_idP,
stop_meas(&eNB->schedule_dlsch_preprocessor); stop_meas(&eNB->schedule_dlsch_preprocessor);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,VCD_FUNCTION_OUT);
#ifdef UE_EXPANSION
struct timespec time_req, time_rem;
time_req.tv_sec = 0;
time_req.tv_nsec = 10000;
#endif
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n",CC_id); LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n",CC_id);
...@@ -1255,6 +1265,12 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1255,6 +1265,12 @@ schedule_ue_spec(module_id_t module_idP,
post_padding = TBS - sdu_length_total - header_len_dcch - header_len_dtch - ta_len; // 1 is for the postpadding header post_padding = TBS - sdu_length_total - header_len_dcch - header_len_dtch - ta_len; // 1 is for the postpadding header
} }
#ifdef UE_EXPANSION
while((!oai_exit)&&(phy_tx_txdataF_end == 0)){
nanosleep(&time_req,&time_rem);
continue;
}
#endif
offset = generate_dlsch_header((unsigned char *) UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], num_sdus, //num_sdus offset = generate_dlsch_header((unsigned char *) UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], num_sdus, //num_sdus
sdu_lengths, // sdu_lengths, //
......
...@@ -1391,6 +1391,7 @@ static void* ru_stats_thread(void* param) { ...@@ -1391,6 +1391,7 @@ static void* ru_stats_thread(void* param) {
#ifdef UE_EXPANSION #ifdef UE_EXPANSION
int first_phy_tx = 1; int first_phy_tx = 1;
volatile int16_t phy_tx_txdataF_end;
volatile int16_t phy_tx_end; volatile int16_t phy_tx_end;
#endif #endif
static void* ru_thread( void* param ) { static void* ru_thread( void* param ) {
...@@ -1410,6 +1411,11 @@ static void* ru_thread( void* param ) { ...@@ -1410,6 +1411,11 @@ static void* ru_thread( void* param ) {
dlsch_ue_select_tbl_in_use = 1; dlsch_ue_select_tbl_in_use = 1;
#endif #endif
#ifdef UE_EXPANSION
struct timespec time_req, time_rem;
time_req.tv_sec = 0;
time_req.tv_nsec = 10000;
#endif
// set default return value // set default return value
thread_top_init("ru_thread",0,870000,1000000,1000000); thread_top_init("ru_thread",0,870000,1000000,1000000);
...@@ -1504,6 +1510,7 @@ static void* ru_thread( void* param ) { ...@@ -1504,6 +1510,7 @@ static void* ru_thread( void* param ) {
if(first_phy_tx == 0) if(first_phy_tx == 0)
{ {
phy_tx_end = 0; phy_tx_end = 0;
phy_tx_txdataF_end = 0;
if(pthread_mutex_lock(&ru->proc.mutex_phy_tx) != 0){ if(pthread_mutex_lock(&ru->proc.mutex_phy_tx) != 0){
LOG_E( PHY, "[RU] ERROR pthread_mutex_lock for phy tx thread (IC %d)\n", ru->proc.instance_cnt_phy_tx); LOG_E( PHY, "[RU] ERROR pthread_mutex_lock for phy tx thread (IC %d)\n", ru->proc.instance_cnt_phy_tx);
exit_fun( "error locking mutex_rxtx" ); exit_fun( "error locking mutex_rxtx" );
...@@ -1518,6 +1525,7 @@ static void* ru_thread( void* param ) { ...@@ -1518,6 +1525,7 @@ static void* ru_thread( void* param ) {
pthread_mutex_unlock( &ru->proc.mutex_phy_tx ); pthread_mutex_unlock( &ru->proc.mutex_phy_tx );
} else { } else {
phy_tx_end = 1; phy_tx_end = 1;
phy_tx_txdataF_end = 1;
} }
first_phy_tx = 0; first_phy_tx = 0;
#endif #endif
...@@ -1587,7 +1595,7 @@ static void* ru_thread( void* param ) { ...@@ -1587,7 +1595,7 @@ static void* ru_thread( void* param ) {
if (ru->fh_north_out) ru->fh_north_out(ru); if (ru->fh_north_out) ru->fh_north_out(ru);
#else #else
while((!oai_exit)&&(phy_tx_end == 0)){ while((!oai_exit)&&(phy_tx_end == 0)){
usleep(200); nanosleep(&time_req,&time_rem);
continue; continue;
} }
#endif #endif
...@@ -1719,6 +1727,8 @@ static void* eNB_thread_phy_tx( void* param ) { ...@@ -1719,6 +1727,8 @@ static void* eNB_thread_phy_tx( void* param ) {
ru->proc.frame_tx = proc->frame_phy_tx; ru->proc.frame_tx = proc->frame_phy_tx;
ru->proc.subframe_tx = proc->subframe_phy_tx; ru->proc.subframe_tx = proc->subframe_phy_tx;
ru->proc.timestamp_tx = proc->timestamp_phy_tx; ru->proc.timestamp_tx = proc->timestamp_phy_tx;
phy_tx_txdataF_end = 1;
// do TX front-end processing if needed (precoding and/or IDFTs) // do TX front-end processing if needed (precoding and/or IDFTs)
if (ru->feptx_prec) ru->feptx_prec(ru); if (ru->feptx_prec) ru->feptx_prec(ru);
......
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