Code cleanup and documentation update
This commit is contained in:
@@ -37,8 +37,6 @@
|
||||
#include "nfapi_pnf.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "openair2/PHY_INTERFACE/phy_stub_UE.h"
|
||||
//#include "openair1/PHY/vars.h"
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
@@ -67,6 +65,7 @@ extern RAN_CONTEXT_t RC;
|
||||
|
||||
extern void phy_init_RU(RU_t *);
|
||||
extern int config_sync_var;
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
extern pthread_cond_t nfapi_sync_cond;
|
||||
extern pthread_mutex_t nfapi_sync_mutex;
|
||||
@@ -110,8 +109,12 @@ extern void nr_fill_prach_ru(RU_t *ru,
|
||||
int Slot,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu);
|
||||
|
||||
|
||||
|
||||
int nfapi_pnf_p7_nr_slot_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_slot_indication_scf_t* ind);
|
||||
int nfapi_pnf_p7_nr_rx_data_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_rx_data_indication_t* ind);
|
||||
int nfapi_pnf_p7_nr_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_crc_indication_t* ind);
|
||||
int nfapi_pnf_p7_nr_srs_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_srs_indication_t* ind);
|
||||
int nfapi_pnf_p7_nr_uci_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_uci_indication_t* ind);
|
||||
int nfapi_pnf_p7_nr_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_rach_indication_t* ind);
|
||||
|
||||
nfapi_tx_request_pdu_t *tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus]
|
||||
uint8_t nr_tx_pdus[32][16][4096];
|
||||
@@ -1146,16 +1149,13 @@ int pnf_phy_ul_dci_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
|
||||
|
||||
// LOG_D(PHY,"[PNF] HI_DCI0_REQUEST SFN/SF:%05d dci:%d hi:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->hi_dci0_request_body.number_of_dci, req->hi_dci0_request_body.number_of_hi);
|
||||
|
||||
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
|
||||
struct PHY_VARS_gNB_s *gNB = RC.gNB[0];
|
||||
if (proc ==NULL)
|
||||
proc = &gNB->proc.L1_proc;
|
||||
//int slot_tx = req->Slot + 6; //Ref for PNF is slot_rx, so align slot number with tx thread before passing UL_DCI info
|
||||
|
||||
for (int i=0; i<req->numPdus; i++) {
|
||||
//LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d]\n", NFAPI_SFNSF2DEC(req->sfn_sf), i);
|
||||
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];
|
||||
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);
|
||||
}
|
||||
else {
|
||||
@@ -2318,7 +2318,7 @@ void handle_nr_slot_ind(uint16_t sfn, uint16_t slot) {
|
||||
oai_nfapi_nr_slot_indication(ind);
|
||||
|
||||
//copy data from appropriate p7 slot buffers into channel structures for PHY processing
|
||||
int slot_ret = nfapi_pnf_p7_slot_ind(p7_config_g, p7_config_g->phy_id, sfn, slot);
|
||||
nfapi_pnf_p7_slot_ind(p7_config_g, p7_config_g->phy_id, sfn, slot);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#if !defined(NFAPI_PNF_H__)
|
||||
#define NFAPI_PNF_H__
|
||||
|
||||
extern nfapi_ue_release_request_body_t release_rntis;
|
||||
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
|
||||
@@ -28,4 +27,12 @@ void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_add
|
||||
|
||||
void oai_subframe_ind(uint16_t sfn, uint16_t sf);
|
||||
void handle_nr_slot_ind(uint16_t sfn, uint16_t slot);
|
||||
#endif
|
||||
uint32_t sfnslot_add_slot(uint16_t sfn, uint16_t slot, int offset);
|
||||
|
||||
int oai_nfapi_nr_slot_indication(nfapi_nr_slot_indication_scf_t *ind);
|
||||
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind);
|
||||
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind);
|
||||
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind);
|
||||
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind);
|
||||
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind);
|
||||
|
||||
|
||||
@@ -1014,31 +1014,6 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_
|
||||
return 1;
|
||||
}
|
||||
|
||||
// void add_slot(uint16_t *frameP, uint16_t *slotP, int offset)
|
||||
// {
|
||||
// uint16_t num_slots = 20; // set based on numerlogy (fixing for 1)
|
||||
|
||||
// *frameP = (*frameP + ((*slotP + offset) / num_slots))%1024;
|
||||
|
||||
// *slotP = ((*slotP + offset) % num_slots);
|
||||
// }
|
||||
|
||||
// uint32_t sfnslot_add_slot(uint16_t sfn, uint16_t slot, int offset)
|
||||
// {
|
||||
// uint32_t new_sfnslot;
|
||||
// // uint16_t sfn = NFAPI_SFNSLOT2SFN(sfnslot);
|
||||
// // uint16_t slot = NFAPI_SFNSLOT2SLOT(sfnslot);
|
||||
|
||||
// //printf("%s() sfn:%u sf:%u\n", __FUNCTION__, sfn, sf);
|
||||
// add_slot(&sfn, &slot, offset);
|
||||
|
||||
// new_sfnslot = sfn<<6|slot;
|
||||
|
||||
// //printf("%s() sfn:%u sf:%u offset:%d sfnsf:%d(DEC:%d) new:%d(DEC:%d)\n", __FUNCTION__, sfn, sf, offset, sfnsf, NFAPI_SFNSF2DEC(sfnsf), new_sfnsf, NFAPI_SFNSF2DEC(new_sfnsf));
|
||||
|
||||
// return new_sfnslot;
|
||||
// }
|
||||
|
||||
//NR phy indication
|
||||
|
||||
int phy_nr_slot_indication(nfapi_nr_slot_indication_scf_t *ind) {
|
||||
@@ -1053,6 +1028,8 @@ int phy_nr_slot_indication(nfapi_nr_slot_indication_scf_t *ind) {
|
||||
gNB->UL_INFO.slot = vnf_slot;
|
||||
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
|
||||
LOG_D(MAC, "VNF SFN/Slot %d.%d \n", gNB->UL_INFO.frame, gNB->UL_INFO.slot);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int phy_nr_crc_indication(nfapi_nr_crc_indication_t *ind) {
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#if !defined(NFAPI_VNF_H__)
|
||||
#define NFAPI_VNF_H__
|
||||
|
||||
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port);
|
||||
void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port);
|
||||
#endif
|
||||
|
||||
uint32_t sfnslot_add_slot(uint16_t sfn, uint16_t slot, int offset);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user