Commit 7eb01667 authored by Mahesh's avatar Mahesh

Resolved errors in building phy-simulator

parent 4131d7e5
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include "../utils/LOG/log.h" #include "../utils/LOG/log.h"
#define CONFIG_SHAREDLIBFORMAT "libparams_%s.so" #define CONFIG_SHAREDLIBFORMAT "libparams_%s.so"
extern uint8_t nfapi_mode; uint8_t nfapi_mode=0;
int load_config_sharedlib(configmodule_interface_t *cfgptr) { int load_config_sharedlib(configmodule_interface_t *cfgptr) {
void *lib_handle; void *lib_handle;
......
...@@ -90,7 +90,7 @@ pthread_cond_t nfapi_sync_cond; ...@@ -90,7 +90,7 @@ pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex; pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref 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_cond_t sync_cond;
pthread_mutex_t sync_mutex; pthread_mutex_t sync_mutex;
......
...@@ -1273,7 +1273,8 @@ int pnf_phy_ul_dci_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, ...@@ -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) { 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); //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]; 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 { 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); 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);
......
...@@ -1597,7 +1597,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { ...@@ -1597,7 +1597,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) {
return retval; 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); //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); //printf("\nEntering oai_nfapi_nr_dl_config_req sfn:%d,slot:%d\n",dl_config_req->SFN,dl_config_req->Slot);
......
...@@ -1038,7 +1038,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl ...@@ -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) 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); (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 ...@@ -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(tx_slot_buffer->ul_dci_req!= 0)
{ {
if(pnf_p7->_public.ul_dci_req_fn) 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); //deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7);
} }
else 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 ...@@ -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(slot_buffer->ul_tti_req != 0)
{ {
if(pnf_p7->_public.ul_tti_req_fn) 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); (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); //deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7);
} }
else else
...@@ -2720,31 +2725,6 @@ void pnf_nr_dispatch_p7_message(void *pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7 ...@@ -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: case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST:
pnf_handle_tx_data_request(pRecvMsg, recvMsgLen, pnf_p7); pnf_handle_tx_data_request(pRecvMsg, recvMsgLen, pnf_p7);
break; 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: default:
{ {
if(header.message_id >= NFAPI_VENDOR_EXT_MSG_MIN && if(header.message_id >= NFAPI_VENDOR_EXT_MSG_MIN &&
......
...@@ -20,7 +20,7 @@ void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot, ...@@ -20,7 +20,7 @@ void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
int l1_north_init_gNB(void){} int l1_north_init_gNB(void){}
uint8_t slot_ahead=6; 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) {} NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {}
void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB, void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB,
......
...@@ -20,7 +20,7 @@ void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot, ...@@ -20,7 +20,7 @@ void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
int l1_north_init_gNB(void){} int l1_north_init_gNB(void){}
uint8_t slot_ahead=6; 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) {} NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {}
void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB, void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB,
......
...@@ -35,10 +35,10 @@ ...@@ -35,10 +35,10 @@
#include "PHY/NR_TRANSPORT/nr_dci.h" #include "PHY/NR_TRANSPORT/nr_dci.h"
#include "nfapi/oai_integration/vendor_ext.h" #include "nfapi/oai_integration/vendor_ext.h"
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_tti_request_t *dl_config_req); extern int oai_nfapi_dl_tti_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); extern 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); extern 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_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req);
extern uint8_t nfapi_mode; extern uint8_t nfapi_mode;
...@@ -234,22 +234,22 @@ if(nfapi_mode != 2) ...@@ -234,22 +234,22 @@ if(nfapi_mode != 2)
} }
} }
if(nfapi_mode != 0 && number_ul_tti_pdu>0) // if(nfapi_mode != 0 && number_ul_tti_pdu>0)
{ // {
oai_nfapi_ul_tti_req(UL_tti_req); // oai_nfapi_ul_tti_req(UL_tti_req);
} // }
if (nfapi_mode != 0 && Sched_INFO->UL_dci_req->numPdus!=0) // if (nfapi_mode != 0 && Sched_INFO->UL_dci_req->numPdus!=0)
{ // {
oai_nfapi_ul_dci_req(Sched_INFO->UL_dci_req); // oai_nfapi_ul_dci_req(Sched_INFO->UL_dci_req);
}//Only DL // }//Only DL
if (nfapi_mode != 0) if (nfapi_mode != 0)
{ if(Sched_INFO->DL_req->dl_tti_request_body.nPDUs>0) { if(Sched_INFO->DL_req->dl_tti_request_body.nPDUs>0)
{ {
Sched_INFO->DL_req->SFN = frame; Sched_INFO->DL_req->SFN = frame;
Sched_INFO->DL_req->Slot = slot; 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) if (Sched_INFO->TX_req->Number_of_PDUs > 0)
{ {
......
...@@ -622,7 +622,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -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->slot == slot_rx) &&
(ulsch_harq->handled == 0)){ (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); frame_rx,slot_rx);
#ifdef DEBUG_RXDATA #ifdef DEBUG_RXDATA
......
...@@ -295,7 +295,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u ...@@ -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 */ /* 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 */ 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]->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]->round = 0;
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1; ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
......
...@@ -1975,7 +1975,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1975,7 +1975,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
// do procedures for C-RNTI // do procedures for C-RNTI
if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) { 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); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
......
...@@ -56,7 +56,7 @@ UE_nr_rxtx_proc_t proc; ...@@ -56,7 +56,7 @@ UE_nr_rxtx_proc_t proc;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf; double cpuf;
uint8_t nfapi_mode = 0; //uint8_t nfapi_mode = 0;
uint16_t NB_UE_INST = 1; 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[4] = {0, 2, 1, 3};
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/TOOLS/sim.h" #include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.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 "PHY/NR_REFSIG/ptrs_nr.h"
#include "NR_RRCReconfiguration.h" #include "NR_RRCReconfiguration.h"
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0)) #define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
...@@ -81,7 +81,7 @@ double cpuf; ...@@ -81,7 +81,7 @@ double cpuf;
int sf_ahead=4 ; int sf_ahead=4 ;
int sl_ahead=0; int sl_ahead=0;
uint8_t nfapi_mode = 0; //uint8_t nfapi_mode = 0;
uint64_t downlink_frequency[MAX_NUM_CCs][4]; uint64_t downlink_frequency[MAX_NUM_CCs][4];
// dummy functions // dummy functions
......
...@@ -2,8 +2,11 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { re ...@@ -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_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_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_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); } int32_t get_uldl_offset(int nr_bandP) { return(0); }
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return(NULL);} 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_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_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
\ No newline at end of file
...@@ -2,7 +2,10 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { re ...@@ -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_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_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_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); } int32_t get_uldl_offset(int nr_bandP) { return(0); }
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return(NULL);} 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_dl_indication(nr_downlink_indication_t *dl_info) { return(0); }
......
...@@ -239,6 +239,7 @@ ngap_gNB_config_t ngap_config; ...@@ -239,6 +239,7 @@ ngap_gNB_config_t ngap_config;
uint32_t ngap_generate_gNB_id(void) {return 0;} 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_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_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 #endif
...@@ -56,7 +56,7 @@ RAN_CONTEXT_t RC; ...@@ -56,7 +56,7 @@ RAN_CONTEXT_t RC;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf; double cpuf;
uint8_t nfapi_mode = 0; //uint8_t nfapi_mode = 0;
uint16_t NB_UE_INST = 1; uint16_t NB_UE_INST = 1;
// needed for some functions // needed for some functions
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "OCG_vars.h" #include "OCG_vars.h"
#include <openair2/LAYER2/MAC/mac_vars.h> #include <openair2/LAYER2/MAC/mac_vars.h>
#include <openair2/RRC/LTE/rrc_vars.h> #include <openair2/RRC/LTE/rrc_vars.h>
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#define NR_PRACH_DEBUG 1 #define NR_PRACH_DEBUG 1
...@@ -62,7 +63,7 @@ RU_t *ru; ...@@ -62,7 +63,7 @@ RU_t *ru;
double cpuf; double cpuf;
extern uint16_t prach_root_sequence_map0_3[838]; extern uint16_t prach_root_sequence_map0_3[838];
openair0_config_t openair0_cfg[MAX_CARDS]; openair0_config_t openair0_cfg[MAX_CARDS];
uint8_t nfapi_mode=0; //uint8_t nfapi_mode=0;
int sl_ahead = 0; int sl_ahead = 0;
//void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe); //void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
......
...@@ -53,7 +53,7 @@ openair0_config_t openair0_cfg[MAX_CARDS]; ...@@ -53,7 +53,7 @@ openair0_config_t openair0_cfg[MAX_CARDS];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf; double cpuf;
uint8_t nfapi_mode = 0; //uint8_t nfapi_mode = 0;
uint16_t NB_UE_INST = 1; 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[4] = {0, 2, 1, 3};
uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3}; uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3};
......
...@@ -60,7 +60,7 @@ uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3}; ...@@ -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}; uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3};
double cpuf; double cpuf;
uint8_t nfapi_mode = 0; //uint8_t nfapi_mode = 0;
uint16_t NB_UE_INST = 1; uint16_t NB_UE_INST = 1;
// needed for some functions // needed for some functions
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair2/RRC/NR/MESSAGES/asn1_msg.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_UE/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "common/utils/threadPool/thread-pool.h" #include "common/utils/threadPool/thread-pool.h"
...@@ -77,7 +77,7 @@ int sf_ahead=4 ; ...@@ -77,7 +77,7 @@ int sf_ahead=4 ;
int slot_ahead=6 ; int slot_ahead=6 ;
int sl_ahead=0; int sl_ahead=0;
double cpuf; double cpuf;
uint8_t nfapi_mode = 0; //uint8_t nfapi_mode = 0;
uint64_t downlink_frequency[MAX_NUM_CCs][4]; uint64_t downlink_frequency[MAX_NUM_CCs][4];
......
...@@ -142,6 +142,10 @@ void thread_top_init(char *thread_name, ...@@ -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_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_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); } int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); }
......
...@@ -255,8 +255,8 @@ void nr_preprocessor_phytest(module_id_t module_id, ...@@ -255,8 +255,8 @@ void nr_preprocessor_phytest(module_id_t module_id,
sub_frame_t slot, sub_frame_t slot,
int num_slots_per_tdd) int num_slots_per_tdd)
{ {
if (slot != 2) if (slot != 1)
return; /* only schedule in slot 1 for now */ 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; NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
const int UE_id = 0; const int UE_id = 0;
const int CC_id = 0; const int CC_id = 0;
...@@ -711,6 +711,7 @@ void schedule_fapi_ul_pdu(int Mod_idP, ...@@ -711,6 +711,7 @@ void schedule_fapi_ul_pdu(int Mod_idP,
//Pusch Allocation in frequency domain [TS38.214, sec 6.1.2.2] //Pusch Allocation in frequency domain [TS38.214, sec 6.1.2.2]
//Optional Data only included if indicated in pduBitmap //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]); int8_t harq_id = select_ul_harq_pid(&UE_info->UE_sched_ctrl[UE_id]);
if (harq_id < 0) return; if (harq_id < 0) return;
NR_UE_ul_harq_t *cur_harq = &UE_info->UE_sched_ctrl[UE_id].ul_harq_processes[harq_id]; NR_UE_ul_harq_t *cur_harq = &UE_info->UE_sched_ctrl[UE_id].ul_harq_processes[harq_id];
......
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