diff --git a/common/config/config_load_configmodule.c b/common/config/config_load_configmodule.c index 1f85e9fee4..ed18e49f49 100644 --- a/common/config/config_load_configmodule.c +++ b/common/config/config_load_configmodule.c @@ -44,7 +44,7 @@ #include "../utils/LOG/log.h" #define CONFIG_SHAREDLIBFORMAT "libparams_%s.so" -extern uint8_t nfapi_mode; +uint8_t nfapi_mode=0; int load_config_sharedlib(configmodule_interface_t *cfgptr) { void *lib_handle; diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index b0f85592d3..81c7e229d5 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -90,7 +90,7 @@ pthread_cond_t nfapi_sync_cond; pthread_mutex_t nfapi_sync_mutex; int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex -uint8_t nfapi_mode = 0; // Default to monolithic mode +extern uint8_t nfapi_mode; // Default to monolithic mode,set in config_load_configmodule.c pthread_cond_t sync_cond; pthread_mutex_t sync_mutex; diff --git a/nfapi/oai_integration/nfapi_pnf.c b/nfapi/oai_integration/nfapi_pnf.c index 44df30448e..7e70a8bc45 100644 --- a/nfapi/oai_integration/nfapi_pnf.c +++ b/nfapi/oai_integration/nfapi_pnf.c @@ -1273,7 +1273,8 @@ int pnf_phy_ul_dci_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, if (req->ul_dci_pdu_list[i].PDUType == 0) { //LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d] - NFAPI_HI_DCI0_DCI_PDU_TYPE\n", NFAPI_SFNSF2DEC(req->sfn_sf), i); nfapi_nr_ul_dci_request_pdus_t *ul_dci_req_pdu = &req->ul_dci_pdu_list[i]; - handle_nfapi_nr_ul_dci_pdu(gNB, req->SFN, req->Slot, ul_dci_req_pdu); + int SFN=req->SFN+2; + handle_nfapi_nr_ul_dci_pdu(gNB, SFN, req->Slot, ul_dci_req_pdu); } else { LOG_E(PHY,"[PNF] UL_DCI_REQ sfn_slot:%d PDU[%d] - unknown pdu type:%d\n", NFAPI_SFNSLOT2DEC(req->SFN, req->Slot), i, req->ul_dci_pdu_list[i].PDUType); diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index 98b621529b..dd77d1a117 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -1597,7 +1597,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return retval; } -int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_tti_request_t *dl_config_req) +int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { //LOG_I(PHY, "sfn:%d,slot:%d\n",dl_config_req->SFN,dl_config_req->Slot); //printf("\nEntering oai_nfapi_nr_dl_config_req sfn:%d,slot:%d\n",dl_config_req->SFN,dl_config_req->Slot); diff --git a/nfapi/open-nFAPI/pnf/src/pnf_p7.c b/nfapi/open-nFAPI/pnf/src/pnf_p7.c index 9fc287d3e6..e79e5c3f32 100644 --- a/nfapi/open-nFAPI/pnf/src/pnf_p7.c +++ b/nfapi/open-nFAPI/pnf/src/pnf_p7.c @@ -1038,7 +1038,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl if(pnf_p7->_public.dl_tti_req_fn) { - //printf("\nIn pnf_phy_dl_tti_req VNF: sfn %d slot %d, PNF: sfn %d slot %d slot buffer sfn %d %d \n",tx_slot_buffer->dl_tti_req->SFN,tx_slot_buffer->dl_tti_req->Slot,pnf_p7->sfn,pnf_p7->slot); + printf("\nIn pnf_phy_dl_tti_req VNF: sfn %d slot %d, PNF: sfn %d slot %d \n",tx_slot_buffer->dl_tti_req->SFN,tx_slot_buffer->dl_tti_req->Slot,pnf_p7->sfn,pnf_p7->slot); (pnf_p7->_public.dl_tti_req_fn)(NULL, &(pnf_p7->_public), tx_slot_buffer->dl_tti_req); } @@ -1060,8 +1060,9 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl if(tx_slot_buffer->ul_dci_req!= 0) { if(pnf_p7->_public.ul_dci_req_fn) - (pnf_p7->_public.ul_dci_req_fn)(NULL, &(pnf_p7->_public), tx_slot_buffer->ul_dci_req); - + { printf("\nIn pnf_phy_Ul_DCI_req VNF: sfn %d slot %d, PNF: sfn %d slot %d\n",tx_slot_buffer->ul_dci_req->SFN,tx_slot_buffer->ul_dci_req->Slot,pnf_p7->sfn,pnf_p7->slot); + (pnf_p7->_public.ul_dci_req_fn)(NULL, &(pnf_p7->_public), tx_slot_buffer->ul_dci_req); + } //deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7); } else @@ -1125,8 +1126,12 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl if(slot_buffer->ul_tti_req != 0) { if(pnf_p7->_public.ul_tti_req_fn) + { struct timespec curr; + // clock_gettime(CLOCK_MONOTONIC,&curr); + // printf("\ntime at which ul_tti handle fn %ld.%ld \n",curr.tv_sec,curr.tv_nsec); + printf("\nIn pnf_phy_ul_tti_req VNF: sfn %d slot %d, PNF: sfn %d slot %d \n",slot_buffer->ul_tti_req->SFN,slot_buffer->ul_tti_req->Slot,pnf_p7->sfn,pnf_p7->slot); (pnf_p7->_public.ul_tti_req_fn)(NULL, &(pnf_p7->_public), slot_buffer->ul_tti_req); - + } //deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7); } else @@ -2720,31 +2725,6 @@ void pnf_nr_dispatch_p7_message(void *pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7 case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST: pnf_handle_tx_data_request(pRecvMsg, recvMsgLen, pnf_p7); break; - #if 0 - case NFAPI_DL_CONFIG_REQUEST: - pnf_handle_dl_config_request(pRecvMsg, recvMsgLen, pnf_p7); - break; - - case NFAPI_UL_CONFIG_REQUEST: - pnf_handle_ul_config_request(pRecvMsg, recvMsgLen, pnf_p7); - break; - - case NFAPI_HI_DCI0_REQUEST: - pnf_handle_hi_dci0_request(pRecvMsg, recvMsgLen, pnf_p7); - break; - - case NFAPI_TX_REQUEST: - pnf_handle_tx_request(pRecvMsg, recvMsgLen, pnf_p7); - break; - #endif - case NFAPI_LBT_DL_CONFIG_REQUEST: - pnf_handle_lbt_dl_config_request(pRecvMsg, recvMsgLen, pnf_p7); - break; - - case NFAPI_UE_RELEASE_REQUEST: - pnf_handle_ue_release_request(pRecvMsg, recvMsgLen, pnf_p7); - break; - default: { if(header.message_id >= NFAPI_VENDOR_EXT_MSG_MIN && diff --git a/openair1/SCHED/nfapi_lte_dummy.c b/openair1/SCHED/nfapi_lte_dummy.c index d857f0acac..6b17043ca6 100644 --- a/openair1/SCHED/nfapi_lte_dummy.c +++ b/openair1/SCHED/nfapi_lte_dummy.c @@ -20,7 +20,7 @@ void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot, int l1_north_init_gNB(void){} uint8_t slot_ahead=6; -uint8_t nfapi_mode=0; +//uint8_t nfapi_mode=0; NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {} void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB, diff --git a/openair1/SCHED/nfapi_nr_dummy.c b/openair1/SCHED/nfapi_nr_dummy.c index f3783c00f4..e3664ec580 100644 --- a/openair1/SCHED/nfapi_nr_dummy.c +++ b/openair1/SCHED/nfapi_nr_dummy.c @@ -20,7 +20,7 @@ void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot, int l1_north_init_gNB(void){} uint8_t slot_ahead=6; -uint8_t nfapi_mode=0; +//uint8_t nfapi_mode=0; NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {} void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB, diff --git a/openair1/SCHED_NR/fapi_nr_l1.c b/openair1/SCHED_NR/fapi_nr_l1.c index 225a357c55..8462cd53df 100644 --- a/openair1/SCHED_NR/fapi_nr_l1.c +++ b/openair1/SCHED_NR/fapi_nr_l1.c @@ -35,10 +35,10 @@ #include "PHY/NR_TRANSPORT/nr_dci.h" #include "nfapi/oai_integration/vendor_ext.h" -int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_tti_request_t *dl_config_req); -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req); -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req); -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req); +extern int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req); +extern int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req); +extern int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req); +extern int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req); extern uint8_t nfapi_mode; @@ -234,22 +234,22 @@ if(nfapi_mode != 2) } } -if(nfapi_mode != 0 && number_ul_tti_pdu>0) -{ - oai_nfapi_ul_tti_req(UL_tti_req); -} +// if(nfapi_mode != 0 && number_ul_tti_pdu>0) +// { +// oai_nfapi_ul_tti_req(UL_tti_req); +// } - if (nfapi_mode != 0 && Sched_INFO->UL_dci_req->numPdus!=0) - { - oai_nfapi_ul_dci_req(Sched_INFO->UL_dci_req); - }//Only DL +// if (nfapi_mode != 0 && Sched_INFO->UL_dci_req->numPdus!=0) +// { +// oai_nfapi_ul_dci_req(Sched_INFO->UL_dci_req); +// }//Only DL if (nfapi_mode != 0) { if(Sched_INFO->DL_req->dl_tti_request_body.nPDUs>0) { Sched_INFO->DL_req->SFN = frame; Sched_INFO->DL_req->Slot = slot; - oai_nfapi_nr_dl_config_req(Sched_INFO->DL_req); + oai_nfapi_dl_tti_req(Sched_INFO->DL_req); } if (Sched_INFO->TX_req->Number_of_PDUs > 0) { diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index f969fa11fb..edcaaa0fdc 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -622,7 +622,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) (ulsch_harq->slot == slot_rx) && (ulsch_harq->handled == 0)){ - LOG_D(PHY, "PUSCH detection started in frame %d slot %d\n", + LOG_I(PHY, "PUSCH detection started in frame %d slot %d\n", frame_rx,slot_rx); #ifdef DEBUG_RXDATA diff --git a/openair1/SCHED_NR_UE/harq_nr.c b/openair1/SCHED_NR_UE/harq_nr.c index bf17da9b8c..1083823e6a 100644 --- a/openair1/SCHED_NR_UE/harq_nr.c +++ b/openair1/SCHED_NR_UE/harq_nr.c @@ -295,7 +295,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u /* 38.321 5.4.2.1 2> if the uplink grant was received on PDCCH for the C-RNTI and the HARQ buffer of the identified process is empty */ if ((ulsch->harq_processes[harq_pid]->first_tx == 1) && (rnti_type == _C_RNTI_)) { /* no transmission yet on this process so consider its harq buffer as empty */ - ulsch->harq_processes[harq_pid]->first_tx = 0; + ulsch->harq_processes[harq_pid]->first_tx = 0; ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator = ndi; /* store first value of ndi */ ulsch->harq_processes[harq_pid]->round = 0; ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1; diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index bbe592b914..653fd8eb7d 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1975,7 +1975,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, // do procedures for C-RNTI if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) { - LOG_D(PHY, "DLSCH data reception at nr_slot_rx: %d \n \n", nr_slot_rx); + LOG_I(PHY, "DLSCH data reception at nr_slot_rx: %d \n \n", nr_slot_rx); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); #if UE_TIMING_TRACE diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index c60bc8dd9f..2def4004ef 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -56,7 +56,7 @@ UE_nr_rxtx_proc_t proc; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; double cpuf; -uint8_t nfapi_mode = 0; +//uint8_t nfapi_mode = 0; uint16_t NB_UE_INST = 1; uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3}; diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 2bd70021f7..26f03f9c18 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -60,7 +60,7 @@ #include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/TOOLS/sim.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" -//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" +#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include "PHY/NR_REFSIG/ptrs_nr.h" #include "NR_RRCReconfiguration.h" #define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0)) @@ -81,7 +81,7 @@ double cpuf; int sf_ahead=4 ; int sl_ahead=0; -uint8_t nfapi_mode = 0; +//uint8_t nfapi_mode = 0; uint64_t downlink_frequency[MAX_NUM_CCs][4]; // dummy functions diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c index c7ee863c35..2bccea3235 100644 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c +++ b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c @@ -2,8 +2,11 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { re int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); } int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); } //int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); } -//int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) { return(0); } +int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } +int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); } +int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); } +int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } int32_t get_uldl_offset(int nr_bandP) { return(0); } NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return(NULL);} -int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info) { return(0); } -int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } +// int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info) { return(0); } +// int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } \ No newline at end of file diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c index bfb9150868..c543d42f13 100644 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c +++ b/openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c @@ -2,7 +2,10 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { re int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); } int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); } int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); } -//int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) { return(0); } +int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } + int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); } + int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); } + int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } int32_t get_uldl_offset(int nr_bandP) { return(0); } NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return(NULL);} int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info) { return(0); } diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h index a7150fb2f9..8004fbb6b5 100644 --- a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h @@ -239,6 +239,7 @@ ngap_gNB_config_t ngap_config; uint32_t ngap_generate_gNB_id(void) {return 0;} void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { return;} void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { return;} - +void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { return;} +void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { return;} #endif diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 2a7c51a582..14dc1a8732 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -56,7 +56,7 @@ RAN_CONTEXT_t RC; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; double cpuf; -uint8_t nfapi_mode = 0; +//uint8_t nfapi_mode = 0; uint16_t NB_UE_INST = 1; // needed for some functions diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 1f4db3138a..9ed492b161 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -47,6 +47,7 @@ #include "OCG_vars.h" #include #include +#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #define NR_PRACH_DEBUG 1 @@ -62,7 +63,7 @@ RU_t *ru; double cpuf; extern uint16_t prach_root_sequence_map0_3[838]; openair0_config_t openair0_cfg[MAX_CARDS]; -uint8_t nfapi_mode=0; +//uint8_t nfapi_mode=0; int sl_ahead = 0; //void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe); diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index a96a62f656..8d79633a6f 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -53,7 +53,7 @@ openair0_config_t openair0_cfg[MAX_CARDS]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; double cpuf; -uint8_t nfapi_mode = 0; +//uint8_t nfapi_mode = 0; uint16_t NB_UE_INST = 1; uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3}; uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3}; diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index afebe4ed97..6f2af73a1d 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -60,7 +60,7 @@ uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3}; uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3}; double cpuf; -uint8_t nfapi_mode = 0; +//uint8_t nfapi_mode = 0; uint16_t NB_UE_INST = 1; // needed for some functions diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index bb322e20e8..ac51e47345 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -52,7 +52,7 @@ #include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair2/RRC/NR/MESSAGES/asn1_msg.h" -//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" +#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include "openair2/LAYER2/NR_MAC_UE/mac_proto.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" #include "common/utils/threadPool/thread-pool.h" @@ -77,7 +77,7 @@ int sf_ahead=4 ; int slot_ahead=6 ; int sl_ahead=0; double cpuf; -uint8_t nfapi_mode = 0; +//uint8_t nfapi_mode = 0; uint64_t downlink_frequency[MAX_NUM_CCs][4]; diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c index cc8c62a36d..4d17fe723c 100644 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c +++ b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c @@ -142,6 +142,10 @@ void thread_top_init(char *thread_name, int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0);} int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); } +int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } +int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); } +int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); } +int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 2727fe24db..eb41ae14e6 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -255,8 +255,8 @@ void nr_preprocessor_phytest(module_id_t module_id, sub_frame_t slot, int num_slots_per_tdd) { - if (slot != 2) - return; /* only schedule in slot 1 for now */ + if (slot != 1) + return; /* only schedule in slot 1 for now . DL in nFAPI mode is working when PDCCH and PDSCH are scheduled in even slots */ NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; const int UE_id = 0; const int CC_id = 0; @@ -711,6 +711,7 @@ void schedule_fapi_ul_pdu(int Mod_idP, //Pusch Allocation in frequency domain [TS38.214, sec 6.1.2.2] //Optional Data only included if indicated in pduBitmap + //int8_t harq_id=0;// Hard coding the harq id int8_t harq_id = select_ul_harq_pid(&UE_info->UE_sched_ctrl[UE_id]); if (harq_id < 0) return; NR_UE_ul_harq_t *cur_harq = &UE_info->UE_sched_ctrl[UE_id].ul_harq_processes[harq_id];