remove global for frame/subframe, noS1 attach+ traffic ok, UE do not compile

This commit is contained in:
Laurent
2019-10-18 16:35:33 +02:00
parent ae25c88372
commit 90b9cbb81d
24 changed files with 242 additions and 1678 deletions
+45 -3
View File
@@ -34,6 +34,7 @@
#include <stdint.h>
#include <sched.h>
//#include "openair1/PHY/LTE_TRANSPORT/transport_eNB.h"
#include "nfapi_interface.h"
#include "platform_constants.h"
@@ -138,11 +139,52 @@ typedef struct {
int CC_id;
nfapi_config_request_t *cfg;
}PHY_Config_t;
#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;
} L1_rxtx_proc_t;
typedef struct IF_Module_s{
//define the function pointer
void (*UL_indication)(UL_IND_t *UL_INFO);
void (*schedule_response)(Sched_Rsp_t *Sched_INFO);
void (*UL_indication)(UL_IND_t *UL_INFO, L1_rxtx_proc_t *proc);
void (*schedule_response)(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
void (*PHY_config_req)(PHY_Config_t* config_INFO);
uint32_t CC_mask;
uint16_t current_frame;
@@ -167,7 +209,7 @@ void IF_Module_kill(int Mod_id);
/*Interface for uplink, transmitting the Preamble(list), ULSCH SDU, NAK, Tick (trigger scheduler)
*/
void UL_indication(UL_IND_t *UL_INFO);
void UL_indication(UL_IND_t *UL_INFO, L1_rxtx_proc_t *proc);
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
void Schedule_Response(Sched_Rsp_t *Sched_INFO);