move byte2m128i in a more logical place
This commit is contained in:
@@ -917,7 +917,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
|
||||
${OPENAIR1_DIR}/PHY/nr_phy_common/src/nr_phy_common_csirs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_scrambling.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/refsig.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
|
||||
)
|
||||
|
||||
@@ -109,8 +109,6 @@ static const unsigned short srs_bandwidth_config[C_SRS_NUMBER][B_SRS_NUMBER][2]
|
||||
/* 63 */ {{272, 1}, {16, 17}, {8, 2}, {4, 2}},
|
||||
};
|
||||
|
||||
const char *duplex_mode[]={"FDD","TDD"};
|
||||
|
||||
static const uint8_t bit_reverse_table_256[] = {
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8,
|
||||
0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
@@ -126,6 +124,36 @@ static const uint8_t bit_reverse_table_256[] = {
|
||||
0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF};
|
||||
|
||||
simde__m128i byte2bit16_lut[256];
|
||||
void init_byte2bit16(void)
|
||||
{
|
||||
for (int s = 0; s < 256; s++) {
|
||||
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], s & 1, 0);
|
||||
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 1) & 1, 1);
|
||||
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 2) & 1, 2);
|
||||
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 3) & 1, 3);
|
||||
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 4) & 1, 4);
|
||||
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 5) & 1, 5);
|
||||
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 6) & 1, 6);
|
||||
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 7) & 1, 7);
|
||||
}
|
||||
}
|
||||
|
||||
simde__m128i byte2m128i[256];
|
||||
void init_byte2m128i(void) {
|
||||
|
||||
for (int s=0;s<256;s++) {
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*(s&1)),0);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>1)&1)),1);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>2)&1)),2);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>3)&1)),3);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>4)&1)),4);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>5)&1)),5);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>6)&1)),6);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>7)&1)),7);
|
||||
}
|
||||
}
|
||||
|
||||
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out)
|
||||
{
|
||||
DevAssert(in != NULL);
|
||||
@@ -704,7 +732,7 @@ frame_type_t get_frame_type(uint16_t current_band, uint8_t scs_index)
|
||||
{
|
||||
int32_t delta_duplex = get_delta_duplex(current_band, scs_index);
|
||||
frame_type_t current_type = delta_duplex == 0 ? TDD : FDD;
|
||||
LOG_D(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode[current_type], delta_duplex);
|
||||
LOG_D(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode_txt[current_type], delta_duplex);
|
||||
return current_type;
|
||||
}
|
||||
|
||||
|
||||
@@ -183,6 +183,15 @@ uint32_t nr_timer_elapsed_time(const NR_timer_t *timer);
|
||||
int set_default_nta_offset(frequency_range_t freq_range, uint32_t samples_per_subframe);
|
||||
extern const nr_bandentry_t nr_bandtable[];
|
||||
|
||||
extern simde__m128i byte2bit16_lut[256];
|
||||
void init_byte2bit16(void);
|
||||
void init_byte2m128i(void);
|
||||
|
||||
static inline simde__m128i byte2bit16(uint8_t b)
|
||||
{
|
||||
return byte2bit16_lut[b];
|
||||
}
|
||||
|
||||
static inline int get_num_dmrs(uint16_t dmrs_mask )
|
||||
{
|
||||
int num_dmrs=0;
|
||||
@@ -262,6 +271,8 @@ unsigned short get_N_b_srs(int c_srs, int b_srs);
|
||||
// Align up to a multiple of 16
|
||||
#define ALIGN_UP_16(a) ((a + 15) & ~15)
|
||||
|
||||
static const char *const duplex_mode_txt[] = {"FDD", "TDD"};
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef min
|
||||
#undef min
|
||||
|
||||
@@ -2085,7 +2085,6 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/ul_ref_seq_nr.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/sss_nr.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/scrambling_luts.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/dmrs_nr.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/refsig_defs_ue.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/ptrs_nr.h \
|
||||
|
||||
@@ -86,6 +86,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "time_meas.h"
|
||||
#include "utils.h"
|
||||
#include "x2ap_eNB.h"
|
||||
#include "openair1/SCHED_NR/sched_nr.h"
|
||||
|
||||
pthread_cond_t nfapi_sync_cond;
|
||||
pthread_mutex_t nfapi_sync_mutex;
|
||||
@@ -116,8 +117,7 @@ double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0},{20,0,0,0}};
|
||||
double rx_gain_off = 0.0;
|
||||
|
||||
static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/;
|
||||
int chain_offset=0;
|
||||
extern void *udp_eNB_task(void *args_p);
|
||||
int chain_offset = 0;
|
||||
int emulate_rf = 0;
|
||||
int numerology = 0;
|
||||
double cpuf;
|
||||
@@ -398,9 +398,6 @@ void terminate_task(task_id_t task_id, module_id_t mod_id) {
|
||||
itti_send_msg_to_task (task_id, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg);
|
||||
}
|
||||
|
||||
//extern void free_transport(PHY_VARS_gNB *);
|
||||
extern void nr_phy_free_RU(RU_t *);
|
||||
|
||||
int stop_L1(module_id_t gnb_id)
|
||||
{
|
||||
RU_t *ru = RC.ru[gnb_id];
|
||||
|
||||
@@ -91,7 +91,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "pdcp.h"
|
||||
#include "actor.h"
|
||||
|
||||
extern const char *duplex_mode[];
|
||||
THREAD_STRUCT thread_struct;
|
||||
nrUE_params_t nrUE_params = {0};
|
||||
|
||||
@@ -270,12 +269,13 @@ void init_openair0()
|
||||
openair0_cfg[card].tx_num_channels = min(4, frame_parms->nb_antennas_tx);
|
||||
openair0_cfg[card].rx_num_channels = min(4, frame_parms->nb_antennas_rx);
|
||||
|
||||
LOG_I(PHY, "HW: Configuring card %d, sample_rate %f, tx/rx num_channels %d/%d, duplex_mode %s\n",
|
||||
card,
|
||||
openair0_cfg[card].sample_rate,
|
||||
openair0_cfg[card].tx_num_channels,
|
||||
openair0_cfg[card].rx_num_channels,
|
||||
duplex_mode[openair0_cfg[card].duplex_mode]);
|
||||
LOG_I(PHY,
|
||||
"HW: Configuring card %d, sample_rate %f, tx/rx num_channels %d/%d, duplex_mode %s\n",
|
||||
card,
|
||||
openair0_cfg[card].sample_rate,
|
||||
openair0_cfg[card].tx_num_channels,
|
||||
openair0_cfg[card].rx_num_channels,
|
||||
duplex_mode_txt[openair0_cfg[card].duplex_mode]);
|
||||
|
||||
if (is_sidelink) {
|
||||
dl_carrier = frame_parms->dl_CarrierFreq;
|
||||
|
||||
@@ -361,6 +361,8 @@ void configure_rru(void *, void *arg);
|
||||
struct timespec timespec_add(struct timespec lhs, struct timespec rhs);
|
||||
struct timespec timespec_sub(struct timespec lhs, struct timespec rhs);
|
||||
extern uint8_t nfapi_mode;
|
||||
extern char *parallel_config;
|
||||
extern char *worker_config;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
-2
@@ -44,8 +44,6 @@
|
||||
// #define DEBUG_LDPC_ENCODING
|
||||
// #define DEBUG_LDPC_ENCODING_FREE 1
|
||||
|
||||
extern ldpc_interface_t ldpc_interface_segment;
|
||||
|
||||
typedef struct ldpc8blocks_args_s {
|
||||
nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters;
|
||||
encoder_implemparams_t impp;
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef struct ldpc_interface_s {
|
||||
} ldpc_interface_t;
|
||||
|
||||
// Global var to limit the rework of the dirty legacy code
|
||||
extern ldpc_interface_t ldpc_interface, ldpc_interface_offload;
|
||||
extern ldpc_interface_t ldpc_interface, ldpc_interface_offload, ldpc_interface_segment;
|
||||
|
||||
/* functions to load the LDPC shared lib, implemented in openair1/PHY/CODING/nrLDPC_load.c */
|
||||
int load_LDPClib(char *version, ldpc_interface_t *);
|
||||
|
||||
@@ -129,6 +129,7 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
|
||||
crcTableInit();
|
||||
init_byte2m128i();
|
||||
init_byte2bit16();
|
||||
init_pucch2_luts();
|
||||
|
||||
nr_init_fde(); // Init array for frequency equalization of transform precoding of PUSCH
|
||||
|
||||
@@ -36,12 +36,9 @@
|
||||
|
||||
#define I0_SKIP_DC 1
|
||||
|
||||
extern openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
|
||||
int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const c16_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size])
|
||||
{
|
||||
|
||||
int timing_advance = 0;
|
||||
int max_val = 0;
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params,
|
||||
const int slot,
|
||||
const csi_mapping_parms_t *phy_csi_parms);
|
||||
void init_byte2m128i(void);
|
||||
|
||||
void nr_generate_modulation_table(void);
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/* Lookup tables for 3GPP scrambling/unscrambling */
|
||||
|
||||
/* Author R. Knopp / EURECOM / OpenAirInterface.org */
|
||||
|
||||
#include "PHY/impl_defs_nr.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include <common/utils/LOG/log.h>
|
||||
|
||||
simde__m128i byte2m128i[256];
|
||||
|
||||
void init_byte2m128i(void) {
|
||||
|
||||
for (int s=0;s<256;s++) {
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*(s&1)),0);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>1)&1)),1);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>2)&1)),2);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>3)&1)),3);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>4)&1)),4);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>5)&1)),5);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>6)&1)),6);
|
||||
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>7)&1)),7);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
#include "nr_dlsch.h"
|
||||
#include "../../../nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
extern void set_taus_seed(unsigned int seed_type);
|
||||
|
||||
void nr_fill_dlsch_dl_tti_req(processingData_L1tx_t *msgTx, nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu)
|
||||
{
|
||||
NR_gNB_DLSCH_t *dlsch = &msgTx->dlsch[msgTx->num_pdsch_slot][0];
|
||||
|
||||
@@ -34,10 +34,7 @@
|
||||
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
|
||||
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h"
|
||||
#include "instrumentation.h"
|
||||
|
||||
|
||||
extern openair0_config_t openair0_cfg[];
|
||||
|
||||
#include "executables/nr-softmodem-common.h"
|
||||
// #define DEBUG_PDSCH
|
||||
// #define DEBUG_PDCCH
|
||||
// #define DEBUG_PBCH(a...) printf(a)
|
||||
|
||||
@@ -1515,8 +1515,8 @@ uint8_t nr_matrix_inverse(int32_t size,
|
||||
//Convert Q15 to floating point
|
||||
for (int rtx=0;rtx<size;rtx++) {//row
|
||||
for (int ctx=0;ctx<size;ctx++) {//column
|
||||
a44_cpx[ctx][rtx] = ((double)(a44[ctx][rtx])[i].r) / (1 << (shift0 - 1)) + I * ((double)(a44[ctx][rtx])[i].i) / (1 << (shift0 - 1));
|
||||
//if (i<4) printf("a44_cpx(%d,%d)= ((FP %d))%lf+(FP %d)j%lf \n",ctx,rtx,((short *)a44[ctx*size+rtx])[(i<<1)],creal(a44_cpx[ctx*size+rtx]),((short *)a44[ctx*size+rtx])[(i<<1)+1],cimag(a44_cpx[ctx*size+rtx]));
|
||||
a44_cpx[ctx][rtx] =
|
||||
((double)(a44[ctx][rtx])[i].r) / (1 << (shift0 - 1)) + I * ((double)(a44[ctx][rtx])[i].i) / (1 << (shift0 - 1));
|
||||
}
|
||||
}
|
||||
//Compute Matrix determinant (copy real value only)
|
||||
@@ -1527,13 +1527,10 @@ uint8_t nr_matrix_inverse(int32_t size,
|
||||
|
||||
//Round and convert to Q15 (Out in the same format as Fixed point).
|
||||
if (creal(determin_cpx)>0) {//determin of the symmetric matrix is real part only
|
||||
((short*) ad_bc)[i<<1] = (short) ((creal(determin_cpx)*(1<<(shift0)))+0.5);//
|
||||
//((short*) ad_bc)[(i<<1)+1] = (short) ((cimag(determin_cpx)*(1<<(shift0)))+0.5);//
|
||||
((short *)ad_bc)[i << 1] = (short)((creal(determin_cpx) * (1 << (shift0))) + 0.5); //
|
||||
} else {
|
||||
((short*) ad_bc)[i<<1] = (short) ((creal(determin_cpx)*(1<<(shift0)))-0.5);//
|
||||
//((short*) ad_bc)[(i<<1)+1] = (short) ((cimag(determin_cpx)*(1<<(shift0)))-0.5);//
|
||||
((short *)ad_bc)[i << 1] = (short)((creal(determin_cpx) * (1 << (shift0))) - 0.5); //
|
||||
}
|
||||
//if (i<4) printf("nr_det_FP= %d+j%d \n",((short*) ad_bc)[i<<1],((short*) ad_bc)[(i<<1)+1]);
|
||||
//Compute Inversion of the H^*H matrix (normalized output divide by determinant)
|
||||
for (int rtx=0;rtx<size;rtx++) {//row
|
||||
k=0;
|
||||
|
||||
@@ -39,14 +39,7 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_dci.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "openair2/NR_PHY_INTERFACE/nr_sched_response.h"
|
||||
|
||||
extern int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req);
|
||||
extern int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req);
|
||||
extern int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req);
|
||||
extern int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req);
|
||||
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
#include "nfapi/oai_integration/nfapi_vnf.h"
|
||||
|
||||
void handle_nr_nfapi_ssb_pdu(processingData_L1tx_t *msgTx,int frame,int slot,
|
||||
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdu)
|
||||
|
||||
@@ -42,9 +42,6 @@
|
||||
#include "assertions.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
uint8_t get_nr_prach_duration(uint8_t prach_format){
|
||||
|
||||
switch(prach_format){
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
#include "utils.h"
|
||||
#include "openair2/PHY_INTERFACE/queue_t.h"
|
||||
#include "SCHED_NR_UE/phy_sch_processing_time.h"
|
||||
|
||||
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
|
||||
#include "openair1/PHY/phy_extern_nr_ue.h"
|
||||
|
||||
const char *const dl_pdu_type[] = {"DCI", "DLSCH", "RA_DLSCH", "SI_DLSCH", "P_DLSCH", "CSI_RS", "CSI_IM", "TA"};
|
||||
const char *const ul_pdu_type[] = {"PRACH", "PUCCH", "PUSCH", "SRS"};
|
||||
|
||||
@@ -59,11 +59,6 @@
|
||||
#include "executables/thread-common.h"
|
||||
#include <openair3/ocp-gtpu/gtp_itf.h>
|
||||
|
||||
extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw);
|
||||
extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t bw);
|
||||
extern char *parallel_config;
|
||||
extern char *worker_config;
|
||||
|
||||
RAN_CONTEXT_t RC;
|
||||
|
||||
void RCconfig_L1(void) {
|
||||
|
||||
@@ -1235,10 +1235,12 @@ void eNB_Config_Local_DRX(instance_t module_idP, rrc_mac_drx_config_req_t *rrc_m
|
||||
|
||||
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
|
||||
uint8_t ul_subframe2_k_phich(COMMON_channels_t *cc, sub_frame_t ul_subframe);
|
||||
#endif
|
||||
/** @}*/
|
||||
|
||||
/* MAC ITTI messaging related functions */
|
||||
/* Main loop of MAC itti message handling */
|
||||
void *mac_enb_task(void *arg);
|
||||
|
||||
uint32_t to_earfcn_DL(int eutra_bandP, long long int dl_CarrierFreq, uint32_t bw);
|
||||
uint32_t to_earfcn_UL(int eutra_bandP, long long int ul_CarrierFreq, uint32_t bw);
|
||||
#endif
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
// #define DEBUG_MIB
|
||||
// #define ENABLE_MAC_PAYLOAD_DEBUG 1
|
||||
// #define DEBUG_RAR
|
||||
extern uint32_t N_RB_DL;
|
||||
|
||||
/* TS 36.213 Table 9.2.3-3: Mapping of values for one HARQ-ACK bit to sequences */
|
||||
static const int sequence_cyclic_shift_1_harq_ack_bit[2]
|
||||
/* HARQ-ACK Value 0 1 */
|
||||
|
||||
@@ -62,10 +62,6 @@
|
||||
#include "nfapi_nr_interface_scf.h"
|
||||
#include "utils.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
//extern int l2_init_gNB(void);
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
c16_t convert_precoder_weight(double complex c_in)
|
||||
{
|
||||
double cr = creal(c_in) * 32768 + 0.5;
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
#include "openair2/LAYER2/RLC/rlc.h"
|
||||
|
||||
#include <executables/softmodem-common.h>
|
||||
extern RAN_CONTEXT_t RC;
|
||||
extern const uint8_t nr_slots_per_frame[5];
|
||||
|
||||
// forward declaration of functions used in this file
|
||||
static void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
|
||||
#include "executables/softmodem-common.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
static void schedule_ssb(frame_t frame,
|
||||
sub_frame_t slot,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
|
||||
@@ -37,10 +37,8 @@
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
//#define UL_HARQ_PRINT
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
//#define ENABLE_MAC_PAYLOAD_DEBUG 1
|
||||
// #define UL_HARQ_PRINT
|
||||
// #define ENABLE_MAC_PAYLOAD_DEBUG 1
|
||||
|
||||
uint32_t target_dl_mcs = 9;
|
||||
uint32_t target_dl_Nl = 1;
|
||||
|
||||
@@ -63,12 +63,9 @@
|
||||
|
||||
#include "common/utils/alg/find.h"
|
||||
|
||||
//#define DEBUG_DCI
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
// CQI TABLES (10 times the value in 214 to adequately compare with R)
|
||||
// Table 1 (38.214 5.2.2.1-2)
|
||||
// #define DEBUG_DCI
|
||||
// CQI TABLES (10 times the value in 214 to adequately compare with R)
|
||||
// Table 1 (38.214 5.2.2.1-2)
|
||||
static const uint16_t cqi_table1[16][2] = {{0, 0},
|
||||
{2, 780},
|
||||
{2, 1200},
|
||||
|
||||
@@ -37,10 +37,7 @@
|
||||
#include <math.h>
|
||||
#include "PHY/sse_intrin.h"
|
||||
|
||||
//#define SRS_DEBUG
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
// #define SRS_DEBUG
|
||||
const uint16_t m_SRS[64] = { 4, 8, 12, 16, 16, 20, 24, 24, 28, 32, 36, 40, 48, 48, 52, 56, 60, 64, 72, 72, 76, 80, 88,
|
||||
96, 96, 104, 112, 120, 120, 120, 128, 128, 128, 132, 136, 144, 144, 144, 144, 152, 160,
|
||||
160, 160, 168, 176, 184, 192, 192, 192, 192, 208, 216, 224, 240, 240, 240, 240, 256, 256,
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
#include "common/ran_context.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
static void nr_fill_nfapi_pucch(gNB_MAC_INST *nrmac,
|
||||
frame_t frame,
|
||||
sub_frame_t slot,
|
||||
|
||||
@@ -72,9 +72,6 @@
|
||||
#include "time_meas.h"
|
||||
#include "utils.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
|
||||
#define MACSTATSSTRLEN 36256
|
||||
|
||||
void *nrmac_stats_thread(void *arg) {
|
||||
|
||||
@@ -41,9 +41,6 @@
|
||||
#include "openair2/F1AP/f1ap_du_rrc_message_transfer.h"
|
||||
#include "openair2/F1AP/f1ap_ids.h"
|
||||
#include "openair3/ocp-gtpu/gtp_itf.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <executables/softmodem-common.h>
|
||||
|
||||
@@ -45,22 +45,11 @@
|
||||
#include "openair2/NR_PHY_INTERFACE/nr_sched_response.h"
|
||||
#include "openair2/PHY_INTERFACE/queue_t.h"
|
||||
#include "utils.h"
|
||||
#include "nfapi/oai_integration/nfapi_pnf.h"
|
||||
|
||||
#define MAX_IF_MODULES 100
|
||||
|
||||
static NR_IF_Module_t *nr_if_inst[MAX_IF_MODULES];
|
||||
extern int oai_nfapi_harq_indication(nfapi_harq_indication_t *harq_ind);
|
||||
extern int oai_nfapi_crc_indication(nfapi_crc_indication_t *crc_ind);
|
||||
extern int oai_nfapi_cqi_indication(nfapi_cqi_indication_t *cqi_ind);
|
||||
extern int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind);
|
||||
extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
|
||||
extern int oai_nfapi_nr_slot_indication(nfapi_nr_slot_indication_scf_t *ind);
|
||||
extern int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind);
|
||||
extern int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind);
|
||||
extern int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind);
|
||||
extern int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind);
|
||||
extern int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind);
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
static void handle_nr_rach(NR_UL_IND_t *UL_info)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,6 @@ void read_channel_param(const nfapi_nr_dl_tti_pdsch_pdu_rel15_t * pdu, int slot,
|
||||
return;
|
||||
}
|
||||
|
||||
extern nr_bler_struct nr_bler_data[NR_NUM_MCS];
|
||||
float get_bler_val(uint8_t mcs, int sinr)
|
||||
{
|
||||
// 4th col = dropped packets, 5th col = total packets
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "uper_encoder.h"
|
||||
#include "uper_decoder.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_proto.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "assertions.h"
|
||||
#include "common/ran_context.h"
|
||||
@@ -104,23 +105,8 @@
|
||||
#define NUMBEROF_DRBS_TOBE_ADDED 1
|
||||
static int encode_CG_ConfigInfo(char *buffer,int buffer_size,rrc_eNB_ue_context_t *const ue_context_pP,int *enc_size);
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
extern eNB_MAC_INST *eNB_mac_inst;
|
||||
extern UE_MAC_INST *UE_mac_inst;
|
||||
|
||||
|
||||
mui_t rrc_eNB_mui = 0;
|
||||
|
||||
extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw);
|
||||
extern int rrc_eNB_process_security(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, security_capabilities_t *security_capabilities_pP);
|
||||
extern void process_eNB_security_key(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
uint8_t *security_key_pP);
|
||||
extern int rrc_eNB_generate_RRCConnectionReconfiguration_endc(protocol_ctxt_t *ctxt, rrc_eNB_ue_context_t *ue_context, unsigned char *buffer, int buffer_size, OCTET_STRING_t *scg_group_config,
|
||||
OCTET_STRING_t *scg_RB_config);
|
||||
extern struct rrc_eNB_ue_context_s *get_first_ue_context(eNB_RRC_INST *rrc_instance_pP);
|
||||
|
||||
pthread_mutex_t rrc_release_freelist;
|
||||
RRC_release_list_t rrc_release_info;
|
||||
pthread_mutex_t lock_ue_freelist;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_proto.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "RRC/LTE/MESSAGES/asn1_msg.h"
|
||||
@@ -396,7 +397,9 @@ static e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_inte
|
||||
return INTEGRITY_ALGORITHM_NONE;
|
||||
}
|
||||
|
||||
/*! \fn int rrc_eNB_process_security (uint8_t mod_id, uint8_t ue_index, security_capabilities_t *security_capabilities)
|
||||
/*! \fn int rrc_eNB_process_security(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
security_capabilities_t *security_capabilities_pP)
|
||||
*\brief save and analyze available security algorithms bit mask and select relevant ones.
|
||||
*\param mod_id Instance ID of eNB.
|
||||
*\param ue_index Instance ID of UE in the eNB.
|
||||
|
||||
@@ -654,5 +654,16 @@ extern pthread_mutex_t lock_ue_freelist;
|
||||
void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti);
|
||||
void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, bool removeFlag);
|
||||
void release_UE_in_freeList(module_id_t mod_id);
|
||||
|
||||
int rrc_eNB_process_security(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
security_capabilities_t *security_capabilities_pP);
|
||||
void process_eNB_security_key(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
uint8_t *security_key_pP);
|
||||
int rrc_eNB_generate_RRCConnectionReconfiguration_endc(protocol_ctxt_t *ctxt,
|
||||
rrc_eNB_ue_context_t *ue_context,
|
||||
unsigned char *buffer,
|
||||
int buffer_size,
|
||||
OCTET_STRING_t *scg_group_config,
|
||||
OCTET_STRING_t *scg_RB_config);
|
||||
/** @}*/
|
||||
|
||||
@@ -153,8 +153,6 @@ typedef struct xer_sprint_string_s {
|
||||
size_t string_index;
|
||||
} xer_sprint_string_t;
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
/*
|
||||
* This is a helper function for xer_sprint, which directs all incoming data
|
||||
* into the provided string.
|
||||
|
||||
@@ -101,10 +101,6 @@
|
||||
#include "openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_extern.h"
|
||||
#endif
|
||||
|
||||
//#define XER_PRINT
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
mui_t rrc_gNB_mui = 0;
|
||||
|
||||
typedef struct deliver_ue_ctxt_release_data_t {
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#include "rrc_eNB_GTPV1U.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
int rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(gNB_RRC_UE_t *ue,
|
||||
const gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP,
|
||||
uint8_t *inde_list)
|
||||
|
||||
@@ -87,8 +87,6 @@
|
||||
#include "openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_extern.h"
|
||||
#endif
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
/* Masks for NGAP Encryption algorithms, NEA0 is always supported (not coded) */
|
||||
static const uint16_t NGAP_ENCRYPTION_NEA1_MASK = 0x8000;
|
||||
static const uint16_t NGAP_ENCRYPTION_NEA2_MASK = 0x4000;
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "ngap_messages_types.h"
|
||||
#include "nr_rrc_defs.h"
|
||||
|
||||
extern mui_t rrc_gNB_mui;
|
||||
|
||||
void rrc_gNB_send_NGAP_NAS_FIRST_REQ(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, NR_RRCSetupComplete_IEs_t *rrcSetupComplete);
|
||||
|
||||
int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t instance);
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
#include "MESSAGES/asn1_msg.h"
|
||||
#include "nr_pdcp/nr_pdcp_oai_api.h"
|
||||
#include "openair3/SECU/key_nas_deriver.h"
|
||||
|
||||
/* declared in rrc_gNB.c: should be cleaned up through helper function? useful? */
|
||||
extern mui_t rrc_gNB_mui;
|
||||
#include "openair2/RRC/NR/rrc_gNB_NGAP.h"
|
||||
|
||||
typedef enum { HO_CTX_BOTH, HO_CTX_SOURCE, HO_CTX_TARGET } ho_ctx_type_t;
|
||||
static nr_handover_context_t *alloc_ho_ctx(ho_ctx_type_t type)
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
|
||||
#define MAX_NAS_UE 4
|
||||
|
||||
extern uint16_t NB_UE_INST;
|
||||
static nr_ue_nas_t nr_ue_nas[MAX_NAS_UE] = {0};
|
||||
static nr_nas_msg_snssai_t nas_allowed_nssai[8];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user