Merge branch 'oairu' of https://gitlab.eurecom.fr/oai/openairinterface5g into oairu
This commit is contained in:
@@ -25,7 +25,7 @@ extern "C" {
|
|||||||
#include "nfapi_interface.h"
|
#include "nfapi_interface.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include <openair2/PHY_INTERFACE/IF_Module.h>
|
#include <openair2/PHY_INTERFACE/IF_Module.h>
|
||||||
|
#include <openair1/PHY/defs_eNB.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
/*! This enum is used to describe the states of the pnf
|
/*! This enum is used to describe the states of the pnf
|
||||||
|
|||||||
@@ -216,6 +216,58 @@ typedef struct {
|
|||||||
int ret;
|
int ret;
|
||||||
} td_params;
|
} td_params;
|
||||||
|
|
||||||
|
/// Context data structure for RX/TX portion of subframe processing
|
||||||
|
typedef struct {
|
||||||
|
/// Component Carrier index
|
||||||
|
uint8_t CC_id;
|
||||||
|
/// timestamp transmitted to HW
|
||||||
|
openair0_timestamp timestamp_tx;
|
||||||
|
openair0_timestamp timestamp_rx;
|
||||||
|
/// subframe to act upon for transmission
|
||||||
|
int subframe_tx;
|
||||||
|
/// subframe to act upon for reception
|
||||||
|
int subframe_rx;
|
||||||
|
/// frame to act upon for transmission
|
||||||
|
int frame_tx;
|
||||||
|
/// frame to act upon for reception
|
||||||
|
int frame_rx;
|
||||||
|
int frame_prach;
|
||||||
|
int subframe_prach;
|
||||||
|
int frame_prach_br;
|
||||||
|
int subframe_prach_br;
|
||||||
|
/// \brief Instance count for RXn-TXnp4 processing thread.
|
||||||
|
/// \internal This variable is protected by \ref mutex_rxtx.
|
||||||
|
int instance_cnt;
|
||||||
|
/// pthread structure for RXn-TXnp4 processing thread
|
||||||
|
pthread_t pthread;
|
||||||
|
/// pthread attributes for RXn-TXnp4 processing thread
|
||||||
|
pthread_attr_t attr;
|
||||||
|
/// condition variable for tx processing thread
|
||||||
|
pthread_cond_t cond;
|
||||||
|
/// mutex for RXn-TXnp4 processing thread
|
||||||
|
pthread_mutex_t mutex;
|
||||||
|
/// scheduling parameters for RXn-TXnp4 thread
|
||||||
|
struct sched_param sched_param_rxtx;
|
||||||
|
|
||||||
|
/// \internal This variable is protected by \ref mutex_RUs.
|
||||||
|
int instance_cnt_RUs;
|
||||||
|
/// condition variable for tx processing thread
|
||||||
|
pthread_cond_t cond_RUs;
|
||||||
|
/// mutex for RXn-TXnp4 processing thread
|
||||||
|
pthread_mutex_t mutex_RUs;
|
||||||
|
tpool_t *threadPool;
|
||||||
|
int nbEncode;
|
||||||
|
int nbDecode;
|
||||||
|
notifiedFIFO_t *respEncode;
|
||||||
|
notifiedFIFO_t *respDecode;
|
||||||
|
pthread_mutex_t mutex_emulateRF;
|
||||||
|
int instance_cnt_emulateRF;
|
||||||
|
pthread_t pthread_emulateRF;
|
||||||
|
pthread_attr_t attr_emulateRF;
|
||||||
|
pthread_cond_t cond_emulateRF;
|
||||||
|
int first_rx;
|
||||||
|
} L1_rxtx_proc_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct PHY_VARS_eNB_s *eNB;
|
struct PHY_VARS_eNB_s *eNB;
|
||||||
LTE_eNB_DLSCH_t *dlsch;
|
LTE_eNB_DLSCH_t *dlsch;
|
||||||
|
|||||||
@@ -749,7 +749,8 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc) {
|
void schedule_response(Sched_Rsp_t *Sched_INFO, void *arg) {
|
||||||
|
L1_rxtx_proc_t *proc = (L1_rxtx_proc_t *)arg;
|
||||||
PHY_VARS_eNB *eNB;
|
PHY_VARS_eNB *eNB;
|
||||||
// copy data from L2 interface into L1 structures
|
// copy data from L2 interface into L1 structures
|
||||||
module_id_t Mod_id = Sched_INFO->module_id;
|
module_id_t Mod_id = Sched_INFO->module_id;
|
||||||
|
|||||||
@@ -80,4 +80,4 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
|
|||||||
|
|
||||||
void handle_srs_pdu(PHY_VARS_eNB *eNB,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe);
|
void handle_srs_pdu(PHY_VARS_eNB *eNB,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe);
|
||||||
|
|
||||||
void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
|
void schedule_response(Sched_Rsp_t *Sched_INFO, void *proc);
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ void get_cqipmiri_params(PHY_VARS_UE *ue,uint8_t eNB_id);
|
|||||||
|
|
||||||
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id, uint8_t eNB_index);
|
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id, uint8_t eNB_index);
|
||||||
|
|
||||||
void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
|
void schedule_response(Sched_Rsp_t *Sched_INFO, void *proc);
|
||||||
|
|
||||||
LTE_eNB_UE_stats* get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
|
LTE_eNB_UE_stats* get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ int8_t find_ue_ulsch(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
|
void schedule_response(Sched_Rsp_t *Sched_INFO, void *proc);
|
||||||
|
|
||||||
LTE_eNB_UE_stats *get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
|
LTE_eNB_UE_stats *get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
|
||||||
|
|
||||||
|
|||||||
@@ -687,7 +687,7 @@ static void dump_dl(Sched_Rsp_t *d) {
|
|||||||
/* debug utility functions end */
|
/* debug utility functions end */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
void UL_indication(UL_IND_t *UL_info, L1_rxtx_proc_t *proc) {
|
void UL_indication(UL_IND_t *UL_info, void *proc) {
|
||||||
AssertFatal(UL_info!=NULL,"UL_INFO is null\n");
|
AssertFatal(UL_info!=NULL,"UL_INFO is null\n");
|
||||||
#ifdef DUMP_FAPI
|
#ifdef DUMP_FAPI
|
||||||
dump_ul(UL_info);
|
dump_ul(UL_info);
|
||||||
|
|||||||
@@ -134,64 +134,13 @@ typedef struct {
|
|||||||
uint8_t Mod_id;
|
uint8_t Mod_id;
|
||||||
int CC_id;
|
int CC_id;
|
||||||
nfapi_config_request_t *cfg;
|
nfapi_config_request_t *cfg;
|
||||||
}PHY_Config_t;
|
} PHY_Config_t;
|
||||||
#include <targets/ARCH/COMMON/common_lib.h>
|
#include <targets/ARCH/COMMON/common_lib.h>
|
||||||
/// Context data structure for RX/TX portion of subframe processing
|
|
||||||
typedef struct {
|
|
||||||
/// Component Carrier index
|
|
||||||
uint8_t CC_id;
|
|
||||||
/// timestamp transmitted to HW
|
|
||||||
openair0_timestamp timestamp_tx;
|
|
||||||
openair0_timestamp timestamp_rx;
|
|
||||||
/// subframe to act upon for transmission
|
|
||||||
int subframe_tx;
|
|
||||||
/// subframe to act upon for reception
|
|
||||||
int subframe_rx;
|
|
||||||
/// frame to act upon for transmission
|
|
||||||
int frame_tx;
|
|
||||||
/// frame to act upon for reception
|
|
||||||
int frame_rx;
|
|
||||||
int frame_prach;
|
|
||||||
int subframe_prach;
|
|
||||||
int frame_prach_br;
|
|
||||||
int subframe_prach_br;
|
|
||||||
/// \brief Instance count for RXn-TXnp4 processing thread.
|
|
||||||
/// \internal This variable is protected by \ref mutex_rxtx.
|
|
||||||
int instance_cnt;
|
|
||||||
/// pthread structure for RXn-TXnp4 processing thread
|
|
||||||
pthread_t pthread;
|
|
||||||
/// pthread attributes for RXn-TXnp4 processing thread
|
|
||||||
pthread_attr_t attr;
|
|
||||||
/// condition variable for tx processing thread
|
|
||||||
pthread_cond_t cond;
|
|
||||||
/// mutex for RXn-TXnp4 processing thread
|
|
||||||
pthread_mutex_t mutex;
|
|
||||||
/// scheduling parameters for RXn-TXnp4 thread
|
|
||||||
struct sched_param sched_param_rxtx;
|
|
||||||
|
|
||||||
/// \internal This variable is protected by \ref mutex_RUs.
|
|
||||||
int instance_cnt_RUs;
|
|
||||||
/// condition variable for tx processing thread
|
|
||||||
pthread_cond_t cond_RUs;
|
|
||||||
/// mutex for RXn-TXnp4 processing thread
|
|
||||||
pthread_mutex_t mutex_RUs;
|
|
||||||
tpool_t *threadPool;
|
|
||||||
int nbEncode;
|
|
||||||
int nbDecode;
|
|
||||||
notifiedFIFO_t *respEncode;
|
|
||||||
notifiedFIFO_t *respDecode;
|
|
||||||
pthread_mutex_t mutex_emulateRF;
|
|
||||||
int instance_cnt_emulateRF;
|
|
||||||
pthread_t pthread_emulateRF;
|
|
||||||
pthread_attr_t attr_emulateRF;
|
|
||||||
pthread_cond_t cond_emulateRF;
|
|
||||||
int first_rx;
|
|
||||||
} L1_rxtx_proc_t;
|
|
||||||
|
|
||||||
typedef struct IF_Module_s{
|
typedef struct IF_Module_s{
|
||||||
//define the function pointer
|
//define the function pointer
|
||||||
void (*UL_indication)(UL_IND_t *UL_INFO, L1_rxtx_proc_t *proc);
|
void (*UL_indication)(UL_IND_t *UL_INFO, void *proc);
|
||||||
void (*schedule_response)(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
|
void (*schedule_response)(Sched_Rsp_t *Sched_INFO, void *proc);
|
||||||
void (*PHY_config_req)(PHY_Config_t* config_INFO);
|
void (*PHY_config_req)(PHY_Config_t* config_INFO);
|
||||||
|
|
||||||
void (*PHY_config_update_sib2_req)(PHY_Config_t* config_INFO);
|
void (*PHY_config_update_sib2_req)(PHY_Config_t* config_INFO);
|
||||||
@@ -208,7 +157,7 @@ void IF_Module_kill(int Mod_id);
|
|||||||
|
|
||||||
/*Interface for uplink, transmitting the Preamble(list), ULSCH SDU, NAK, Tick (trigger scheduler)
|
/*Interface for uplink, transmitting the Preamble(list), ULSCH SDU, NAK, Tick (trigger scheduler)
|
||||||
*/
|
*/
|
||||||
void UL_indication(UL_IND_t *UL_INFO, L1_rxtx_proc_t *proc);
|
void UL_indication(UL_IND_t *UL_INFO, void *proc);
|
||||||
|
|
||||||
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
|
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
|
||||||
void Schedule_Response(Sched_Rsp_t *Sched_INFO);
|
void Schedule_Response(Sched_Rsp_t *Sched_INFO);
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
|
|||||||
eNB->UL_INFO.subframe = proc->subframe_rx;
|
eNB->UL_INFO.subframe = proc->subframe_rx;
|
||||||
eNB->UL_INFO.module_id = eNB->Mod_id;
|
eNB->UL_INFO.module_id = eNB->Mod_id;
|
||||||
eNB->UL_INFO.CC_id = eNB->CC_id;
|
eNB->UL_INFO.CC_id = eNB->CC_id;
|
||||||
eNB->if_inst->UL_indication(&eNB->UL_INFO, proc);
|
eNB->if_inst->UL_indication(&eNB->UL_INFO, (void*)proc);
|
||||||
AssertFatal((ret= pthread_mutex_unlock(&eNB->UL_INFO_mutex))==0,"error unlocking UL_INFO_mutex, return %d\n",ret);
|
AssertFatal((ret= pthread_mutex_unlock(&eNB->UL_INFO_mutex))==0,"error unlocking UL_INFO_mutex, return %d\n",ret);
|
||||||
/* this conflict resolution may be totally wrong, to be tested */
|
/* this conflict resolution may be totally wrong, to be tested */
|
||||||
/* CONFLICT RESOLUTION: BEGIN */
|
/* CONFLICT RESOLUTION: BEGIN */
|
||||||
|
|||||||
Reference in New Issue
Block a user