Commit 6d90aaaa authored by Robert Schmidt's avatar Robert Schmidt

(Almost) Remove all PHY/phy_vars* and PHY/phy_extern

parent 4e144dba
......@@ -2244,7 +2244,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/defs_L1_NB_IoT.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/phy_extern_ue.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/defs_gNB.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/primary_synch.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/defs_NB_IoT.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/lte_refsig.h \
......
......@@ -51,6 +51,7 @@
#include "PHY/defs_common.h"
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h"
......@@ -105,13 +106,6 @@ void wait_eNBs(void);
const char ru_states[6][9] = {"RU_IDLE","RU_CONFIG","RU_READY","RU_RUN","RU_ERROR","RU_SYNC"};
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
#if defined(PRE_SCD_THREAD)
#include "common/ran_context.h"
#include "nfapi/oai_integration/vendor_ext.h"
......
......@@ -49,12 +49,14 @@
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "PHY/phy_vars.h"
#include "PHY/phy_extern.h"
#include "PHY/TOOLS/phy_scope_interface.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/INIT/phy_init.h"
#include "openair2/ENB_APP/enb_paramdef.h"
#include "system.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include <executables/softmodem-common.h>
#include <executables/thread-common.h>
......
......@@ -20,6 +20,7 @@
*/
#include "phy_init.h"
#include "PHY/phy_extern.h"
#include "SCHED/sched_eNB.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#include "SIMULATION/TOOLS/sim.h"
......@@ -33,8 +34,6 @@
void init_7_5KHz(void);
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
int phy_init_RU(RU_t *ru) {
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
RU_CALIBRATION *calibration = &ru->calibration;
......
......@@ -20,6 +20,7 @@
*/
#include "phy_init.h"
#include "PHY/phy_extern.h"
#include "SCHED/sched_common.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
......@@ -28,8 +29,6 @@
void init_prach_ru_list(RU_t *ru);
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
int nr_phy_init_RU(RU_t *ru) {
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
......
......@@ -28,7 +28,7 @@
//#include <string.h>
#include <math.h>
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
// Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs)
......
......@@ -38,6 +38,7 @@
//#include "defs.h"
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#if defined(__x86_64__) || defined(__i386__)
#include "pss6144.h"
......
......@@ -23,6 +23,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "common/utils/LOG/log.h"
#include "PHY/sse_intrin.h"
......
......@@ -20,7 +20,7 @@
*/
#include "PHY/defs_eNB.h"
//#include "PHY/phy_extern.h"
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"
//#define DEBUG_CH
#include "common/utils/LOG/log.h"
......@@ -35,8 +35,6 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
#define SCALE 0x3FFF
static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
L1_rxtx_proc_t *proc,
LTE_eNB_ULSCH_t * ulsch,
......
......@@ -5,7 +5,6 @@ lte_gold.c : Generators for LTE gold sequences (used for pilots and scr
lte_ul_ref.c : UL DRS signal generation for TX and RX
defs.h : data structures and function prototypes
mod_table.h : lookup tables for QAM modulation (CBMIMO1 tables)
primary_synch.h : 3 PSS sequences
primary_synch.m : MATLAB/OCTAVE generator for PSS
gen_mod_table.m : MATLAB/OCTAVE generator for CBMIMO1 mod_table.h
lte_ul.m : MATLAB/OCTAVE generator for UL (SC-FDMA) DFT sizes
......
/*
* 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
*/
short primary_synch0[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-26120,-19785,11971,-30502,-24020,-22288,32117,6492,31311,9658,-16384,-28378,25100,-21063,-7292,-31946,20429,25618,14948,29158,11971,-30502,31311,9658,25100,-21063,-16384,28377,-24020,22287,32117,6492,-7292,31945,20429,25618,-26120,-19785,-16384,-28378,-16384,28377,-26120,-19785,-32402,4883,31311,-9659,32117,6492,-7292,-31946,32767,-1,25100,-21063,-24020,22287,-32402,4883,-32402,4883,-24020,22287,25100,-21063,32767,-1,-7292,-31946,32117,6492,31311,-9659,-32402,4883,-26120,-19785,-16384,28377,-16384,-28378,-26120,-19785,20429,25618,-7292,31945,32117,6492,-24020,22287,-16384,28377,25100,-21063,31311,9658,11971,-30502,14948,29158,20429,25618,-7292,-31946,25100,-21063,-16384,-28378,31311,9658,32117,6492,-24020,-22288,11971,-30502,-26120,-19785,32767,0,0,0,0,0,0,0,0,0,0,0};
short primary_synch1[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,-8086,-24020,-22288,2448,32675,-26120,19784,27073,18458,-16384,28377,25100,21062,-29523,14217,-7292,31945,-13477,-29868,-24020,-22288,27073,18458,25100,21062,-16384,-28378,2448,-32676,-26120,19784,-29523,-14218,-7292,31945,-31754,-8086,-16384,28377,-16384,-28378,-31754,-8086,31311,-9659,27073,-18459,-26120,19784,-29523,14217,32767,-1,25100,21062,2448,-32676,31311,-9659,31311,-9659,2448,-32676,25100,21062,32767,0,-29523,14217,-26120,19784,27073,-18459,31311,-9659,-31754,-8086,-16384,-28378,-16384,28377,-31754,-8086,-7292,31945,-29523,-14218,-26120,19784,2448,-32676,-16384,-28378,25100,21062,27073,18458,-24020,-22288,-13477,-29868,-7292,31945,-29523,14217,25100,21062,-16384,28377,27073,18458,-26120,19784,2448,32675,-24020,-22288,-31754,-8086,32767,0,0,0,0,0,0,0,0,0,0,0};
short primary_synch2[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,8085,-24020,22287,2448,-32676,-26120,-19785,27073,-18459,-16384,-28378,25100,-21063,-29523,-14218,-7292,-31946,-13477,29867,-24020,22287,27073,-18459,25100,-21063,-16384,28377,2448,32675,-26120,-19785,-29523,14217,-7292,-31946,-31754,8085,-16384,-28378,-16384,28377,-31754,8085,31311,9658,27073,18458,-26120,-19785,-29523,-14218,32767,0,25100,-21063,2448,32675,31311,9658,31311,9658,2448,32675,25100,-21063,32767,0,-29523,-14218,-26120,-19785,27073,18458,31311,9658,-31754,8085,-16384,28377,-16384,-28378,-31754,8085,-7292,-31946,-29523,14217,-26120,-19785,2448,32675,-16384,28377,25100,-21063,27073,-18459,-24020,22287,-13477,29867,-7292,-31946,-29523,-14218,25100,-21063,-16384,-28378,27073,-18459,-26120,-19785,2448,-32676,-24020,22287,-31754,8085,32767,-1,0,0,0,0,0,0,0,0,0,0};
unsigned char primary_synch0_tab[72] = {0,0,0,0,0,85,110,97,109,146,145,106,92,103,139,137,97,145,92,127,124,146,130,139,110,106,127,110,118,88,146,103,85,92,124,118,118,124,92,85,103,146,88,118,110,127,106,110,139,130,146,124,127,92,145,97,137,139,103,92,106,145,146,109,97,110,85,0,0,0,0,0};
unsigned char primary_synch1_tab[72] = {0,0,0,0,0,85,114,109,133,123,142,127,141,121,130,105,109,142,141,106,100,123,112,130,114,127,106,114,88,91,123,121,85,141,100,88,88,100,141,85,121,123,91,88,114,106,127,114,130,112,123,100,106,141,142,109,105,130,121,141,127,142,123,133,109,114,85,0,0,0,0,0};
unsigned char primary_synch2_tab[72] = {0,0,0,0,0,85,119,124,100,110,91,106,92,112,103,128,124,91,92,127,133,110,121,103,119,106,127,119,145,142,110,112,85,92,133,145,145,133,92,85,112,110,142,145,119,127,106,119,103,121,110,133,127,92,91,124,128,103,112,92,106,91,110,100,124,119,85,0,0,0,0,0};
......@@ -163,8 +163,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT);
}
uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
void init_scrambling_lut(void) {
uint32_t s;
int i=0,j;
......@@ -215,6 +214,7 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
}
}
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
void init_unscrambling_lut(void) {
uint32_t s;
int i=0,j;
......
......@@ -19,6 +19,9 @@
* contact@openairinterface.org
*/
#ifndef DLSCH_TBS_H_
#define DLSCH_TBS_H_
static const unsigned int dlsch_tbs25[27][25] = {
{16, 32, 56, 88, 120, 152, 176, 208, 224, 256, 288, 328, 344, 376, 392, 424, 456, 488, 504, 536, 568, 600, 616, 648, 680},
{24, 56, 88, 144, 176, 208, 224, 256, 328, 344, 376, 424, 456, 488, 520, 568, 600, 632, 680, 712, 744, 776, 808, 872, 904},
......@@ -47,3 +50,5 @@ static const unsigned int dlsch_tbs25[27][25] = {
{584, 1192, 1800, 2408, 2984, 3624, 4264, 4968, 5544, 5992, 6712, 7224, 7992, 8504, 9144, 9912, 10296, 11064, 11448, 12216, 12960, 13536, 14112, 14688, 15264},
{616, 1256, 1864, 2536, 3112, 3752, 4392, 5160, 5736, 6200, 6968, 7480, 8248, 8760, 9528, 10296, 10680, 11448, 12216, 12576, 13536, 14112, 14688, 15264, 15840},
{712, 1480, 2216, 2984, 3752, 4392, 5160, 5992, 6712, 7480, 8248, 8760, 9528, 10296, 11064, 11832, 12576, 13536, 14112, 14688, 15264, 16416, 16992, 17568, 18336}};
#endif /* DLSCH_TBS_H_ */
This diff is collapsed.
......@@ -48,7 +48,7 @@ int generate_pss(int32_t **txdataF,
unsigned int Nsymb;
unsigned short k,m,aa,a;
uint8_t Nid2;
short *primary_sync;
const short *primary_sync;
Nid2 = frame_parms->Nid_cell % 3;
switch (Nid2) {
......
......@@ -40,8 +40,6 @@
#include "T.h"
//extern char* namepointer_chMag ;
//eren
//extern int **ulchmag_eren;
//eren
......@@ -1044,7 +1042,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
L1_rxtx_proc_t *proc,
uint8_t UE_id) {
LTE_eNB_ULSCH_t **ulsch = eNB->ulsch;
// flagMag = 0;
LTE_eNB_COMMON *common_vars = &eNB->common_vars;
LTE_eNB_PUSCH *pusch_vars = eNB->pusch_vars[UE_id];
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
......
......@@ -37,6 +37,7 @@
#include "PHY/phy_vars.h"
#endif
#include "assertions.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
//#define DEBUG_HARQ
......@@ -60,10 +61,67 @@
#define LOG_I(A,B...) printf(B)
*/
int flag_LA=0;
extern uint16_t beta_cqi[16];
extern uint16_t beta_ri[16];
extern uint16_t beta_ack[16];
static const double p_qpsk[8] = {5982.42405670359,
-21568.1135917693,
31293.9987036905,
-23394.6795043871,
9608.34750585489,
-2158.15802349899,
267.731968719036,
-20.6145324295965};
static const double p_qam16[8] = {7862.12690694170,
-28510.3207048338,
41542.2150287122,
-31088.3036957379,
12690.1982361016,
-2785.66604739984,
326.595462489375,
-18.9911849872089};
static const double p_qam64[8] = {8832.57933013696,
-32119.1802555952,
46914.2578990397,
-35163.8150557183,
14343.7419388853,
-3126.61025510092,
360.954930562237,
-18.0358548533343};
static const double q_qpsk[8] = {1.94491167814437e-09,
8.40494123817774e-08,
4.75527131198034e-07,
-2.48946285301621e-05,
-0.000347614016158364,
0.00209252225437100,
0.0742986115462510,
0.488297879889425};
static const double q_qam16[8] = {3.21151853033897e-10,
5.55435952230651e-09,
-2.30760065362117e-07,
-6.25587743817859e-06,
4.62251036452795e-06,
0.00224150813158937,
0.0393723140344367,
0.245486379182639};
static const double q_qam64[8] = {2.25934026232206e-11,
-1.45992206328306e-10,
-3.70861183071900e-08,
-1.22206071019319e-06,
6.49115500399637e-06,
0.00129828997837433,
0.0259669554914859,
0.166602901214898};
static const double sinr_to_cqi[4][16] = {
{-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
};
static int errorRB(int rb, char * table, int line) {
LOG_E(PHY,"Received %d rb, impossble in table %s, at line %d\n", rb, table, line);
return 0;
......@@ -2926,7 +2984,6 @@ uint16_t quantize_wideband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id)
uint8_t sinr2cqi(double sinr,uint8_t trans_mode)
{
// int flag_LA=0;
uint8_t retValue = 0;
......
......@@ -30,7 +30,7 @@
* \warning
*/
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "SCHED_UE/sched_UE.h"
#include "transport_ue.h"
#include "transport_proto_ue.h"
......
......@@ -36,7 +36,7 @@
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "transport_ue.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
......
......@@ -32,7 +32,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
......
......@@ -32,6 +32,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
......
......@@ -35,6 +35,7 @@
#include "LAYER2/MAC/mac.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "transport_proto_ue.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "assertions.h"
......
......@@ -30,60 +30,22 @@
* \warning
*/
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "common/utils/LOG/log.h"
unsigned short msrsb_6_40[8][4] = {{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4},
{12,4,4,4},
{8,4,4,4},
{4,4,4,4}
};
unsigned short msrsb_41_60[8][4] = {{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4}
static unsigned short msrsb_6_40[8][4] = {
{36, 12, 4, 4},
{32, 16, 8, 4},
{24, 4, 4, 4},
{20, 4, 4, 4},
{16, 4, 4, 4},
{12, 4, 4, 4},
{8, 4, 4, 4},
{4, 4, 4, 4}
};
unsigned short msrsb_61_80[8][4] = {{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
static unsigned short msrsb_41_60[8][4] = {
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4}
};
unsigned short msrsb_81_110[8][4] = {{96,48,24,4},
{96,32,16,4},
{80,40,20,4},
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4}
};
unsigned short Nb_6_40[8][4] = {{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4},
{12,4,4,4},
{8,4,4,4},
{4,4,4,4}
};
unsigned short Nb_41_60[8][4] = {{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
......@@ -93,7 +55,8 @@ unsigned short Nb_41_60[8][4] = {{48,24,12,4},
{16,4,4,4}
};
unsigned short Nb_61_80[8][4] = {{72,24,12,4},
static unsigned short msrsb_61_80[8][4] = {
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
......@@ -103,7 +66,8 @@ unsigned short Nb_61_80[8][4] = {{72,24,12,4},
{32,16,8,4}
};
unsigned short Nb_81_110[8][4] = {{96,48,24,4},
static unsigned short msrsb_81_110[8][4] = {
{96,48,24,4},
{96,32,16,4},
{80,40,20,4},
{72,24,12,4},
......
......@@ -31,7 +31,7 @@
*/
#include "PHY/defs_UE.h"
#include "transport_ue.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/MODULATION/modulation_UE.h"
//#define DEBUG_SSS
......@@ -44,7 +44,7 @@ int pss_ch_est(PHY_VARS_UE *ue,
int32_t sss_ext[4][72])
{
int16_t *pss;
const int16_t *pss;
int16_t *pss_ext2,*sss_ext2,*sss_ext3,tmp_re,tmp_im,tmp_re2,tmp_im2;
uint8_t aarx,i;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
......
......@@ -56,7 +56,6 @@ void print_CQI(void *o,UCI_format_t uci_format,unsigned char eNB_id,int N_RB_DL)
switch(uci_format) {
case wideband_cqi_rank1_2A:
#ifdef DEBUG_UCI
LOG_D(PHY,"[PRINT CQI] flat_LA %d\n", flag_LA);
switch(N_RB_DL) {
case 6:
LOG_I(PHY,"[PRINT CQI] wideband_cqi rank 1: eNB %d, cqi %d\n",eNB_id,
......
......@@ -38,6 +38,7 @@
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_UE_TRANSPORT/transport_ue.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
//#define DEBUG_ULSCH_CODING
//#define DEBUG_ULSCH_FREE 1
......
......@@ -38,6 +38,7 @@
#include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
//#define DEBUG_ULSCH_MODULATION
......
......@@ -38,7 +38,7 @@
#include "executables/softmodem-common.h"
#include "nr_transport_proto_ue.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/sse_intrin.h"
#include "common/utils/nr/nr_common.h"
......
......@@ -29,7 +29,7 @@
* \warning
*/
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "nr_transport_proto_ue.h"
#include "PHY/sse_intrin.h"
......
......@@ -24,80 +24,107 @@
#include "PHY/defs_common.h"
extern char* namepointer_chMag ;
extern char* namepointer_log2;
extern char fmageren_name2[512];
extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX];
extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "PHY/defs_RU.h"
extern unsigned int DAQ_MBOX;
extern int number_of_cards;
extern const short conjugate[8],conjugate2[8];
extern short primary_synch0[144];
extern short primary_synch1[144];
extern short primary_synch2[144];
extern unsigned char primary_synch0_tab[72];
extern unsigned char primary_synch1_tab[72];
extern unsigned char primary_synch2_tab[72];
extern int flagMag;
//extern short **txdataF_rep_tmp;
extern char mode_string[4][20];
static const short conjugate[8] __attribute__((aligned(16))) = {-1, 1, -1, 1, -1, 1, -1, 1};
static const short conjugate2[8] __attribute__((aligned(16))) = {1, -1, 1, -1, 1, -1, 1, -1};
static const short primary_synch0[144] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -26120, -19785, 11971, -30502,
-24020, -22288, 32117, 6492, 31311, 9658, -16384, -28378, 25100, -21063, -7292, -31946, 20429, 25618, 14948, 29158,
11971, -30502, 31311, 9658, 25100, -21063, -16384, 28377, -24020, 22287, 32117, 6492, -7292, 31945, 20429, 25618,
-26120, -19785, -16384, -28378, -16384, 28377, -26120, -19785, -32402, 4883, 31311, -9659, 32117, 6492, -7292, -31946,
32767, -1, 25100, -21063, -24020, 22287, -32402, 4883, -32402, 4883, -24020, 22287, 25100, -21063, 32767, -1,
-7292, -31946, 32117, 6492, 31311, -9659, -32402, 4883, -26120, -19785, -16384, 28377, -16384, -28378, -26120, -19785,
20429, 25618, -7292, 31945, 32117, 6492, -24020, 22287, -16384, 28377, 25100, -21063, 31311, 9658, 11971, -30502,
14948, 29158, 20429, 25618, -7292, -31946, 25100, -21063, -16384, -28378, 31311, 9658, 32117, 6492, -24020, -22288,
11971, -30502, -26120, -19785, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static const short primary_synch1[144] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -31754, -8086, -24020, -22288,
2448, 32675, -26120, 19784, 27073, 18458, -16384, 28377, 25100, 21062, -29523, 14217, -7292, 31945, -13477, -29868,
-24020, -22288, 27073, 18458, 25100, 21062, -16384, -28378, 2448, -32676, -26120, 19784, -29523, -14218, -7292, 31945,
-31754, -8086, -16384, 28377, -16384, -28378, -31754, -8086, 31311, -9659, 27073, -18459, -26120, 19784, -29523, 14217,
32767, -1, 25100, 21062, 2448, -32676, 31311, -9659, 31311, -9659, 2448, -32676, 25100, 21062, 32767, 0,
-29523, 14217, -26120, 19784, 27073, -18459, 31311, -9659, -31754, -8086, -16384, -28378, -16384, 28377, -31754, -8086,
-7292, 31945, -29523, -14218, -26120, 19784, 2448, -32676, -16384, -28378, 25100, 21062, 27073, 18458, -24020, -22288,
-13477, -29868, -7292, 31945, -29523, 14217, 25100, 21062, -16384, 28377, 27073, 18458, -26120, 19784, 2448, 32675,
-24020, -22288, -31754, -8086, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static const short primary_synch2[144] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -31754, 8085, -24020, 22287,
2448, -32676, -26120, -19785, 27073, -18459, -16384, -28378, 25100, -21063, -29523, -14218, -7292, -31946, -13477, 29867,
-24020, 22287, 27073, -18459, 25100, -21063, -16384, 28377, 2448, 32675, -26120, -19785, -29523, 14217, -7292, -31946,
-31754, 8085, -16384, -28378, -16384, 28377, -31754, 8085, 31311, 9658, 27073, 18458, -26120, -19785, -29523, -14218,
32767, 0, 25100, -21063, 2448, 32675, 31311, 9658, 31311, 9658, 2448, 32675, 25100, -21063, 32767, 0,
-29523, -14218, -26120, -19785, 27073, 18458, 31311, 9658, -31754, 8085, -16384, 28377, -16384, -28378, -31754, 8085,
-7292, -31946, -29523, 14217, -26120, -19785, 2448, 32675, -16384, 28377, 25100, -21063, 27073, -18459, -24020, 22287,
-13477, 29867, -7292, -31946, -29523, -14218, 25100, -21063, -16384, -28378, 27073, -18459, -26120, -19785, 2448, -32676,
-24020, 22287, -31754, 8085, 32767, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern unsigned char NB_RU;
extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern const double p_qpsk[8];
extern const double p_qam16[8];
extern const double p_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
static const char NB_functions[7][20] = {
"eNodeB_3GPP",
"eNodeB_3GPP_BBU",
"NGFI_RAU_IF4p5",
"NGFI_RRU_IF5",
"NGFI_RRU_IF4p5",
"gNodeB_3GPP",
};
static const char NB_timing[2][20] = {"synch_to_ext_device", "synch_to_other"};
static const char ru_if_types[MAX_RU_IF_TYPES][20] = {"local RF", "IF5 RRU", "IF5 Mobipass", "IF4p5 RRU", "IF1pp RRU"};
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
extern unsigned short msrsb_6_40[8][4];
extern unsigned short msrsb_41_60[8][4];
extern unsigned short msrsb_61_80[8][4];
extern unsigned short msrsb_81_110[8][4];
extern unsigned short Nb_6_40[8][4];
extern unsigned short Nb_41_60[8][4];
extern unsigned short Nb_61_80[8][4];
extern unsigned short Nb_81_110[8][4];
static const unsigned short Nb_6_40[8][4] = {
{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4},
{12,4,4,4},
{8,4,4,4},
{4,4,4,4}
};
static const unsigned short Nb_41_60[8][4] = {
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4}
};
static const unsigned short Nb_61_80[8][4] = {
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4}
};
static const unsigned short Nb_81_110[8][4] = {
{96,48,24,4},
{96,32,16,4},
{80,40,20,4},
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4}
};
static const uint8_t alpha_lut[8] = {0, 40, 50, 60, 70, 80, 90, 100};
extern uint8_t alpha_lut[8];
extern uint8_t max_turbo_iterations;
extern double cpuf;
#endif /*__PHY_EXTERN_H__ */
......@@ -23,90 +23,7 @@
#define __PHY_EXTERN_NR_UE__H__
#include "PHY/defs_nr_UE.h"
//#include "common/ran_context.h"
#ifdef XFORMS
#include "PHY/TOOLS/nr_phy_scope.h"
extern uint32_t do_forms;
#endif
extern char* namepointer_chMag ;
extern char* namepointer_log2;
extern char fmageren_name2[512];
extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX];
extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
extern const short conjugate[8],conjugate2[8];
extern int number_of_cards;
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
extern short primary_synch0[144];
extern short primary_synch1[144];
extern short primary_synch2[144];
extern unsigned char primary_synch0_tab[72];
extern unsigned char primary_synch1_tab[72];
extern unsigned char primary_synch2_tab[72];
extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
extern int flagMag;
//extern short **txdataF_rep_tmp;
extern char mode_string[4][20];
extern unsigned char NB_RU;
extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
extern unsigned short msrsb_6_40[8][4];
extern unsigned short msrsb_41_60[8][4];
extern unsigned short msrsb_61_80[8][4];
extern unsigned short msrsb_81_110[8][4];
extern unsigned short Nb_6_40[8][4];
extern unsigned short Nb_41_60[8][4];
extern unsigned short Nb_61_80[8][4];
extern unsigned short Nb_81_110[8][4];
extern uint16_t hundred_times_log10_NPRB[100];
extern uint8_t alpha_lut[8];
extern uint8_t max_turbo_iterations;
extern double cpuf;
#endif /*__PHY_EXTERN_H__ */
......@@ -24,79 +24,9 @@
#include "PHY/defs_UE.h"
extern char* namepointer_chMag ;
extern char* namepointer_log2;
extern char fmageren_name2[512];
extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX];
extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
#include "PHY/LTE_TRANSPORT/transport_vars.h"
extern int number_of_cards;
extern const short conjugate[8],conjugate2[8];
extern PHY_VARS_UE ***PHY_vars_UE_g;
extern short primary_synch0[144];
extern short primary_synch1[144];
extern short primary_synch2[144];
extern unsigned char primary_synch0_tab[72];
extern unsigned char primary_synch1_tab[72];
extern unsigned char primary_synch2_tab[72];
extern int flagMag;
//extern short **txdataF_rep_tmp;
extern char mode_string[4][20];
extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern const double p_qpsk[8];
extern const double p_qam16[8];
extern const double p_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
extern unsigned short msrsb_6_40[8][4];
extern unsigned short msrsb_41_60[8][4];
extern unsigned short msrsb_61_80[8][4];
extern unsigned short msrsb_81_110[8][4];
extern unsigned short Nb_6_40[8][4];
extern unsigned short Nb_41_60[8][4];
extern unsigned short Nb_61_80[8][4];
extern unsigned short Nb_81_110[8][4];
extern uint8_t alpha_lut[8];
extern uint8_t max_turbo_iterations;
#endif /*__PHY_EXTERN_H__ */
This diff is collapsed.
......@@ -22,16 +22,8 @@
#ifndef __PHY_VARS_NR_UE_H__
#define __PHY_VARS_NR_UE_H__
#include "PHY/types.h"
#include "PHY/defs_nr_UE.h"
#include "common/ran_context.h"
PHY_VARS_NR_UE ***PHY_vars_UE_g;
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
#endif
This diff is collapsed.
......@@ -68,7 +68,7 @@
#define NS_PER_SLOT 500000
char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
static const char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
extern double cpuf;
......
......@@ -35,6 +35,7 @@
#include "PHY/defs_UE.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "nfapi/oai_integration/vendor_ext.h"
......@@ -62,8 +63,6 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p
uint8_t alpha_lut[8] = {0,40,50,60,70,80,90,100};
void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t j, uint8_t abstraction_flag) {
uint8_t harq_pid = subframe2harq_pid(&ue->frame_parms,
proc->frame_tx,
......
......@@ -33,6 +33,7 @@
#include "PHY/defs_UE.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "openair1/SCHED/sched_common_extern.h"
......
......@@ -54,6 +54,7 @@
#include "executables/lte-softmodem.h"
#include "common/ran_context.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "openair1/PHY/LTE_TRANSPORT/dlsch_tbs.h"
const char *__asan_default_options()
{
......@@ -69,10 +70,8 @@ channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
node_desc_t *enb_data[NUMBER_OF_eNB_MAX];
node_desc_t *ue_data[NUMBER_OF_UE_MAX];
//double sinr_bler_map[MCS_COUNT][2][16];
extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16];
//extern char* namepointer_chMag ;
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
......@@ -1005,14 +1004,11 @@ int main(int argc, char **argv) {
if (abstx) {
if (trials==0 && round==0 && SNR==snr0) { //generate a new channel
hold_channel = 0;
flagMag=0;
} else {
hold_channel = 1;
flagMag = 1;
}
} else {
hold_channel = 0;
flagMag=1;
}
///////////////////////////////////////
......
......@@ -162,6 +162,8 @@
#define U_PLANE_INACTIVITY_VALUE 0 /* defined 10ms order (zero means infinity) */
static const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
/*
* eNB part
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment