Merged latest develop to nfapi
This commit is contained in:
@@ -1413,9 +1413,6 @@ int pnf_phy_dl_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
|
||||
|
||||
|
||||
int pnf_phy_dl_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) {
|
||||
if (RC.ru == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (RC.eNB == 0) {
|
||||
return -2;
|
||||
@@ -1627,9 +1624,6 @@ int pnf_phy_ul_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, n
|
||||
req->ul_config_request_body.srs_present
|
||||
);
|
||||
|
||||
if (RC.ru == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (RC.eNB == 0) {
|
||||
return -2;
|
||||
|
||||
@@ -522,7 +522,15 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf) {
|
||||
old_sf = sf;
|
||||
old_sfn = sfn;
|
||||
|
||||
if (old_sf == 0 && old_sfn % 100==0) LOG_W( PHY,"[eNB] sfn/sf:%d%d old_sfn/sf:%d%d proc[rx:%d%d]\n", sfn, sf, old_sfn, old_sf, proc->frame_rx, proc->subframe_rx);
|
||||
if (old_sf == 0 && old_sfn % 100==0)
|
||||
LOG_D(PHY,
|
||||
"[eNB] sfn/sf:%d%d old_sfn/sf:%d%d proc[rx:%d%d]\n",
|
||||
sfn,
|
||||
sf,
|
||||
old_sfn,
|
||||
old_sf,
|
||||
proc->frame_rx,
|
||||
proc->subframe_rx);
|
||||
}
|
||||
|
||||
++L1_proc->instance_cnt;
|
||||
@@ -633,6 +641,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
|
||||
}
|
||||
if(index == -1){
|
||||
LOG_E(MAC,"phy_rach_indication : num of rach reach max \n");
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
return 0;
|
||||
}
|
||||
UL_RCC_INFO.rach_ind[index] = *ind;
|
||||
@@ -697,6 +706,7 @@ int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indicatio
|
||||
}
|
||||
if(index == -1){
|
||||
LOG_E(MAC,"phy_harq_indication : num of harq reach max \n");
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
return 0;
|
||||
}
|
||||
UL_RCC_INFO.harq_ind[index] = *ind;
|
||||
@@ -736,6 +746,7 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_
|
||||
}
|
||||
if(index == -1){
|
||||
LOG_E(MAC,"phy_crc_indication : num of crc reach max \n");
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
return 0;
|
||||
}
|
||||
UL_RCC_INFO.crc_ind[index] = *ind;
|
||||
@@ -801,6 +812,7 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t
|
||||
}
|
||||
if(index == -1){
|
||||
LOG_E(MAC,"phy_rx_indication : num of rx reach max \n");
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
return 0;
|
||||
}
|
||||
UL_RCC_INFO.rx_ind[index] = *ind;
|
||||
@@ -884,6 +896,7 @@ int phy_sr_indication(struct nfapi_vnf_p7_config *config, nfapi_sr_indication_t
|
||||
}
|
||||
if(index == -1){
|
||||
LOG_E(MAC,"phy_sr_indication : num of sr reach max \n");
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
return 0;
|
||||
}
|
||||
UL_RCC_INFO.sr_ind[index] = *ind;
|
||||
@@ -935,6 +948,7 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_
|
||||
}
|
||||
if(index == -1){
|
||||
LOG_E(MAC,"phy_cqi_indication : num of cqi reach max \n");
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
return 0;
|
||||
}
|
||||
UL_RCC_INFO.cqi_ind[index] = *ind;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "PHY/impl_defs_nr.h"
|
||||
|
||||
#define NFAPI_UE_MAX_NUM_CB 8
|
||||
#define NFAPI_MAX_NUM_UL_PDU 8
|
||||
|
||||
/*
|
||||
typedef unsigned int uint32_t;
|
||||
@@ -155,7 +156,7 @@ typedef struct {
|
||||
uint16_t slot;
|
||||
fapi_nr_tx_config_t tx_config;
|
||||
uint16_t number_of_pdus;
|
||||
fapi_nr_tx_request_body_t *tx_request_body;
|
||||
fapi_nr_tx_request_body_t tx_request_body[NFAPI_MAX_NUM_UL_PDU];
|
||||
} fapi_nr_tx_request_t;
|
||||
|
||||
/// This struct replaces:
|
||||
@@ -170,6 +171,10 @@ typedef struct {
|
||||
uint8_t prach_format;
|
||||
/// Num RA
|
||||
uint8_t num_ra;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
uint8_t prach_slot;
|
||||
>>>>>>> fork_develop_new
|
||||
uint8_t prach_start_symbol;
|
||||
/// 38.211 (NCS 38.211 6.3.3.1).
|
||||
uint16_t num_cs;
|
||||
@@ -179,6 +184,11 @@ typedef struct {
|
||||
uint8_t restricted_set;
|
||||
/// see TS 38.211 (6.3.3.2).
|
||||
uint16_t freq_msg1;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// When multiple SSBs per RO is configured, this indicates which one is selected in this RO -> this is used to properly compute the PRACH preamble
|
||||
uint8_t ssb_nb_in_ro;
|
||||
>>>>>>> fork_develop_new
|
||||
// nfapi_nr_ul_beamforming_t beamforming;
|
||||
} fapi_nr_ul_config_prach_pdu;
|
||||
|
||||
@@ -415,8 +425,14 @@ typedef struct {
|
||||
uint8_t number_of_candidates;
|
||||
uint16_t CCE[64];
|
||||
uint8_t L[64];
|
||||
uint8_t dci_length;
|
||||
uint8_t dci_format;
|
||||
// 3GPP TS 38.212 Sec. 7.3.1.0, 3GPP TS 138.131 sec. 6.3.2 (SearchSpace)
|
||||
// The maximum number of DCI lengths allowed by the spec are 4, with max 3 for C-RNTI.
|
||||
// But a given search space may only support a maximum of 2 DCI formats at a time
|
||||
// depending on its search space type configured by RRC. Hence for blind decoding, UE
|
||||
// needs to monitor only upto 2 DCI lengths for a given search space.
|
||||
uint8_t num_dci_options; // Num DCIs the UE actually needs to decode (1 or 2)
|
||||
uint8_t dci_length_options[2];
|
||||
uint8_t dci_format_options[2];
|
||||
} fapi_nr_dl_config_dci_dl_pdu_rel15_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -69,7 +69,11 @@ typedef enum {
|
||||
NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION= 0X86,
|
||||
NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION= 0X87,
|
||||
NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION= 0X88,
|
||||
<<<<<<< HEAD
|
||||
NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION= 0X89,
|
||||
=======
|
||||
NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION= 0X89
|
||||
>>>>>>> fork_develop_new
|
||||
//RESERVED 0X8a ~ 0xff
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_PARAM_REQUEST = 0x0100,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_PARAM_RESPONSE = 0x0101,
|
||||
@@ -303,6 +307,7 @@ typedef struct
|
||||
#define NFAPI_NR_CONFIG_PRACH_SUB_C_SPACING_TAG 0x1012
|
||||
#define NFAPI_NR_CONFIG_RESTRICTED_SET_CONFIG_TAG 0x1013
|
||||
#define NFAPI_NR_CONFIG_NUM_PRACH_FD_OCCASIONS_TAG 0x1014
|
||||
#define NFAPI_NR_CONFIG_PRACH_CONFIG_INDEX_TAG 0x1029
|
||||
#define NFAPI_NR_CONFIG_PRACH_ROOT_SEQUENCE_INDEX_TAG 0x1015
|
||||
#define NFAPI_NR_CONFIG_NUM_ROOT_SEQUENCES_TAG 0x1016
|
||||
#define NFAPI_NR_CONFIG_K1_TAG 0x1017
|
||||
@@ -367,7 +372,6 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t num_prach_fd_occasions;
|
||||
nfapi_uint16_tlv_t prach_root_sequence_index;//Starting logical root sequence index, 𝑖, equivalent to higher layer parameter prach-RootSequenceIndex [38.211, sec 6.3.3.1] Value: 0 -> 837
|
||||
nfapi_uint8_tlv_t num_root_sequences;//Number of root sequences for a particular FD occasion that are required to generate the necessary number of preambles
|
||||
nfapi_uint16_tlv_t k1;//Frequency offset (from UL bandwidth part) for each FD. [38.211, sec 6.3.3.2] Value: from 0 to 272
|
||||
@@ -383,7 +387,9 @@ typedef struct
|
||||
nfapi_uint8_tlv_t prach_sub_c_spacing;//Subcarrier spacing of PRACH. [38.211 sec 4.2] Value:0->4
|
||||
nfapi_uint8_tlv_t restricted_set_config;//PRACH restricted set config Value: 0: unrestricted 1: restricted set type A 2: restricted set type B
|
||||
nfapi_uint8_tlv_t num_prach_fd_occasions;//Corresponds to the parameter 𝑀 in [38.211, sec 6.3.3.2] which equals the higher layer parameter msg1FDM Value: 1,2,4,8
|
||||
nfapi_uint8_tlv_t prach_ConfigurationIndex;//PRACH configuration index. Value:0->255
|
||||
nfapi_nr_num_prach_fd_occasions_t* num_prach_fd_occasions_list;
|
||||
|
||||
nfapi_uint8_tlv_t ssb_per_rach;//SSB-per-RACH-occasion Value: 0: 1/8 1:1/4, 2:1/2 3:1 4:2 5:4, 6:8 7:16
|
||||
nfapi_uint8_tlv_t prach_multiple_carriers_in_a_band;//0 = disabled 1 = enabled
|
||||
|
||||
@@ -1381,7 +1387,7 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t pdu_idx;//This value is an index for number of PDU identified by nPDU in this message Value: 0 -> 65535
|
||||
uint8_t pdu_idx;//This value is an index for number of PDU identified by nPDU in this message Value: 0 -> 255
|
||||
|
||||
} nfapi_nr_ul_tti_request_number_of_ue_t;
|
||||
|
||||
@@ -1665,7 +1671,7 @@ typedef struct
|
||||
}nfapi_nr_uci_pucch_pdu_format_2_3_4_t;
|
||||
|
||||
typedef enum {
|
||||
NFAPI_NR_UCI_PDCCH_PDU_TYPE = 0,
|
||||
NFAPI_NR_UCI_PUSCH_PDU_TYPE = 0,
|
||||
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE = 1,
|
||||
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE = 2,
|
||||
} nfapi_nr_uci_pdu_type_e;
|
||||
|
||||
@@ -1158,7 +1158,7 @@ void vnf_handle_ul_node_sync(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_NOTE, "(%4d/%1d) %d.%d PNF to VNF phy_id:%2d (t1/2/3/4:%8u, %8u, %8u, %8u) txrx:%4u procT:%3u latency(us):%4d(avg:%4d) offset(us):%8d filtered(us):%8d wrap[t1:%u t2:%u]\n",
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "(%4d/%1d) %d.%d PNF to VNF phy_id:%2d (t1/2/3/4:%8u, %8u, %8u, %8u) txrx:%4u procT:%3u latency(us):%4d(avg:%4d) offset(us):%8d filtered(us):%8d wrap[t1:%u t2:%u]\n",
|
||||
NFAPI_SFNSF2SFN(phy->sfn_sf), NFAPI_SFNSF2SF(phy->sfn_sf), ts.tv_sec, ts.tv_nsec, ind.header.phy_id,
|
||||
ind.t1, ind.t2, ind.t3, t4,
|
||||
tx_2_rx, pnf_proc_time, latency, phy->average_latency, phy->sf_offset, phy->sf_offset_filtered,
|
||||
@@ -1219,7 +1219,7 @@ void vnf_handle_ul_node_sync(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
|
||||
{
|
||||
phy->adjustment = NFAPI_SFNSF2DEC(new_sfn_sf) - NFAPI_SFNSF2DEC(curr_sfn_sf);
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_NOTE, "PNF to VNF phy_id:%d adjustment%d phy->previous_sf_offset_filtered:%d phy->previous_sf_offset_filtered:%d phy->sf_offset_trend:%d\n", ind.header.phy_id, phy->adjustment, phy->previous_sf_offset_filtered, phy->previous_sf_offset_filtered, phy->sf_offset_trend);
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "PNF to VNF phy_id:%d adjustment%d phy->previous_sf_offset_filtered:%d phy->previous_sf_offset_filtered:%d phy->sf_offset_trend:%d\n", ind.header.phy_id, phy->adjustment, phy->previous_sf_offset_filtered, phy->previous_sf_offset_filtered, phy->sf_offset_trend);
|
||||
|
||||
phy->previous_t1 = 0;
|
||||
phy->previous_t2 = 0;
|
||||
|
||||
Reference in New Issue
Block a user