Remove useless differences with regular OAI, enhance the build to be compatible with regular binaries

This commit is contained in:
laurent
2019-08-27 18:47:12 +02:00
parent 43c07e401d
commit f1b677f849
8 changed files with 41 additions and 21 deletions
+9 -1
View File
@@ -1059,6 +1059,10 @@ set(SCHED_SRC
add_library(SCHED_LIB ${SCHED_SRC})
add_dependencies(SCHED_LIB rrc_flag)
add_library(SCHED_LIB_FS6 ${SCHED_SRC})
target_compile_definitions(SCHED_LIB_FS6 PRIVATE FS6=1)
add_dependencies(SCHED_LIB_FS6 rrc_flag)
set(SCHED_SRC_RU
${OPENAIR1_DIR}/SCHED/ru_procedures.c
${OPENAIR1_DIR}/SCHED/prach_procedures.c
@@ -1290,6 +1294,9 @@ endif ()
add_library(PHY_COMMON ${PHY_SRC_COMMON})
add_dependencies(PHY_COMMON rrc_flag)
add_library(PHY ${PHY_SRC})
add_library(PHY_FS6 ${PHY_SRC})
target_compile_definitions(PHY_FS6 PRIVATE FS6=1)
add_dependencies(PHY rrc_flag)
add_library(PHY_UE ${PHY_SRC_UE})
add_dependencies(PHY_UE rrc_flag)
@@ -2116,11 +2123,12 @@ add_executable(ocp-softmodem
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
)
target_compile_definitions(ocp-softmodem PRIVATE FS6=1)
add_dependencies(ocp-softmodem rrc_flag s1ap_flag x2_flag)
target_link_libraries (ocp-softmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB_FS6 SCHED_RU_LIB PHY_COMMON PHY_FS6 PHY_RU LFDS L2
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl)
+6 -6
View File
@@ -307,7 +307,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0_harq->codeword = 0;
dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
dlsch1_harq->codeword = 1;
//dlsch0->subframe_tx[subframe] = 1;
dlsch0->subframe_tx[subframe] = 1;
LOG_D(PHY,"NFAPI: SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d dlsch0[rnti:%x harq_mask:%04x] dci_pdu[rnti:%x rnti_type:%d harq_process:%d ndi1:%d] dlsch0_harq[round:%d harq_mask:%x ndi:%d]\n",
frame,subframe,
@@ -658,7 +658,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0_harq->codeword = 0;
// printf("DCI: Setting subframe_tx for subframe %d\n",subframe);
//dlsch0->subframe_tx[subframe] = 1;
dlsch0->subframe_tx[subframe] = 1;
conv_rballoc (rel8->resource_allocation_type, rel8->resource_block_coding, fp->N_RB_DL, dlsch0_harq->rb_alloc);
@@ -868,7 +868,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
dlsch1_harq = dlsch1->harq_processes[rel8->harq_process];
//dlsch0->subframe_tx[subframe] = 1;
dlsch0->subframe_tx[subframe] = 1;
dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
dlsch1->harq_ids[frame%2][subframe] = rel8->harq_process;
@@ -1316,7 +1316,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
}
if (dlsch0 != NULL) {
//dlsch0->subframe_tx[subframe] = 1;
dlsch0->subframe_tx[subframe] = 1;
dlsch0->harq_ids[frame%2][subframe] = rel8->harq_process;
}
@@ -1723,7 +1723,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
dlsch0_harq->codeword = 0;
// printf("DCI: Setting subframe_tx for subframe %d\n",subframe);
//dlsch0->subframe_tx[(subframe + 2) % 10] = 1;
dlsch0->subframe_tx[(subframe + 2) % 10] = 1;
LOG_D(PHY,"PDSCH : resource_block_coding %x\n",rel13->resource_block_coding);
conv_eMTC_rballoc (rel13->resource_block_coding,
@@ -1746,7 +1746,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
dlsch0_harq->dl_power_off = 1;
//dlsch0->subframe_tx[subframe] = 1;
dlsch0->subframe_tx[subframe] = 1;
if (dlsch0->rnti != rel13->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry
dlsch0_harq->round = 0;
dlsch0->harq_mask =0;
+1 -1
View File
@@ -158,7 +158,7 @@ typedef struct {
/// HARQ process mask, indicates which processes are currently active
uint16_t harq_mask;
/// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK.
//uint8_t subframe_tx[10];
uint8_t subframe_tx[10];
/// First CCE of last PDSCH scheduling per subframe. Again used during PUCCH detection for ACK/NAK.
uint8_t nCCE[10];
/// Process ID's per subframe. Used to associate received ACKs on PUSCH/PUCCH to DLSCH harq process ids
+12 -5
View File
@@ -617,13 +617,13 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
crc_type = CRC24_A;
else
crc_type = CRC24_B;
#ifdef FS6
if ( getenv("fs6") != NULL && strncasecmp( getenv("fs6"), "du", 2) == 0 ) {
// r is the segment id,
// Kr is the segment length in short
// *3 because LTE redudancy scheme
sendFs6Ul(eNB, UE_id, harq_pid, r, &ulsch_harq->d[r][96], Kr*sizeof(int16_t)*3);
LOG_D(PHY, "Cu should decode in %d iter\n",tc(&ulsch_harq->d[r][96],
int iter=tc(&ulsch_harq->d[r][96],
NULL,
ulsch_harq->c[r],
NULL,
@@ -637,11 +637,18 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
&eNB->ulsch_tc_gamma_stats,
&eNB->ulsch_tc_ext_stats,
&eNB->ulsch_tc_intl1_stats,
&eNB->ulsch_tc_intl2_stats));
&eNB->ulsch_tc_intl2_stats);
LOG_D(PHY, "Cu should decode in %d iter\n",iter);
if ( iter == 5 ) {
for (int i=0; i < Kr; i++ )
printf("%hx:", ulsch_harq->d[r][96+i]);
printf("\n");
}
return 0;
}
#endif
start_meas(&eNB->ulsch_turbo_decoding_stats);
ret = tc(&ulsch_harq->d[r][96],
NULL,
@@ -788,7 +795,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
Q_m = ulsch_harq->Qm;
G = nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch;
//#ifdef DEBUG_ULSCH_DECODING
LOG_D(PHY,"[PUSCH %d] Frame %d, Subframe %d: ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): A %d, round %d, RV %d, O_r1 %d, O_RI %d, O_ACK %d, G %d, Q_m %d Nsymb_pusch %d nb_rb %d\n",
LOG_D(PHY,"[PUSCH harq %d] Frame %d, Subframe %d: ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): TBS %d, round %d, RV %d, O_r1 %d, O_RI %d, O_ACK %d, G %d, Q_m %d Nsymb_pusch %d nb_rb %d\n",
harq_pid,
proc->frame_rx,subframe,
frame_parms->Nid_cell,ulsch->rnti,x2,
@@ -353,6 +353,11 @@ uint32_t ulsch_encoding(uint8_t *a,
(r==0) ? ulsch->harq_processes[harq_pid]->F : 0
);
stop_meas(te_stats);
/*
for (int i=0; i< Kr ; i++ )
printf("%hx", ulsch->harq_processes[harq_pid]->d[r][96+i]);
printf ("\n");
*/
#ifdef DEBUG_ULSCH_CODING
if (r==0)
+4
View File
@@ -591,10 +591,12 @@ void srs_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
}
void fill_sr_indication(int UEid, PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int subframe,uint32_t stat) {
#ifdef FS6
if ( getenv("fs6") != NULL && strncasecmp( getenv("fs6"), "du", 2) == 0 ) {
sendFs6Ulharq(fs6ULindicationSr, UEid, eNB, frame, subframe, NULL,0,0, rnti, stat);
return;
}
#endif
pthread_mutex_lock(&eNB->UL_INFO_mutex);
nfapi_sr_indication_t *sr_ind = &eNB->UL_INFO.sr_ind;
nfapi_sr_indication_body_t *sr_ind_body = &sr_ind->sr_indication_body;
@@ -1760,10 +1762,12 @@ void fill_ulsch_harq_indication (PHY_VARS_eNB *eNB, LTE_UL_eNB_HARQ_t *ulsch_har
}
void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask) {
#ifdef FS6
if ( getenv("fs6") != NULL && strncasecmp( getenv("fs6"), "du", 2) == 0 ) {
sendFs6Ulharq(fs6ULindicationHarq, UEid, eNB, frame, subframe, harq_ack, tdd_mapping_mode, tdd_multiplexing_mask, 0, 0);
return;
}
#endif
int UE_id=find_dlsch(uci->rnti,eNB,SEARCH_EXIST);
+3 -4
View File
@@ -1202,7 +1202,8 @@ void wakeup_L1s(RU_t *ru) {
ru->proc.emulate_rf_busy = 0;
}
inline int wakeup_prach_ru(RU_t *ru) {
void wakeup_prach_ru(RU_t *ru) {
int ret;
struct timespec wait;
int time_ns = 5000000L;
@@ -1234,11 +1235,10 @@ inline int wakeup_prach_ru(RU_t *ru) {
} else LOG_W(PHY,"RU prach thread busy, skipping\n");
AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_prach ))==0,"mutex_unlock returns %d\n",ret);
return(0);
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
inline int wakeup_prach_ru_br(RU_t *ru) {
void wakeup_prach_ru_br(RU_t *ru) {
int ret;
struct timespec wait;
int time_ns = 5000000L;
@@ -1264,7 +1264,6 @@ inline int wakeup_prach_ru_br(RU_t *ru) {
} else LOG_W(PHY,"RU prach thread busy, skipping\n");
AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_prach_br ))==0,"mutex_unlock returns %d\n",ret);
return(0);
}
#endif
+1 -4
View File
@@ -593,10 +593,7 @@ int main( int argc, char **argv ) {
/* initializes PDCP and sets correct RLC Request/PDCP Indication callbacks
* for monolithic/F1 modes */
//if ( getenv("fs6") != NULL && strncasecmp( getenv("fs6"), "du", 2) == 0 )
//RC.rrc[0]->node_type=ngran_eNB_DU;
init_pdcp();
init_pdcp();
if (create_tasks(1) < 0) {
printf("cannot create ITTI tasks\n");