Commit 5dc306ec authored by matzakos's avatar matzakos

Works up to the reception of HI_DCI0.request at the UE-PNF. Sometimes Msg3...

Works up to the reception of HI_DCI0.request at the UE-PNF. Sometimes Msg3 arrives later than expected at the eNB-VNF.
parent 17baaaa1
...@@ -1933,6 +1933,55 @@ target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES}) ...@@ -1933,6 +1933,55 @@ target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${T_LIB}) target_link_libraries (lte-softmodem-nos1 ${T_LIB})
# lte-softmodem-stub-nos1 is both eNB and UE implementation
###################################################
add_executable(lte-softmodem-stub-nos1
${rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem-stub.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
#${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
#${GTPU_need_ITTI}
${RTAI_SOURCE}
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
${T_SOURCE}
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries (lte-softmodem-stub-nos1
-Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB
-Wl,--end-group z dl)
target_link_libraries (lte-softmodem-stub-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-stub-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
target_link_libraries (lte-softmodem-stub-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-stub-nos1 ${T_LIB})
# lte-softmodem-stub is both eNB and UE implementation # lte-softmodem-stub is both eNB and UE implementation
################################################### ###################################################
......
...@@ -503,7 +503,7 @@ function main() { ...@@ -503,7 +503,7 @@ function main() {
if [ "$NOS1" = "1" ] ; then if [ "$NOS1" = "1" ] ; then
lte_build_dir=lte_noS1_build_oai lte_build_dir=lte_noS1_build_oai
#lte_exec=lte-softmodem-nos1 #lte_exec=lte-softmodem-nos1
lte_exec=lte-softmodem-stub lte_exec=lte-softmodem-stub-nos1
else else
lte_build_dir=lte_build_oai lte_build_dir=lte_build_oai
#lte_exec=lte-softmodem #lte_exec=lte-softmodem
......
...@@ -51,6 +51,9 @@ extern void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, nfapi_ ...@@ -51,6 +51,9 @@ extern void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, nfapi_
extern uint8_t nfapi_mode; extern uint8_t nfapi_mode;
extern int timer_subframe;
extern int timer_frame;
nfapi_tx_request_pdu_t* tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus] nfapi_tx_request_pdu_t* tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus]
...@@ -1921,6 +1924,7 @@ int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind) ...@@ -1921,6 +1924,7 @@ int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind)
ind->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! ind->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
ind->header.message_id = NFAPI_RX_ULSCH_INDICATION; ind->header.message_id = NFAPI_RX_ULSCH_INDICATION;
LOG_I(MAC, "Panos-D: oai_nfapi_rx_ind 1 TIMER SFN/SF:%d.%d \n", timer_frame, timer_subframe);
int retval = nfapi_pnf_p7_rx_ind(p7_config_g, ind); int retval = nfapi_pnf_p7_rx_ind(p7_config_g, ind);
//LOG_D(PHY,"%s() SFN/SF:%d pdus:%d retval:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rx_indication_body.number_of_pdus, retval); //LOG_D(PHY,"%s() SFN/SF:%d pdus:%d retval:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rx_indication_body.number_of_pdus, retval);
......
...@@ -1362,6 +1362,7 @@ void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port) ...@@ -1362,6 +1362,7 @@ void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port)
vnf.p7_vnfs[0].timing_window = 32; vnf.p7_vnfs[0].timing_window = 32;
vnf.p7_vnfs[0].periodic_timing_enabled = 1; vnf.p7_vnfs[0].periodic_timing_enabled = 1;
// Panos:
vnf.p7_vnfs[0].aperiodic_timing_enabled = 1; vnf.p7_vnfs[0].aperiodic_timing_enabled = 1;
vnf.p7_vnfs[0].periodic_timing_period = 10; vnf.p7_vnfs[0].periodic_timing_period = 10;
......
...@@ -321,7 +321,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP, ...@@ -321,7 +321,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
"Transmission on secondary CCs is not supported yet\n"); "Transmission on secondary CCs is not supported yet\n");
if (UE_mode == PRACH) { if (UE_mode == PRACH) {
LOG_I(MAC, "Panos-D: ue_get_rach 3"); LOG_I(MAC, "Panos-D: ue_get_rach 3, RA_active value: %d", UE_mac_inst[module_idP].RA_active);
if (UE_mac_inst[module_idP].radioResourceConfigCommon) { if (UE_mac_inst[module_idP].radioResourceConfigCommon) {
rach_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->rach_ConfigCommon; rach_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->rach_ConfigCommon;
} else { } else {
......
...@@ -547,7 +547,7 @@ void UL_indication(UL_IND_t *UL_info) ...@@ -547,7 +547,7 @@ void UL_indication(UL_IND_t *UL_info)
IF_Module_t *ifi = if_inst[module_id]; IF_Module_t *ifi = if_inst[module_id];
eNB_MAC_INST *mac = RC.mac[module_id]; eNB_MAC_INST *mac = RC.mac[module_id];
LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n", LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n",
UL_info->frame,UL_info->subframe, UL_info->frame,UL_info->subframe,
module_id,CC_id, module_id,CC_id,
UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs); UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "openair2/LAYER2/MAC/proto.h" #include "openair2/LAYER2/MAC/proto.h"
//#include "openair2/LAYER2/MAC/vars.h" //#include "openair2/LAYER2/MAC/vars.h"
#include "openair1/SCHED/defs.h" #include "openair1/SCHED/defs.h"
#include "nfapi/nfapi_interface.h"
//#include "common/ran_context.h" //#include "common/ran_context.h"
#include "openair2/PHY_INTERFACE/phy_stub_UE.h" #include "openair2/PHY_INTERFACE/phy_stub_UE.h"
...@@ -16,19 +17,24 @@ ...@@ -16,19 +17,24 @@
//#include "nfapi.h" //#include "nfapi.h"
//#include "nfapi_pnf.h" //#include "nfapi_pnf.h"
extern int oai_nfapi_crc_indication(nfapi_crc_indication_t *crc_ind);
extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
//extern uint8_t nfapi_pnf; //extern uint8_t nfapi_pnf;
//UL_IND_t *UL_INFO; //UL_IND_t *UL_INFO;
extern nfapi_tx_request_pdu_t* tx_request_pdu[1023][10][10]; extern nfapi_tx_request_pdu_t* tx_request_pdu[1023][10][10];
//extern int timer_subframe;
//extern int timer_frame;
void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id); void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
void Msg3_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id); void Msg3_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND_t* UL_INFO, uint8_t *ulsch_buffer, uint16_t buflen, uint16_t rnti) void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND_t* UL_INFO, uint8_t *ulsch_buffer, uint16_t buflen, uint16_t rnti, int index)
{ {
nfapi_rx_indication_pdu_t *pdu; nfapi_rx_indication_pdu_t *pdu;
...@@ -46,7 +52,15 @@ void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND ...@@ -46,7 +52,15 @@ void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND
//eNB->UL_INFO.rx_ind.sfn_sf = frame<<4| subframe; //eNB->UL_INFO.rx_ind.sfn_sf = frame<<4| subframe;
//eNB->UL_INFO.rx_ind.rx_indication_body.tl.tag = NFAPI_RX_INDICATION_BODY_TAG; //eNB->UL_INFO.rx_ind.rx_indication_body.tl.tag = NFAPI_RX_INDICATION_BODY_TAG;
pdu = &UL_INFO->rx_ind.rx_indication_body.rx_pdu_list[UL_INFO->rx_ind.rx_indication_body.number_of_pdus]; UL_INFO->rx_ind.sfn_sf = frame<<4| subframe;
UL_INFO->rx_ind.header.message_id = NFAPI_RX_ULSCH_INDICATION;
UL_INFO->rx_ind.rx_indication_body.tl.tag = NFAPI_RX_INDICATION_BODY_TAG;
// Panos: Remove
//UL_INFO->rach_ind.rach_indication_body.preamble_list = (nfapi_preamble_pdu_t*)malloc(UL_INFO->rach_ind.rach_indication_body.number_of_preambles*sizeof(nfapi_preamble_pdu_t));
//pdu = &UL_INFO->rx_ind.rx_indication_body.rx_pdu_list[UL_INFO->rx_ind.rx_indication_body.number_of_pdus];
pdu = &UL_INFO->rx_ind.rx_indication_body.rx_pdu_list[index];
// pdu->rx_ue_information.handle = eNB->ulsch[UE_id]->handle; // pdu->rx_ue_information.handle = eNB->ulsch[UE_id]->handle;
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
...@@ -136,18 +150,26 @@ void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_I ...@@ -136,18 +150,26 @@ void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_I
} }
void fill_crc_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t crc_flag) { void fill_crc_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t crc_flag, int index, uint16_t rnti) {
pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex); pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
nfapi_crc_indication_pdu_t *pdu = &UL_INFO->crc_ind.crc_indication_body.crc_pdu_list[UL_INFO->crc_ind.crc_indication_body.number_of_crcs];
//nfapi_crc_indication_pdu_t *pdu = &UL_INFO->crc_ind.crc_indication_body.crc_pdu_list[UL_INFO->crc_ind.crc_indication_body.number_of_crcs];
nfapi_crc_indication_pdu_t *pdu = &UL_INFO->crc_ind.crc_indication_body.crc_pdu_list[index];
//eNB->UL_INFO.crc_ind.sfn_sf = frame<<4 | subframe; //eNB->UL_INFO.crc_ind.sfn_sf = frame<<4 | subframe;
//eNB->UL_INFO.crc_ind.crc_indication_body.tl.tag = NFAPI_CRC_INDICATION_BODY_TAG; //eNB->UL_INFO.crc_ind.crc_indication_body.tl.tag = NFAPI_CRC_INDICATION_BODY_TAG;
UL_INFO->crc_ind.sfn_sf = frame<<4| subframe;
UL_INFO->crc_ind.header.message_id = NFAPI_CRC_INDICATION;
UL_INFO->crc_ind.crc_indication_body.tl.tag = NFAPI_CRC_INDICATION_BODY_TAG;
pdu->instance_length = 0; // don't know what to do with this pdu->instance_length = 0; // don't know what to do with this
// pdu->rx_ue_information.handle = handle; // pdu->rx_ue_information.handle = handle;
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
pdu->rx_ue_information.rnti = UE_mac_inst[Mod_id].crnti;
//pdu->rx_ue_information.rnti = UE_mac_inst[Mod_id].crnti;
pdu->rx_ue_information.rnti = rnti;
pdu->crc_indication_rel8.tl.tag = NFAPI_CRC_INDICATION_REL8_TAG; pdu->crc_indication_rel8.tl.tag = NFAPI_CRC_INDICATION_REL8_TAG;
pdu->crc_indication_rel8.crc_flag = crc_flag; pdu->crc_indication_rel8.crc_flag = crc_flag;
...@@ -486,7 +508,7 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id, ...@@ -486,7 +508,7 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id,
void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
nfapi_ul_config_request_pdu_t *ul_config_pdu, nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,uint8_t subframe,uint8_t srs_present) uint16_t frame,uint8_t subframe,uint8_t srs_present, int index)
{ {
nfapi_ul_config_ulsch_pdu_rel8_t *rel8 = &ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8; nfapi_ul_config_ulsch_pdu_rel8_t *rel8 = &ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8;
LOG_I(MAC, "Panos-D: handle_nfapi_ul_pdu_UE_MAC 1 \n"); LOG_I(MAC, "Panos-D: handle_nfapi_ul_pdu_UE_MAC 1 \n");
...@@ -509,8 +531,8 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -509,8 +531,8 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
if(buflen>0){ if(buflen>0){
if(UE_mac_inst[Mod_id].first_ULSCH_Tx == 1){ // Msg3 case if(UE_mac_inst[Mod_id].first_ULSCH_Tx == 1){ // Msg3 case
LOG_I(MAC, "Panos-D: handle_nfapi_ul_pdu_UE_MAC 2.2 \n"); LOG_I(MAC, "Panos-D: handle_nfapi_ul_pdu_UE_MAC 2.2 \n");
//fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0); fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti);
fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,buflen, rnti); fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,buflen, rnti, index);
Msg3_transmitted(Mod_id, 0, frame, 0); Msg3_transmitted(Mod_id, 0, frame, 0);
// Panos: This should be done after the reception of the respective hi_dci0 // Panos: This should be done after the reception of the respective hi_dci0
...@@ -519,8 +541,8 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -519,8 +541,8 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
else { else {
LOG_I(MAC, "Panos-D: handle_nfapi_ul_pdu_UE_MAC 2.3 \n"); LOG_I(MAC, "Panos-D: handle_nfapi_ul_pdu_UE_MAC 2.3 \n");
ue_get_sdu( Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode); ue_get_sdu( Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode);
//fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0); fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti);
fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_buffer,buflen, rnti); fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_buffer,buflen, rnti, index);
} }
} }
} }
...@@ -536,15 +558,15 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -536,15 +558,15 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
uint8_t access_mode=SCHEDULED_ACCESS; uint8_t access_mode=SCHEDULED_ACCESS;
if(buflen>0){ if(buflen>0){
if(UE_mac_inst[Mod_id].first_ULSCH_Tx == 1){ // Msg3 case if(UE_mac_inst[Mod_id].first_ULSCH_Tx == 1){ // Msg3 case
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0); fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti);
fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,buflen, rnti); fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,buflen, rnti, index);
Msg3_transmitted(Mod_id, 0, frame, 0); Msg3_transmitted(Mod_id, 0, frame, 0);
//UE_mac_inst[Mod_id].first_ULSCH_Tx = 0; //UE_mac_inst[Mod_id].first_ULSCH_Tx = 0;
} }
else { else {
ue_get_sdu( Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode); ue_get_sdu( Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode);
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0); fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti);
fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_buffer,buflen, rnti); fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_buffer,buflen, rnti, index);
} }
} }
...@@ -565,15 +587,15 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -565,15 +587,15 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
uint8_t access_mode=SCHEDULED_ACCESS; uint8_t access_mode=SCHEDULED_ACCESS;
if(buflen>0){ if(buflen>0){
if(UE_mac_inst[Mod_id].first_ULSCH_Tx == 1){ // Msg3 case if(UE_mac_inst[Mod_id].first_ULSCH_Tx == 1){ // Msg3 case
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0); fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti);
fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,buflen, rnti); fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,buflen, rnti, index);
Msg3_transmitted(Mod_id, 0, frame, 0); Msg3_transmitted(Mod_id, 0, frame, 0);
//UE_mac_inst[Mod_id].first_ULSCH_Tx = 0; //UE_mac_inst[Mod_id].first_ULSCH_Tx = 0;
} }
else { else {
ue_get_sdu( Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode); ue_get_sdu( Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode);
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0); fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti);
fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_buffer,buflen, rnti); fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_buffer,buflen, rnti, index);
} }
} }
fill_ulsch_cqi_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti); fill_ulsch_cqi_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti);
...@@ -593,15 +615,15 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -593,15 +615,15 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
uint8_t access_mode=SCHEDULED_ACCESS; uint8_t access_mode=SCHEDULED_ACCESS;
if(buflen>0){ if(buflen>0){
if(UE_mac_inst[Mod_id].first_ULSCH_Tx == 1){ // Msg3 case if(UE_mac_inst[Mod_id].first_ULSCH_Tx == 1){ // Msg3 case
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0); fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti);
fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,buflen, rnti); fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,buflen, rnti, index);
Msg3_transmitted(Mod_id, 0, frame, 0); Msg3_transmitted(Mod_id, 0, frame, 0);
//UE_mac_inst[Mod_id].first_ULSCH_Tx = 0; //UE_mac_inst[Mod_id].first_ULSCH_Tx = 0;
} }
else { else {
ue_get_sdu( Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode); ue_get_sdu( Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode);
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0); fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti);
fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_buffer,buflen, rnti); fill_rx_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_buffer,buflen, rnti, index);
} }
} }
...@@ -666,8 +688,9 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -666,8 +688,9 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req) int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req, int timer_frame, int timer_subframe)
{ {
if (req!=NULL && req->ul_config_request_body.ul_config_pdu_list !=NULL){
LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n", LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n",
__FUNCTION__, __FUNCTION__,
NFAPI_SFNSF2DEC(req->sfn_sf), NFAPI_SFNSF2DEC(req->sfn_sf),
...@@ -700,6 +723,11 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req) ...@@ -700,6 +723,11 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req)
int sfn = NFAPI_SFNSF2SFN(req->sfn_sf); int sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
int sf = NFAPI_SFNSF2SF(req->sfn_sf); int sf = NFAPI_SFNSF2SF(req->sfn_sf);
//int sfn = timer_frame;
//int sf = timer_subframe;
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 1, SFN/SF in REQ:%d.%d, SFN/SF of PNF counter:%d.%d \n", sfn, sf, timer_frame, timer_subframe);
//struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; //struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
//eNB_rxtx_proc_t *proc = &eNB->proc.proc_rxtx[0]; //eNB_rxtx_proc_t *proc = &eNB->proc.proc_rxtx[0];
...@@ -710,7 +738,10 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req) ...@@ -710,7 +738,10 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req)
//Panos: Not sure whether we should put the memory allocation here. //Panos: Not sure whether we should put the memory allocation here.
//*** Note we should find the right place to call free(UL_INFO). //*** Note we should find the right place to call free(UL_INFO).
UL_INFO = (UL_IND_t*)malloc(sizeof(UL_IND_t)); UL_INFO = (UL_IND_t*)malloc(sizeof(UL_IND_t));
//UL_INFO->rach_ind.rach_indication_body.preamble_list = (nfapi_preamble_pdu_t*)malloc(UL_INFO->rach_ind.rach_indication_body.number_of_preambles*sizeof(nfapi_preamble_pdu_t));
UL_INFO->rx_ind.rx_indication_body.rx_pdu_list = (nfapi_rx_indication_pdu_t*)malloc(req->ul_config_request_body.number_of_pdus*sizeof(nfapi_rx_indication_pdu_t));
UL_INFO->crc_ind.crc_indication_body.crc_pdu_list = (nfapi_crc_indication_pdu_t*)malloc(req->ul_config_request_body.number_of_pdus*sizeof(nfapi_crc_indication_pdu_t));
//Panos: Additional checks needed here to check if the UE is in PRACH mode. //Panos: Additional checks needed here to check if the UE is in PRACH mode.
/*uint8_t is_rach = req->ul_config_request_body.rach_prach_frequency_resources; /*uint8_t is_rach = req->ul_config_request_body.rach_prach_frequency_resources;
...@@ -734,7 +765,7 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req) ...@@ -734,7 +765,7 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req)
{ {
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() sfn/sf:%d PDU[%d] size:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), i, ul_config_pdu_list[i].pdu_size); //NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() sfn/sf:%d PDU[%d] size:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), i, ul_config_pdu_list[i].pdu_size);
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.0 \n"); LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.0 #PDUs: %d \n", i<req->ul_config_request_body.number_of_pdus);
if ( if (
req->ul_config_request_body.ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE || req->ul_config_request_body.ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE ||
req->ul_config_request_body.ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE || req->ul_config_request_body.ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE ||
...@@ -748,15 +779,80 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req) ...@@ -748,15 +779,80 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req)
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() handle_nfapi_ul_pdu() for PDU:%d\n", __FUNCTION__, i); //NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() handle_nfapi_ul_pdu() for PDU:%d\n", __FUNCTION__, i);
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.1 \n"); LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.1 \n");
handle_nfapi_ul_pdu_UE_MAC(Mod_id,&req->ul_config_request_body.ul_config_pdu_list[i],sfn,sf,req->ul_config_request_body.srs_present); handle_nfapi_ul_pdu_UE_MAC(Mod_id,&req->ul_config_request_body.ul_config_pdu_list[i],sfn,sf,req->ul_config_request_body.srs_present, i);
/*if (UL_INFO->crc_ind.crc_indication_body.number_of_crcs>0)
{
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
oai_nfapi_crc_indication(&UL_INFO->crc_ind);
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.2 \n");
UL_INFO->crc_ind.crc_indication_body.number_of_crcs = 0;
}
if (UL_INFO->rx_ind.rx_indication_body.number_of_pdus>0)
{
//LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf));
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.3 \n");
oai_nfapi_rx_ind(&UL_INFO->rx_ind);
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.4 \n");
UL_INFO->rx_ind.rx_indication_body.number_of_pdus = 0;
}*/
/*if (UL_INFO->rx_ind.rx_indication_body.number_of_pdus>0)
{
//LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf));
oai_nfapi_rx_ind(&UL_INFO->rx_ind);
oai_nfapi_crc_indication(&UL_INFO->crc_ind);
//UL_INFO->rx_ind.rx_indication_body.number_of_pdus = 0;
}*/
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 3 \n"); LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 3 \n");
} }
else else
{ {
//NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() PDU:%i UNKNOWN type :%d\n", __FUNCTION__, i, ul_config_pdu_list[i].pdu_type); //NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() PDU:%i UNKNOWN type :%d\n", __FUNCTION__, i, ul_config_pdu_list[i].pdu_type);
} }
} }
if (UL_INFO->crc_ind.crc_indication_body.number_of_crcs>0)
{
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.2, SFN/SF in REQ:%d.%d, SFN/SF of PNF counter:%d.%d \n", sfn, sf, timer_frame, timer_subframe);
oai_nfapi_crc_indication(&UL_INFO->crc_ind);
//LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.2 \n");
UL_INFO->crc_ind.crc_indication_body.number_of_crcs = 0;
}
if (UL_INFO->rx_ind.rx_indication_body.number_of_pdus>0)
{
//LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf));
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.3, SFN/SF in REQ:%d.%d, SFN/SF of PNF counter:%d.%d \n", sfn, sf, timer_frame, timer_subframe);
//LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.3 \n");
oai_nfapi_rx_ind(&UL_INFO->rx_ind);
LOG_I(MAC, "Panos-D: ul_config_req_UE_MAC 2.4 \n");
UL_INFO->rx_ind.rx_indication_body.number_of_pdus = 0;
}
// Free ul_config_request
/*if(req->ul_config_request_body.ul_config_pdu_list != NULL){
free(req->ul_config_request_body.ul_config_pdu_list);
req->ul_config_request_body.ul_config_pdu_list = NULL;
}
free(req);
req = NULL;*/
// Free UL_INFO messages
if(UL_INFO->crc_ind.crc_indication_body.crc_pdu_list != NULL){
free(UL_INFO->crc_ind.crc_indication_body.crc_pdu_list);
UL_INFO->crc_ind.crc_indication_body.crc_pdu_list = NULL;
}
if(UL_INFO->rx_ind.rx_indication_body.rx_pdu_list != NULL){
free(UL_INFO->rx_ind.rx_indication_body.rx_pdu_list);
UL_INFO->rx_ind.rx_indication_body.rx_pdu_list = NULL;
}
free(UL_INFO); free(UL_INFO);
UL_INFO = NULL;
}
return 0; return 0;
} }
...@@ -935,7 +1031,10 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req) ...@@ -935,7 +1031,10 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req)
req = NULL; req = NULL;
return 0; return 0;
} }
else { else if(req!=NULL){
//LOG_I(MAC, "Panos-D: dl_config_req_UE_MAC probably dummy DL_Config \n");
//free(req);
//req = NULL;
return -1; return -1;
} }
...@@ -1005,7 +1104,7 @@ int memcpy_dl_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request ...@@ -1005,7 +1104,7 @@ int memcpy_dl_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
module_id_t Mod_id = 0; //Panos: Currently static (only for one UE) but this should change. module_id_t Mod_id = 0; //Panos: Currently static (only for one UE) but this should change.
UE_mac_inst[Mod_id].dl_config_req = (nfapi_dl_config_request_t*)malloc(sizeof(nfapi_dl_config_request_t)); UE_mac_inst[Mod_id].dl_config_req = (nfapi_dl_config_request_t*)malloc(sizeof(nfapi_dl_config_request_t));
LOG_I(MAC, "Panos-D: memcpy_dl_config_req 1 \n"); //LOG_I(MAC, "Panos-D: memcpy_dl_config_req 1 \n");
//UE_mac_inst[Mod_id].dl_config_req->header = req->header; //UE_mac_inst[Mod_id].dl_config_req->header = req->header;
...@@ -1114,7 +1213,23 @@ int memcpy_tx_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req) ...@@ -1114,7 +1213,23 @@ int memcpy_tx_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
int memcpy_hi_dci0_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req) int memcpy_hi_dci0_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req)
{ {
module_id_t Mod_id = 0; //Panos: Currently static (only for one UE) but this should change. module_id_t Mod_id = 0; //Panos: Currently static (only for one UE) but this should change.
UE_mac_inst[Mod_id].hi_dci0_req = req; UE_mac_inst[Mod_id].hi_dci0_req = (nfapi_hi_dci0_request_t*)malloc(sizeof(nfapi_hi_dci0_request_t));
UE_mac_inst[Mod_id].hi_dci0_req->sfn_sf = req->sfn_sf;
UE_mac_inst[Mod_id].hi_dci0_req->vendor_extension = req->vendor_extension;
UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.number_of_dci = req->hi_dci0_request_body.number_of_dci;
UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.number_of_hi = req->hi_dci0_request_body.number_of_hi;
UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.sfnsf = req->hi_dci0_request_body.sfnsf;
UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.tl = req->hi_dci0_request_body.tl;
int total_pdus = UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.number_of_dci + UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.number_of_dci;
//(nfapi_ul_config_request_pdu_t*) malloc(req->ul_config_request_body.number_of_pdus*sizeof(nfapi_ul_config_request_pdu_t));
UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.hi_dci0_pdu_list = (nfapi_hi_dci0_request_pdu_t*) malloc(total_pdus*sizeof(nfapi_hi_dci0_request_pdu_t));
LOG_I(MAC, "Panos-D: memcpy_hi_dci0_req 2 \n");
//module_id_t Mod_id = 0; //Panos: Currently static (only for one UE) but this should change.
//UE_mac_inst[Mod_id].hi_dci0_req = req;
return 0; return 0;
} }
......
...@@ -47,7 +47,7 @@ void send_nfapi_UL_indications(UL_IND_t UL_INFO); ...@@ -47,7 +47,7 @@ void send_nfapi_UL_indications(UL_IND_t UL_INFO);
//void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe); //void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe);
void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t *ulsch_buffer, uint16_t buflen, uint16_t rnti); void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t *ulsch_buffer, uint16_t buflen, uint16_t rnti, int index);
// This function should be indicating directly to the eNB when there is a planned scheduling request at the MAC layer // This function should be indicating directly to the eNB when there is a planned scheduling request at the MAC layer
...@@ -56,7 +56,7 @@ void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_I ...@@ -56,7 +56,7 @@ void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_I
// In our case the this function will be always indicating ACK to the MAC of the eNB (i.e. always assuming) // In our case the this function will be always indicating ACK to the MAC of the eNB (i.e. always assuming)
// successful decoding. // successful decoding.
void fill_crc_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t crc_flag); void fill_crc_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t crc_flag, int index, uint16_t rnti);
void fill_rach_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t ra_PreambleIndex, uint16_t ra_RNTI); void fill_rach_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t ra_PreambleIndex, uint16_t ra_RNTI);
...@@ -71,11 +71,11 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id, int frame, int subframe, UL_IND ...@@ -71,11 +71,11 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id, int frame, int subframe, UL_IND
/*uint8_t tdd_mapping_mode, /*uint8_t tdd_mapping_mode,
uint16_t tdd_multiplexing_mask*/); uint16_t tdd_multiplexing_mask*/);
int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req); int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req, int frame, int subframe);
void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
nfapi_ul_config_request_pdu_t *ul_config_pdu, nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,uint8_t subframe,uint8_t srs_present); uint16_t frame,uint8_t subframe,uint8_t srs_present, int index);
int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req); int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req);
......
...@@ -128,7 +128,7 @@ int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex ...@@ -128,7 +128,7 @@ int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
uint8_t nfapi_mode = 3; uint8_t nfapi_mode = 3;
uint16_t sf_ahead=4; uint16_t sf_ahead=2;
char *emul_iface; char *emul_iface;
...@@ -1228,7 +1228,9 @@ int main( int argc, char **argv ) ...@@ -1228,7 +1228,9 @@ int main( int argc, char **argv )
printf("cannot create ITTI tasks\n"); printf("cannot create ITTI tasks\n");
exit(-1); // need a softer mode exit(-1); // need a softer mode
} }
// UE_config_stub_pnf(); if(nfapi_mode==3){ //Panos: Here we should add another nfapi_mode for the case of Supervised LTE-D2D
UE_config_stub_pnf();
}
printf("ITTI tasks created\n"); printf("ITTI tasks created\n");
} }
else { else {
...@@ -1349,7 +1351,7 @@ int main( int argc, char **argv ) ...@@ -1349,7 +1351,7 @@ int main( int argc, char **argv )
if (nfapi_mode<3) // VNF if (nfapi_mode<3) // VNF
wait_nfapi_init("main?"); wait_nfapi_init("main?");
printf("START MAIN THREADS\n"); printf("START MAIN THREADS, nfapi_mode:%d \n", nfapi_mode);
// start the main threads // start the main threads
if (UE_flag == 1) { if (UE_flag == 1) {
...@@ -1366,9 +1368,11 @@ int main( int argc, char **argv ) ...@@ -1366,9 +1368,11 @@ int main( int argc, char **argv )
//phy_stub_ticking = (SF_ticking*)malloc(sizeof(SF_ticking)); //phy_stub_ticking = (SF_ticking*)malloc(sizeof(SF_ticking));