Commit 3ac00170 authored by Guy De Souza's avatar Guy De Souza

Compiling version- Merge with UE directory split

parent 8d5e7e43
......@@ -1151,6 +1151,7 @@ set(PHY_SRC_RU
${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c
${OPENAIR1_DIR}/PHY/INIT/nr_init_ru.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
)
......@@ -1196,12 +1197,10 @@ set(PHY_SRC_UE
${RRC_FULL_DIR}/asn1_constants.h
# actual source
${OPENAIR1_DIR}/PHY/INIT/nr_init.c
${OPENAIR1_DIR}/PHY/INIT/nr_init_ru.c
${OPENAIR1_DIR}/PHY/INIT/nr_parms.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_pss.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_sss.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_pbch.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_gold.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
......@@ -1221,10 +1220,7 @@ set(PHY_SRC_UE
# depend on code generation from asn1c
${RRC_FULL_DIR}/asn1_constants.h
# actual source
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
#${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c
#${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/INIT/nr_parms.c
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
......@@ -2132,7 +2128,7 @@ add_executable(nr-softmodem
target_link_libraries (nr-softmodem
-Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB}
RRC_LIB S1AP_LIB S1AP_ENB L2
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
......
......@@ -38,7 +38,6 @@
#include "PHY/defs_eNB.h"
#include "PHY/types.h"
#include "PHY/impl_defs_top.h"
#include "PHY/impl_defs_lte.h"
#include "RRC/LTE/rrc_defs.h"
#include "flexran_agent_defs.h"
......
......@@ -33,7 +33,7 @@
int phy_init_RU(RU_t *ru) {
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
int i,j;
int p;
int re;
......@@ -155,6 +155,8 @@ void phy_free_RU(RU_t *ru)
LOG_I(PHY, "Feeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx);
free_and_zero(ru->frame_parms);
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdata[i]);
for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdata[i]);
......
......@@ -117,7 +117,7 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
UE->frame_parms = *frame_parms;
UE->frame_parms.nb_antennas_rx=N_rx_ue;
// eNB->frame_parms = *frame_parms;
ru->frame_parms = *frame_parms;
ru->frame_parms = frame_parms;
ru->nb_tx = N_tx_phy;
ru->nb_rx = N_rx_ru;
ru->if_south = LOCAL_RF;
......
......@@ -19,14 +19,14 @@
* contact@openairinterface.org
*/
#include "PHY/defs.h"
#include "SCHED/defs.h"
#include "PHY/extern.h"
#include "SIMULATION/TOOLS/defs.h"
#include "PHY/defs_gNB.h"
#include "SCHED/sched_eNB.h"
#include "PHY/phy_extern.h"
#include "PHY/INIT/phy_init.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "assertions.h"
......
......@@ -19,14 +19,13 @@
* contact@openairinterface.org
*/
#include "defs.h"
#include "SCHED/defs.h"
#include "PHY/extern.h"
#include "SIMULATION/TOOLS/defs.h"
#include "phy_init.h"
#include "SCHED/sched_common.h"
#include "PHY/phy_extern.h"
#include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "assertions.h"
......@@ -34,7 +33,7 @@
int nr_phy_init_RU(RU_t *ru) {
NR_DL_FRAME_PARMS *fp = &ru->nr_frame_parms;
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
int i,j;
int p;
int re;
......@@ -150,6 +149,9 @@ void nr_phy_free_RU(RU_t *ru)
LOG_I(PHY, "Feeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx);
free_and_zero(ru->nr_frame_parms);
free_and_zero(ru->frame_parms);
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdata[i]);
for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdata[i]);
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "../defs.h"
#include "phy_init.h"
#include "log.h"
/// Subcarrier spacings in Hz indexed by numerology index
......
......@@ -24,6 +24,8 @@
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
#include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
......
......@@ -43,7 +43,7 @@ const uint8_t lin2alaw_if4p5[65536] = {213, 213, 213, 213, 213, 213, 213, 213, 2
void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
int32_t **txdataF = ru->common.txdataF_BF;
int32_t **rxdataF = ru->common.rxdataF;
int16_t **prach_rxsigF = ru->prach_rxsigF;
......@@ -258,7 +258,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
}
void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint32_t *symbol_number) {
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
int32_t **txdataF = ru->common.txdataF_BF;
int32_t **rxdataF = ru->common.rxdataF;
int16_t **prach_rxsigF = ru->prach_rxsigF;
......
......@@ -53,7 +53,7 @@ int start_flag = 1;
int offset_cnt = 1;
void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int subframe, uint8_t *seqno, uint16_t packet_type) {
LTE_DL_FRAME_PARMS *fp=&ru->frame_parms;
LTE_DL_FRAME_PARMS *fp=ru->frame_parms;
int32_t *txp[fp->nb_antennas_tx], *rxp[fp->nb_antennas_rx];
int32_t *tx_buffer=NULL;
#ifdef DEBUG_DL_MOBIPASS
......@@ -202,7 +202,7 @@ void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int subframe, uint8_t
header->ack = 0;
header->word0 = 0;
txp[0] = (void*)&ru->common.txdata[0][subframe*ru->frame_parms.samples_per_tti];
txp[0] = (void*)&ru->common.txdata[0][subframe*ru->frame_parms->samples_per_tti];
txp128 = (__m128i *) txp[0];
for (packet_id=0; packet_id<fp->samples_per_tti/db_fulllength; packet_id++) {
......@@ -247,7 +247,7 @@ void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int subframe, uint8_t
header->ack = 0;
header->word0 = 0;
txp[0] = (void*)&ru->common.txdata[0][subframe*ru->frame_parms.samples_per_tti];
txp[0] = (void*)&ru->common.txdata[0][subframe*ru->frame_parms->samples_per_tti];
txp128 = (__m128i *) txp[0];
for (packet_id=0; packet_id<fp->samples_per_tti/db_fulllength; packet_id++) {
......@@ -310,7 +310,7 @@ void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int subframe, uint8_t
void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16_t packet_type) {
LTE_DL_FRAME_PARMS *fp=&ru->frame_parms;
LTE_DL_FRAME_PARMS *fp=ru->frame_parms;
int32_t *txp[fp->nb_antennas_tx], *rxp[fp->nb_antennas_rx];
uint16_t packet_id=0, i=0, element_id=0;
......@@ -455,7 +455,7 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16
rx_buffer = (int32_t *)_rx_buffer;
data_block_head = (__m128i *)((uint8_t *)rx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t);
rxp[0] = (void*)&ru->common.rxdata[0][subframe*ru->frame_parms.samples_per_tti];
rxp[0] = (void*)&ru->common.rxdata[0][subframe*ru->frame_parms->samples_per_tti];
rxp128 = (__m128i *) (rxp[0]);
packet_id=0;
......@@ -470,7 +470,7 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16
);
//store rxdata and increase packet_id
rxp[0] = (void*)&ru->common.rxdata[0][(subframe*ru->frame_parms.samples_per_tti)+packet_id*db_fulllength];
rxp[0] = (void*)&ru->common.rxdata[0][(subframe*ru->frame_parms->samples_per_tti)+packet_id*db_fulllength];
rxp128 = (__m128i *) (rxp[0]);
for (i=0; i<db_fulllength>>2; i+=2) {
r0 = _mm_loadu_si128(data_block++);
......@@ -501,7 +501,7 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16
IF5_mobipass_header_t *header = (IF5_mobipass_header_t *)((uint8_t *)rx_buffer + MAC_HEADER_SIZE_BYTES);
data_block_head = (__m128i *)((uint8_t *)rx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t);
rxp[0] = (void*)&ru->common.rxdata[0][subframe*ru->frame_parms.samples_per_tti];
rxp[0] = (void*)&ru->common.rxdata[0][subframe*ru->frame_parms->samples_per_tti];
rxp128 = (__m128i *) (rxp[0]);
RU_proc_t *proc = &ru->proc;
......@@ -581,7 +581,7 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16
start_flag = 0;
//store rxdata and increase packet_id
rxp[0] = (void*)&ru->common.rxdata[0][(subframe*ru->frame_parms.samples_per_tti)+packet_id*db_fulllength];
rxp[0] = (void*)&ru->common.rxdata[0][(subframe*ru->frame_parms->samples_per_tti)+packet_id*db_fulllength];
rxp128 = (__m128i *) (rxp[0]);
for (i=0; i<db_fulllength>>2; i+=2) {
r0 = _mm_loadu_si128(data_block++);
......
......@@ -21,7 +21,6 @@
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "PHY/impl_defs_lte.h"
//#define DEBUG_PC 0
/*
......
This diff is collapsed.
......@@ -32,7 +32,6 @@
#ifndef __TRANSPORT_COMMON__H__
#define __TRANSPORT_COMMON__H__
#include "PHY/defs_common.h"
#include "PHY/impl_defs_lte.h"
#include "dci.h"
#include "mdci.h"
//#include "uci.h"
......
......@@ -32,8 +32,7 @@
#ifndef __TRANSPORT_ENB__H__
#define __TRANSPORT_ENB__H__
#include "transport_common.h"
//#include "PHY/defs_eNB.h"
#include "PHY/impl_defs_lte.h"
#include "PHY/defs_eNB.h"
#include "dci.h"
#include "mdci.h"
#include "uci_common.h"
......
......@@ -32,7 +32,6 @@
#ifndef __TRANSPORT_UE__H__
#define __TRANSPORT_UE__H__
#include "PHY/defs_UE.h"
#include "PHY/impl_defs_lte.h"
#include "../LTE_TRANSPORT/dci.h"
#include "../LTE_TRANSPORT/mdci.h"
#include "../LTE_TRANSPORT/uci_common.h"
......
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "PHY/impl_defs_lte.h"
#include "PHY/defs_common.h"
int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coeffs){
......
......@@ -30,6 +30,7 @@ This section deals with basic functions for OFDM Modulation.
*/
#include "PHY/defs_eNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/impl_defs_top.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
......
......@@ -36,7 +36,7 @@ int slot_fep_ul(RU_t *ru,
#endif
unsigned char aa;
RU_COMMON *common=&ru->common;
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
unsigned char symbol = l+((7-fp->Ncp)*(Ns&1)); ///symbol within sub-frame
unsigned int nb_prefix_samples = (no_prefix ? 0 : fp->nb_prefix_samples);
unsigned int nb_prefix_samples0 = (no_prefix ? 0 : fp->nb_prefix_samples0);
......
......@@ -23,7 +23,7 @@
/* Author R. Knopp / EURECOM / OpenAirInterface.org */
#ifndef __NR_REFSIG_DEFS__H__
#define __NR_REFSIG_DEFS__H__
#include "PHY/defs.h"
#include "PHY/defs_gNB.h"
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS.
......
......@@ -21,7 +21,7 @@
/*! \file PHY/NR_TRANSPORT/nr_pbch.c
* \brief Top-level routines for generating and decoding the PBCH/BCH physical/transport channel V15.1 03/2018
* \author G. De Souza
* \author Guy De Souza
* \date 2018
* \version 0.1
* \company Eurecom
......@@ -29,12 +29,8 @@
* \note
* \warning
*/
#include "PHY/defs.h"
#include "PHY/CODING/extern.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "defs.h"
#include "extern.h"
#include "PHY/extern.h"
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"
#define DEBUG_PBCH
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "PHY/defs.h"
#include "PHY/defs_gNB.h"
//#define NR_PSS_DEBUG
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "PHY/defs.h"
#include "PHY/defs_gNB.h"
extern short nr_mod_table[MOD_TABLE_SIZE_SHORT];
......
......@@ -31,9 +31,8 @@
//#include <netinet/in.h>
#include <netdb.h>
#ifndef CONFIG_SMBV
#include "../impl_defs_lte.h"
#include "../impl_defs_top.h"
#include "../defs.h"
#include "../defs_eNB.h"
#include "../LTE_TRANSPORT/defs.h"
#else
#define msg printf
......
This diff is collapsed.
......@@ -29,16 +29,10 @@
\note
\warning
*/
<<<<<<< HEAD
#ifndef __PHY_DEFS_COMMON__H__
#define __PHY_DEFS_COMMON__H__
#define MAX_NUM_RU_PER_eNB 64
#define MAX_NUM_RU_PER_gNB 64
=======
#ifndef __PHY_DEFS_COMMON_H__
#define __PHY_DEFS_COMMON_H__
#define _GNU_SOURCE
#include <sched.h>
......@@ -64,15 +58,7 @@
#include "common_lib.h"
#include "msc.h"
//#include <complex.h>
#include "PHY/TOOLS/time_meas.h"
#include "platform_types.h"
#define MAX_NUM_RU_PER_eNB 64
......@@ -87,6 +73,8 @@
//#include "defs.h"
#include "openair2/COMMON/platform_types.h"
#include "defs_RU.h"
#define RX_NB_TH_MAX 2
#define RX_NB_TH 2
......@@ -586,7 +574,7 @@ typedef struct {
int mbsfn_SubframeConfig;
} MBSFN_config_t;
typedef struct {
typedef struct LTE_DL_FRAME_PARMS {
/// Number of resource blocks (RB) in DL
uint8_t N_RB_DL;
/// Number of resource blocks (RB) in UL
......@@ -871,7 +859,6 @@ typedef enum {
typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t;
>>>>>>> develop-uedirectorysplit
#define NUMBER_OF_SUBBANDS_MAX 13
#define NUMBER_OF_HARQ_PID_MAX 8
......@@ -879,10 +866,6 @@ typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t;
#define MAX_FRAME_NUMBER 0x400
<<<<<<< HEAD
=======
>>>>>>> develop-uedirectorysplit
#define NUMBER_OF_RN_MAX 3
typedef enum {no_relay=1,unicast_relay_type1,unicast_relay_type2, multicast_relay} relaying_type_t;
......@@ -898,66 +881,6 @@ typedef enum {no_relay=1,unicast_relay_type1,unicast_relay_type2, multicast_rela
#define NB_BANDS_MAX 8
#define MAX_BANDS_PER_RRU 4
#ifdef OCP_FRAMEWORK
#include <enums.h>
#else
typedef enum {normal_txrx=0,rx_calib_ue=1,rx_calib_ue_med=2,rx_calib_ue_byp=3,debug_prach=4,no_L2_connect=5,calib_prach_tx=6,rx_dump_frame=7,loop_through_memory=8} runmode_t;
/*! \brief Extension Type */
typedef enum {
CYCLIC_PREFIX,
CYCLIC_SUFFIX,
ZEROS,
NONE
} Extension_t;
enum transmission_access_mode {
NO_ACCESS=0,
POSTPONED_ACCESS,
CANCELED_ACCESS,
UNKNOWN_ACCESS,
SCHEDULED_ACCESS,
CBA_ACCESS};
typedef enum {
eNodeB_3GPP=0, // classical eNodeB function
NGFI_RAU_IF5, // RAU with NGFI IF5
NGFI_RAU_IF4p5, // RAU with NFGI IF4p5
NGFI_RRU_IF5, // NGFI_RRU (NGFI remote radio-unit,IF5)
NGFI_RRU_IF4p5, // NGFI_RRU (NGFI remote radio-unit,IF4p5)
MBP_RRU_IF5 // Mobipass RRU
} node_function_t;
typedef enum {
synch_to_ext_device=0, // synch to RF or Ethernet device
synch_to_other, // synch to another source_(timer, other RU)
synch_to_mobipass_standalone // special case for mobipass in standalone mode
} node_timing_t;
#endif
<<<<<<< HEAD
typedef struct {
struct PHY_VARS_eNB_s *eNB;
int UE_id;
int harq_pid;
int llr8_flag;
int ret;
} td_params;
typedef struct {
struct PHY_VARS_eNB_s *eNB;
LTE_eNB_DLSCH_t *dlsch;
int G;
int harq_pid;
} te_params;
#endif
=======
void exit_fun(const char* s);
#include "UTIL/LOG/log_extern.h"
......@@ -1089,5 +1012,4 @@ static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *
}
#endif // __PHY_DEFS__H__
>>>>>>> develop-uedirectorysplit
#endif // __PHY_DEFS_COMMON_H__
This diff is collapsed.
This diff is collapsed.
......@@ -19,26 +19,25 @@
* contact@openairinterface.org
*/
#ifndef __PHY_IMPLEMENTATION_DEFS_NR_H__
#define __PHY_IMPLEMENTATION_DEFS_NR_H__
//#include "impl_defs_lte.h"
typedef struct {
/// \brief Pointers (dynamic) to the received data in the time domain.
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[
int32_t **rxdata;
/// \brief Pointers (dynamic) to the received data in the frequency domain.
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[
int32_t **rxdataF;
/// \brief holds the transmit data in the frequency domain.
/// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. //?
/// - first index: eNB id [0..2] (hard coded)
/// - second index: tx antenna [0..14[ where 14 is the total supported antenna ports.
/// - third index: sample [0..]
int32_t **txdataF;
} NR_gNB_COMMON;
/*! \file PHY/defs_gNB.h
\brief Top-level defines and structure definitions for gNB
\author Guy De Souza
\date 2018
\version 0.1
\company Eurecom
\email: desouza@eurecom.fr
\note
\warning
*/
#ifndef __PHY_DEFS_GNB__H__
#define __PHY_DEFS_GNB__H__
#include "defs_nr_common.h"
#endif
......@@ -19,63 +19,99 @@
* contact@openairinterface.org
*/
/*! \file PHY/impl_defs_lte.h
* \brief LTE Physical channel configuration and variable structure definitions
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
/*! \file PHY/defs_nr_common.h
\brief Top-level defines and structure definitions
\author Guy De Souza
\date 2018
\version 0.1
\company Eurecom
\email: desouza@eurecom.fr
\note
\warning
*/
#ifndef __PHY_IMPLEMENTATION_DEFS_LTE_H__
#define __PHY_IMPLEMENTATION_DEFS_LTE_H__
#ifndef __PHY_DEFS_NR_COMMON__H__
#define __PHY_DEFS_NR_COMMON__H__
#include "defs_common.h"
#define nr_subframe_t lte_subframe_t
#define NR_PBCH_DMRS_LENGTH 144
#define NR_PBCH_DMRS_LENGTH_DWORD 5 // roundup(NR_PBCH_DMRS_LENGTH/32)
#define MAX_NUM_SUBCARRIER_SPACING 5
typedef struct {
/// \brief Holds the transmit data in the frequency domain.
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[
int32_t **txdata;
/// \brief holds the transmit data after beamforming in the frequency domain.
/// - first index: tx antenna [0..nb_antennas_tx[
/// - second index: sample [0..]
int32_t **txdataF_BF;
/// \brief holds the transmit data before beamforming for epdcch/mpdcch
/// - first index : tx antenna [0..nb_epdcch_antenna_ports[
/// - second index: sampl [0..]
int32_t **txdataF_epdcch;
/// \brief Holds the receive data in the frequency domain.
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[
int32_t **rxdata;
/// \brief Holds the last subframe of received data in time domain after removal of 7.5kHz frequency offset.
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: sample [0..samples_per_tti[
int32_t **rxdata_7_5kHz;
/// \brief Holds the received data in the frequency domain.
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[
int32_t **rxdataF;
/// \brief Holds output of the sync correlator.
/// - first index: sample [0..samples_per_tti*10[
uint32_t *sync_corr;
/// \brief Holds the tdd reciprocity calibration coefficients
/// - first index: eNB id [0..2] (hard coded)
/// - second index: tx antenna [0..nb_antennas_tx[
/// - third index: frequency [0..]
int32_t **tdd_calib_coeffs;
} RU_COMMON;
#define NR_SYMBOLS_PER_SLOT 14
#define NR_PSS_LENGTH 127
#define NR_SSS_LENGTH 127
#define ONE_OVER_SQRT2_Q15 23170
#define ONE_OVER_TWO_Q15 16384
#define MOD_TABLE_SIZE_SHORT 6
#define MOD_TABLE_BPSK_OFFSET 1
typedef enum {
NR_MU_0=0,
NR_MU_1,
NR_MU_2,
NR_MU_3,
NR_MU_4,
} nr_numerology_index_e;
typedef enum{
nr_ssb_type_A = 0,
nr_ssb_type_B,
nr_ssb_type_C,
nr_ssb_type_D,
nr_ssb_type_E
} nr_ssb_type_e;
typedef struct NR_DL_FRAME_PARMS {
/// EUTRA Band
uint8_t eutra_band;
/// DL carrier frequency
uint32_t dl_CarrierFreq;
/// UL carrier frequency
uint32_t ul_CarrierFreq;
/// TX attenuation
uint32_t att_tx;
/// RX attenuation
uint32_t att_rx;
/// total Number of Resource Block Groups: this is ceil(N_PRB/P)
uint32_t subcarrier_spacing;
/// 3/4 sampling
uint8_t threequarter_fs;
/// Size of FFT
uint16_t ofdm_symbol_size;
/// Number of prefix samples in all but first symbol of slot
uint16_t nb_prefix_samples;
/// Number of prefix samples in first symbol of slot
uint16_t nb_prefix_samples0;
/// Carrier offset in FFT buffer for first RE in PRB0
uint16_t first_carrier_offset;
/// Number of OFDM/SC-FDMA symbols in one slot
uint16_t symbols_per_slot;
/// Number of slots per subframe
uint16_t slots_per_subframe;
/// Number of samples in a subframe
uint32_t samples_per_subframe;
/// Number of samples in a radio frame
uint32_t samples_per_frame;
/// Number of samples in a subframe without CP
uint32_t samples_per_subframe_wCP;
/// Number of samples in a radio frame without CP
uint32_t samples_per_frame_wCP;
//SSB related params
/// Start in Subcarrier index of the SSB block
uint16_t ssb_start_subcarrier;
nr_ssb_type_e ssb_type;
} NR_DL_FRAME_PARMS;
#endif
......@@ -16,7 +16,6 @@ General remarks: every directory contains at least defs.h (for declaration of st
| |-- defs.h // top level defs.h (includes spec_defs, impl_defs and all defs.h of subdirectories)
| |-- extern.h
| |-- impl_defs.h // non-LTE openair implementation
| |-- impl_defs_lte.h // lte implementation
| |-- impl_defs_top.h // general implementaion defs
| |-- spec_defs.h
| |-- spec_defs_top.h
......
......@@ -60,7 +60,7 @@ extern int oai_exit;
void feptx0(RU_t *ru,int slot) {
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
//int dummy_tx_b[7680*2] __attribute__((aligned(32)));
unsigned int aa,slot_offset;
......@@ -174,7 +174,7 @@ static void *feptx_thread(void *param) {
void