Commit 12801c59 authored by Raymond Knopp's avatar Raymond Knopp

switch for parallel FEP on ulsim. Deactivated for real-time operation.

parent 5b9f4714
......@@ -2568,9 +2568,7 @@ static void *fep_thread(void *param) {
PHY_VARS_eNB *eNB = (PHY_VARS_eNB *)param;
eNB_proc_t *proc = &eNB->proc;
while (!oai_exit) {
printf("Waiting for parallel FEP signal\n");
if (wait_on_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread")<0) break;
printf("Running parallel FEP on first slot\n");
fep0(eNB,0);
if (release_thread(&proc->mutex_fep,&proc->instance_cnt_fep,"fep thread")<0) break;
}
......@@ -2601,8 +2599,6 @@ void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,1);
start_meas(&eNB->ofdm_demod_stats);
printf("Running 2 thread FEP\n");
if (pthread_mutex_timedlock(&proc->mutex_fep,&wait) != 0) {
printf("[eNB] ERROR pthread_mutex_lock for fep thread %d (IC %d)\n", proc->instance_cnt_fep);
exit_fun( "error locking mutex_fep" );
......@@ -2618,7 +2614,7 @@ void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
++proc->instance_cnt_fep;
printf("[eNB] waking up FEP thread\n");
if (pthread_cond_signal(&proc->cond_fep) != 0) {
printf("[eNB] ERROR pthread_cond_signal for fep thread\n");
exit_fun( "ERROR pthread_cond_signal" );
......@@ -2628,7 +2624,6 @@ void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
pthread_mutex_unlock( &proc->mutex_fep );
// call second slot in this symbol
printf("Calling FEP for 2nd slot\n");
fep0(eNB,1);
if (pthread_mutex_timedlock(&proc->mutex_fep,&wait) != 0) {
......@@ -2643,10 +2638,12 @@ void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
};
pthread_mutex_unlock( &proc->mutex_fep );
if (wait_cnt>10000) {
if (wait_cnt>1000000) {
printf("[eNB] parallel FEP didn't finish\n");
exit_fun( "error" );
}
stop_meas(&eNB->ofdm_demod_stats);
}
void eNB_fep_full(PHY_VARS_eNB *eNB) {
......
......@@ -13,7 +13,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should haeve received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
......
......@@ -85,8 +85,6 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */
int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
int oai_exit = 0;
void fill_ulsch_dci(PHY_VARS_eNB *eNB,void *UL_dci,int first_rb,int nb_rb,int mcs,int ndi,int cqi_flag) {
......@@ -276,7 +274,7 @@ int main(int argc, char **argv)
char channel_model_input[10];
uint8_t max_turbo_iterations=4;
uint8_t llr8_flag=0;
uint8_t parallel_flag=0;
int nb_rb_set = 0;
int threequarter_fs=0;
......@@ -534,7 +532,7 @@ int main(int argc, char **argv)
break;
case 'L':
llr8_flag=1;
parallel_flag=1;
break;
case 'I':
......@@ -691,7 +689,7 @@ int main(int argc, char **argv)
eNB->ulsch[0] = new_eNB_ulsch(max_turbo_iterations,N_RB_DL,0);
UE->ulsch[0] = new_ue_ulsch(N_RB_DL,0);
init_fep_thread(eNB,&eNB->proc.attr_fep);
if (parallel_flag == 1) init_fep_thread(eNB,&eNB->proc.attr_fep);
// Create transport channel structures for 2 transport blocks (MIMO)
for (i=0; i<2; i++) {
......@@ -1186,7 +1184,7 @@ int main(int argc, char **argv)
}
eNB->fep = eNB_fep_full_2thread;
eNB->fep = (parallel_flag == 1) ? eNB_fep_full_2thread : eNB_fep_full;
eNB->do_prach = NULL;
phy_procedures_eNB_common_RX(eNB);
......
openair0_device openair0;
int oai_exit=0;
void exit_fun(const char *s) { exit(-1); }
......
......@@ -1634,7 +1634,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
break;
case NGFI_RRU_IF4p5:
eNB->do_prach = do_prach;
eNB->fep = (eNB->single_thread_flag == 0) ? NB_fep_full : eNB_fep_full_2thread;
eNB->fep = eNB_fep_full;
eNB->proc_uespec_rx = NULL;
eNB->proc_tx = NULL;//proc_tx_rru_if4p5;
eNB->tx_fh = NULL;
......@@ -1661,7 +1661,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
break;
case eNodeB_3GPP:
eNB->do_prach = do_prach;
eNB->fep = (eNB->single_thread_flag == 0) ? NB_fep_full : eNB_fep_full_2thread;
eNB->fep = eNB_fep_full;
eNB->proc_uespec_rx = phy_procedures_eNB_uespec_RX;
eNB->proc_tx = proc_tx_full;
eNB->tx_fh = NULL;
......@@ -1679,7 +1679,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
break;
case eNodeB_3GPP_BBU:
eNB->do_prach = do_prach;
eNB->fep = (eNB->single_thread_flag == 0) ? NB_fep_full : eNB_fep_full_2thread;
eNB->fep = eNB_fep_full;
eNB->proc_uespec_rx = phy_procedures_eNB_uespec_RX;
eNB->proc_tx = proc_tx_full;
eNB->tx_fh = tx_fh_if5;
......
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