replacing judgment from get_nprocs() and worker flags by paralle_stage and worker_stage

This commit is contained in:
Wang Tsu-Han
2018-08-31 12:58:49 +02:00
parent 24c1c6e18b
commit ee04caab8a
7 changed files with 112 additions and 46 deletions
+27 -12
View File
@@ -58,7 +58,6 @@
uint64_t deadline,
uint64_t period);*/
extern int codingw;
void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
{
@@ -615,8 +614,10 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
}
}
if(C >= 8 && get_nprocs()>=16 && codingw)//one main three worker
if(get_thread_worker_stage())
{
if(C >= 8)//one main three worker
{
encoding_return =
dlsch_encoding_2threads(eNB,
a,
@@ -632,9 +633,9 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
te_wakeup_stats1,
i_stats,
3);
}
else if(C >= 6 && get_nprocs()>=8 && codingw)//one main two worker
{
}
else if(C >= 6)//one main two worker
{
encoding_return =
dlsch_encoding_2threads(eNB,
a,
@@ -650,9 +651,9 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
te_wakeup_stats1,
i_stats,
2);
}
else if(C >= 4 && get_nprocs()>=4 && codingw)//one main one worker
{
}
else if(C >= 4)//one main one worker
{
encoding_return =
dlsch_encoding_2threads(eNB,
a,
@@ -668,9 +669,9 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
te_wakeup_stats1,
i_stats,
1);
}
else
{
}
else
{
encoding_return =
dlsch_encoding(eNB,
a,
@@ -681,7 +682,21 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
rm_stats,
te_stats,
i_stats);
}
}
}
else
{
encoding_return =
dlsch_encoding(eNB,
a,
num_pdcch_symbols,
dlsch,
frame,
subframe,
rm_stats,
te_stats,
i_stats);
}
return encoding_return;
}
+2 -2
View File
@@ -45,7 +45,7 @@
#include "targets/RT/USER/rt_wrapper.h"
#include "transport_proto.h"
extern int codingw;
extern uint8_t get_thread_worker_stage(void);
void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch)
{
@@ -723,7 +723,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
{
int ret = 0;
/*if(codingw)
/*if(get_thread_worker_stage())
{
ret = ulsch_decoding_data_2thread(eNB,UE_id,harq_pid,llr8_flag);
}
+6
View File
@@ -888,6 +888,12 @@ typedef struct {
int prach_I0;
} PHY_MEASUREMENTS_eNB;
typedef struct THREAD_STRUCT_s {
uint8_t paralle_stage;
uint8_t worker_stage;
int core_number;
} THREAD_STRUCT;
/// Top-level PHY Data Structure for eNB
typedef struct PHY_VARS_eNB_s {