Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
5a13a7d4
Commit
5a13a7d4
authored
Jan 15, 2018
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unstable version, first phase for NPSS testing
parent
a2d9f0d8
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1563 additions
and
178 deletions
+1563
-178
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+0
-1
openair1/PHY/INIT/defs.h
openair1/PHY/INIT/defs.h
+2
-1
openair1/PHY/INIT/lte_parms.c
openair1/PHY/INIT/lte_parms.c
+1
-1
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
+105
-105
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
+4
-3
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+3
-2
openair1/SCHED/defs_NB_IoT.h
openair1/SCHED/defs_NB_IoT.h
+2
-2
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+9
-0
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+7
-6
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+1309
-0
openair2/ENB_APP/enb_config.h
openair2/ENB_APP/enb_config.h
+67
-19
openair2/LAYER2/MAC/main_NB_IoT.c
openair2/LAYER2/MAC/main_NB_IoT.c
+14
-10
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+15
-12
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+25
-16
No files found.
cmake_targets/CMakeLists.txt
View file @
5a13a7d4
...
...
@@ -1211,7 +1211,6 @@ endif()
set
(
ENB_APP_SRC
${
OPENAIR2_DIR
}
/ENB_APP/enb_app.c
${
OPENAIR2_DIR
}
/ENB_APP/enb_config.c
${
OPENAIR2_DIR
}
/ENB_APP/enb_config_NB_IoT.c
)
add_library
(
L2
...
...
openair1/PHY/INIT/defs.h
View file @
5a13a7d4
...
...
@@ -359,7 +359,8 @@ void lte_param_init(unsigned char N_tx_port_eNB,
/** @} */
// for NB-IoT
//////////////////////// for NB-IoT ////////////////////////////////////////////
int
init_frame_parms_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
osf
);
void
phy_init_lte_top_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
lte_frame_parms
);
...
...
openair1/PHY/INIT/lte_parms.c
View file @
5a13a7d4
...
...
@@ -226,7 +226,7 @@ void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
//
NB-IoT
//
/////////////////////////////////////////////// NB-IoT ///////////////////////////////////////////////////////////////
int
init_frame_parms_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
osf
)
{
...
...
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
View file @
5a13a7d4
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
View file @
5a13a7d4
...
...
@@ -13,17 +13,18 @@
*/
//#include <math.h>
//
#include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h" // not can be replaced by impl_defs_lte_NB_IoT & impl_defs_top_NB_IoT if "msg" function is not used
#include "PHY/defs.h"
//
#include "PHY/defs_NB_IoT.h" // not can be replaced by impl_defs_lte_NB_IoT & impl_defs_top_NB_IoT if "msg" function is not used
//#include "defs.h"
//#include "PHY/extern_NB_IoT.h"
#include "PHY/extern.h"
//#include "PHY/impl_defs_lte_NB_IoT.h"
//#include "PHY/impl_defs_top_NB_IoT.h"
#include "nsss_NB_IoT.h"
int
generate_sss_NB_IoT
(
int32_t
**
txdataF
,
int16_t
amp
,
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
LTE
_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
symbol_offset
,
// symbol_offset = 3 for NB-IoT
uint16_t
slot_offset
,
unsigned
short
frame_number
,
// new attribute (Get value from higher layer), it does not exist for LTE
...
...
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
View file @
5a13a7d4
...
...
@@ -32,13 +32,14 @@
#ifndef __LTE_TRANSPORT_PROTO_NB_IOT__H__
#define __LTE_TRANSPORT_PROTO_NB_IOT__H__
#include "PHY/defs_NB_IoT.h"
#include "PHY/impl_defs_lte.h"
//#include <math.h>
//NPSS
int
generate_npss_NB_IoT
(
int32_t
**
txdataF
,
short
amp
,
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
LTE
_DL_FRAME_PARMS
*
frame_parms
,
unsigned
short
symbol_offset
,
// symbol_offset should equal to 3 for NB-IoT
unsigned
short
slot_offset
,
unsigned
short
RB_IoT_ID
);
// new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
...
...
@@ -47,7 +48,7 @@ int generate_npss_NB_IoT(int32_t **txdataF,
int
generate_sss_NB_IoT
(
int32_t
**
txdataF
,
int16_t
amp
,
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
LTE
_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
symbol_offset
,
// symbol_offset = 3 for NB-IoT
uint16_t
slot_offset
,
unsigned
short
frame_number
,
// new attribute (Get value from higher layer), it does not exist for LTE
...
...
openair1/SCHED/defs_NB_IoT.h
View file @
5a13a7d4
...
...
@@ -3,7 +3,7 @@
#ifndef __openair_SCHED_NB_IOT_H__
#define __openair_SCHED_NB_IOT_H__
//
#include "PHY/defs.h"
#include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h"
//#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair2/PHY_INTERFACE/nfapi_interface.h"
...
...
@@ -25,7 +25,7 @@ void process_schedule_rsp_NB_IoT(Sched_Rsp_t *sched_rsp,
void
phy_procedures_eNB_uespec_RX_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
UL_IND_t
*
UL_INFO
);
/* For NB-IoT, we put NPBCH in later part, since it would be scheduled by MAC scheduler,this generates NRS/NPSS/NSSS*/
void
common_signal_procedures_NB_IoT
(
PHY_VARS_eNB
_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
);
void
common_signal_procedures_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
);
/*Generate the ulsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/
void
generate_eNB_ulsch_params_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
nfapi_hi_dci0_request_pdu_t
*
hi_dci0_pdu
);
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
5a13a7d4
...
...
@@ -494,6 +494,15 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
int
subframe
=
proc
->
subframe_tx
;
int
frame
=
proc
->
frame_tx
;
// NB-IoT synchro signals
common_signal_procedures_NB_IoT
(
eNB
,
proc
);
// generate Cell-Specific Reference Signals for both slots
if
(
eNB
->
abstraction_flag
==
0
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX
,
1
);
...
...
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
View file @
5a13a7d4
...
...
@@ -30,7 +30,7 @@
* \warning
*/
//
#include "PHY/defs.h"
#include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h"
#include "PHY/LTE_ESTIMATION/defs_NB_IoT.h"
//#include "PHY/extern_NB_IoT.h" //where we get the global Sched_Rsp_t structure filled
...
...
@@ -213,14 +213,15 @@ uint32_t is_SIB1_NB_IoT(const frame_t frameP,
* It generates NRS/NPSS/NSSS
*
*/
void
common_signal_procedures_NB_IoT
(
PHY_VARS_eNB
_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
)
void
common_signal_procedures_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
)
{
NB_IoT_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms_NB_IoT
;
//LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
int
**
txdataF
=
eNB
->
common_vars
.
txdataF
[
0
];
int
subframe
=
proc
->
subframe_tx
;
int
frame
=
proc
->
frame_tx
;
uint16_t
Ntti
=
10
;
//ntti = 10
int
RB_IoT_ID
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
RB_IoT_ID
=
19
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
With_NSSS
;
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
/*NSSS only happened in the even frame*/
...
...
@@ -259,12 +260,12 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *p
else
{
/*NRS*/
generate_pilots_NB_IoT
(
eNB
,
/*
generate_pilots_NB_IoT(eNB,
txdataF,
AMP,
Ntti,
RB_IoT_ID,
With_NSSS
);
With_NSSS);
*/
}
}
...
...
openair2/ENB_APP/enb_config.c
View file @
5a13a7d4
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_config.h
View file @
5a13a7d4
...
...
@@ -208,6 +208,51 @@ typedef struct Enb_properties_s {
RrcConfigurationReq
RrcReq
;
#endif
long
ue_TransmissionMode
[
1
+
MAX_NUM_CCs
];
//
//*************************************** NB-IoT **********************************************
//
long
rach_raResponseWindowSize_NB
[
1
+
MAX_NUM_CCs
];
long
rach_macContentionResolutionTimer_NB
[
1
+
MAX_NUM_CCs
];
long
rach_powerRampingStep_NB
[
1
+
MAX_NUM_CCs
];
long
rach_preambleInitialReceivedTargetPower_NB
[
1
+
MAX_NUM_CCs
];
long
rach_preambleTransMax_CE_NB
[
1
+
MAX_NUM_CCs
];
long
bcch_modificationPeriodCoeff_NB
[
1
+
MAX_NUM_CCs
];
long
pcch_defaultPagingCycle_NB
[
1
+
MAX_NUM_CCs
];
long
nprach_CP_Length
[
1
+
MAX_NUM_CCs
];
long
nprach_rsrp_range
[
1
+
MAX_NUM_CCs
];
char
*
nprach_SubcarrierMSG3_RangeStart
;
long
maxNumPreambleAttemptCE_NB
[
1
+
MAX_NUM_CCs
];
long
npdsch_nrs_Power
[
1
+
MAX_NUM_CCs
];
long
npusch_ack_nack_numRepetitions_NB
[
1
+
MAX_NUM_CCs
];
long
npusch_srs_SubframeConfig_NB
[
1
+
MAX_NUM_CCs
];
long
npusch_threeTone_CyclicShift_r13
[
1
+
MAX_NUM_CCs
];
long
npusch_sixTone_CyclicShift_r13
[
1
+
MAX_NUM_CCs
];
BOOLEAN_t
npusch_groupHoppingEnabled
[
1
+
MAX_NUM_CCs
];
long
npusch_groupAssignmentNPUSCH_r13
[
1
+
MAX_NUM_CCs
];
long
dl_GapThreshold_NB
[
1
+
MAX_NUM_CCs
];
long
dl_GapPeriodicity_NB
[
1
+
MAX_NUM_CCs
];
char
*
dl_GapDurationCoeff_NB
;
long
npusch_p0_NominalNPUSCH
[
1
+
MAX_NUM_CCs
];
long
npusch_alpha
[
1
+
MAX_NUM_CCs
];
long
deltaPreambleMsg3
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_t300_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_t301_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_t310_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_t311_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_n310_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_n311_NB
[
1
+
MAX_NUM_CCs
];
long
nprach_Periodicity
[
1
+
MAX_NUM_CCs
];
long
nprach_StartTime
[
1
+
MAX_NUM_CCs
];
long
nprach_SubcarrierOffset
[
1
+
MAX_NUM_CCs
];
long
nprach_NumSubcarriers
[
1
+
MAX_NUM_CCs
];
long
numRepetitionsPerPreambleAttempt
[
1
+
MAX_NUM_CCs
];
long
npdcch_NumRepetitions_RA
[
1
+
MAX_NUM_CCs
];
long
npdcch_StartSF_CSS_RA
[
1
+
MAX_NUM_CCs
];
char
*
npdcch_Offset_RA
;
//********************************************END******************************************************
long
srb1_timer_poll_retransmit
;
long
srb1_timer_reordering
;
long
srb1_timer_status_prohibit
;
...
...
@@ -285,36 +330,36 @@ const Enb_properties_array_t *enb_config_get(void);
// ******************************************************** NB-IoT ********************************************************** //
typedef
struct
Enb_properties_NB_IoT_s
{
//
typedef struct Enb_properties_NB_IoT_s {
/* Unique eNB_id to identify the eNB within EPC.
* For macro eNB ids this field should be 20 bits long.
* For home eNB ids this field should be 28 bits long.
*/
uint32_t
eNB_id
;
//
uint32_t eNB_id;
/* The type of the cell */
enum
cell_type_e
cell_type
;
//
enum cell_type_e cell_type;
/* Optional name for the cell
* NOTE: the name can be NULL (i.e no name) and will be cropped to 150
* characters.
*/
char
*
eNB_name
;
//
char *eNB_name;
/* Tracking area code */
uint16_t
tac
;
//
uint16_t tac;
/* Mobile Country Code
* Mobile Network Code
*/
uint16_t
mcc
;
/*
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
*/
/* Physical parameters */
/*
// Physical parameters //
int16_t nb_cc;
#ifndef OCP_FRAMEWORK
eNB_func_t cc_node_function[1+MAX_NUM_CCs];
...
...
@@ -398,7 +443,7 @@ typedef struct Enb_properties_NB_IoT_s {
#endif
long ue_TransmissionMode[1+MAX_NUM_CCs];
//
//
*************** NB-IoT *****************
//
///////////////////////////////// NB-IoT /////////////////////////////////////////////////////////
//
long rach_raResponseWindowSize_NB[1+MAX_NUM_CCs];
long rach_macContentionResolutionTimer_NB[1+MAX_NUM_CCs];
...
...
@@ -441,16 +486,16 @@ typedef struct Enb_properties_NB_IoT_s {
long npdcch_StartSF_CSS_RA[1+MAX_NUM_CCs];
char* npdcch_Offset_RA;
//
****************************************
//
///////////////////////////////////////////END///////////////////////////////////////////////////////
long srb1_timer_poll_retransmit;
long srb1_timer_reordering;
long srb1_timer_status_prohibit;
long srb1_poll_pdu;
long srb1_poll_byte;
long srb1_max_retx_threshold;
/
* Nb of MME to connect to *
/
/
/ Nb of MME to connect to
/
uint8_t nb_mme;
/
* List of MME to connect to *
/
/
/ List of MME to connect to
/
mme_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
int sctp_in_streams;
...
...
@@ -468,17 +513,17 @@ typedef struct Enb_properties_NB_IoT_s {
tcp_udp_port_t flexran_agent_port;
char *flexran_agent_cache;
/
* Nb of RRH to connect to *
/
/
/ Nb of RRH to connect to
/
uint8_t nb_rrh_gw;
char *rrh_gw_if_name;
/
* List of MME to connect to *
/
/
/ List of MME to connect to
/
rrh_gw_config_t rrh_gw_config[4];
#ifndef OCP_FRAMEWORK
// otg config
/
* Nb of OTG elements */
/
/ Nb of OTG elements
uint8_t num_otg_elements;
/
* element config*/
/
/ element config
uint16_t otg_ue_id[NB_MODULES_MAX+1];
uint8_t otg_app_type[NB_MODULES_MAX+1];
uint8_t otg_bg_traffic[NB_MODULES_MAX+1];
...
...
@@ -505,7 +550,8 @@ typedef struct Enb_properties_NB_IoT_s {
int16_t osa_log_verbosity;
#endif
} Enb_properties_NB_IoT_t;
*/
/*
typedef struct Enb_properties_array_NB_IoT_s {
int number;
Enb_properties_NB_IoT_t *properties[MAX_ENB];
...
...
@@ -516,6 +562,8 @@ void enb_config_display_NB_IoT(void);
const Enb_properties_array_NB_IoT_t *enb_config_init_NB_IoT(char* lib_config_file_name_pP);
const Enb_properties_array_NB_IoT_t *enb_config_get_NB_IoT(void);
*/
#endif
#endif
/* ENB_CONFIG_H_ */
/* ENB_CONFIG_H_ */
/** @} */
openair2/LAYER2/MAC/main_NB_IoT.c
View file @
5a13a7d4
...
...
@@ -20,22 +20,26 @@
int
mac_init_global_param_NB_IoT
(
void
)
{
if
(
rlc_module_init
()
!=
0
)
{
return
(
-
1
);
}
///// removed since already called by mac_init_global_param //////////////
/*
if (rlc_module_init()!=0) {
return(-1);
}
*/
/////////////////////////////////////////////////////////////////////////////
LOG_I
(
MAC
,
"[MAIN] RRC NB-IoT initialization of global params
\n
"
);
rrc_init_global_param_NB_IoT
();
///// removed since already called by mac_init_global_param //////////////
/*
LOG_I(MAC,"[MAIN] PDCP layer init\n");
#ifdef USER_MODE
#ifdef USER_MODE
pdcp_layer_init ();
#else
#else
pdcp_module_init ();
#endif
#endif
*/
////////////////////////////////////////////////////////////////////////
return
0
;
}
...
...
targets/RT/USER/lte-enb.c
View file @
5a13a7d4
...
...
@@ -587,19 +587,19 @@ int wait_CCs(eNB_rxtx_proc_t *proc) {
static
inline
int
rxtx_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
char
*
thread_name
)
{
//Allocate memory for the structures used by PHY and MAC
UL_IND_t
*
UL_INFO
;
Sched_Rsp_t
*
Sched_Rsp
;
//
UL_IND_t *UL_INFO;
//
Sched_Rsp_t *Sched_Rsp;
UL_INFO
=
(
UL_IND_t
*
)
malloc
(
sizeof
(
UL_IND_t
));
Sched_Rsp
=
(
Sched_Rsp_t
*
)
malloc
(
sizeof
(
Sched_Rsp_t
));
//
UL_INFO = (UL_IND_t*) malloc(sizeof(UL_IND_t));
//
Sched_Rsp = (Sched_Rsp_t*) malloc(sizeof(Sched_Rsp_t));
start_meas
(
&
softmodem_stats_rxtx_sf
);
// ****************************************
// Common RX procedures subframe n
if
((
eNB
->
do_prach
)
&&
((
eNB
->
node_function
!=
NGFI_RCC_IF4p5_NB_IoT
)))
eNB
->
do_prach
(
eNB
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
// for NB-IoT testing // do_prach commented
//
if ((eNB->do_prach)&&((eNB->node_function != NGFI_RCC_IF4p5_NB_IoT)))
//
eNB->do_prach(eNB,proc->frame_rx,proc->subframe_rx);
/*UE-specific RX processing for subframe n*/
...
...
@@ -608,14 +608,14 @@ static inline int rxtx_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc, ch
* stored the Upink information in UL_info struct, process it and made it into FAPI style,
*/
phy_procedures_eNB_uespec_RX_NB_IoT
(
eNB
,
proc
,
UL_INFO
);
//
phy_procedures_eNB_uespec_RX_NB_IoT(eNB,proc,UL_INFO);
/*
* send the UL_Indication to higher layer that also provide a tick to the scheduler_dlsch_ulsch
* (on its turn the scheduler will trigger the phy_procedure_eNB_TX through schedule_responce function
*/
if
(
if_inst
->
UL_indication
)
if_inst
->
UL_indication
(
UL_INFO
);
//
if(if_inst->UL_indication) if_inst->UL_indication(UL_INFO);
if
(
oai_exit
)
return
(
-
1
);
...
...
@@ -636,12 +636,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
// ****************************************
// Common RX procedures subframe n
if
((
eNB
->
do_prach
)
&&
((
eNB
->
node_function
!=
NGFI_RCC_IF4p5
)))
if
((
eNB
->
do_prach
)
&&
((
eNB
->
node_function
!=
NGFI_RCC_IF4p5
)))
eNB
->
do_prach
(
eNB
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
phy_procedures_eNB_common_RX
(
eNB
,
proc
);
// UE-specific RX processing for subframe n
if
(
eNB
->
proc_uespec_rx
)
eNB
->
proc_uespec_rx
(
eNB
,
proc
,
no_relay
);
// for NB-IoT testing // activating only TX part
//if (eNB->proc_uespec_rx) eNB->proc_uespec_rx(eNB, proc, no_relay );
// *****************************************
// TX processing for subframe n+4
...
...
@@ -1755,8 +1757,9 @@ static void* eNB_thread_single( void* param ) {
// If this proc is to provide synchronization, do so
wakeup_slaves
(
proc
);
if
(
rxtx
(
eNB
,
proc_rxtx
,
"eNB_thread_single"
)
<
0
)
break
;
if
(
rxtx_NB_IoT
(
eNB_NB_IoT
,
proc_rxtx
,
"eNB_thread_single"
)
<
0
)
break
;
if
(
rxtx
(
eNB
,
proc_rxtx
,
"eNB_thread_single"
)
<
0
)
break
;
}
...
...
targets/RT/USER/lte-softmodem.c
View file @
5a13a7d4
...
...
@@ -54,12 +54,15 @@
#include "PHY_INTERFACE/vars.h"
#include "PHY_INTERFACE/defs.h"
//
NB-IoT Parameters here
//
///////////////////////////NB-IoT Parameters here////////////////////////////////////////
#include "LAYER2/MAC/proto_NB_IoT.h"
//#include "LAYER2/MAC/defs_NB_IoT.h"
//#include "LAYER2/MAC/vars_NB_IoT.h"
///////////////////////////////////////END/////////////////////////////////////////////////
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
unsigned
short
config_frames
[
4
]
=
{
2
,
9
,
11
,
13
};
...
...
@@ -175,15 +178,18 @@ int otg_enabled;
//int number_of_cards = 1;
static
LTE_DL_FRAME_PARMS
*
frame_parms
[
MAX_NUM_CCs
];
//NB-IoT
static
NB_IoT_DL_FRAME_PARMS
*
frame_parms_NB_IoT
[
MAX_NUM_CCs
];
// this will be still inside the PHY_VARS of LTE
eNB_func_t
node_function
[
MAX_NUM_CCs
];
eNB_timing_t
node_timing
[
MAX_NUM_CCs
];
////////////////////////////////////// NB-IoT //////////////////////////////////////////////
static
NB_IoT_DL_FRAME_PARMS
*
frame_parms_NB_IoT
[
MAX_NUM_CCs
];
// this will be still inside the PHY_VARS of LTE
eNB_func_NB_IoT_t
node_function_NB_IoT
[
MAX_NUM_CCs
];
eNB_timing_NB_IoT_t
node_timing_NB_IoT
[
MAX_NUM_CCs
];
/////////////////////////////////////////END/////////////////////////////////////////////////
int16_t
node_synch_ref
[
MAX_NUM_CCs
];
uint32_t
target_dl_mcs
=
28
;
//maximum allowed mcs
...
...
@@ -624,9 +630,7 @@ static void get_options (int argc, char **argv) {
int
CC_id
;
// const Enb_properties_array_t *enb_properties; // temporarily replaced for NB_IoT testing
const
Enb_properties_array_NB_IoT_t
*
enb_properties
;
const
Enb_properties_array_t
*
enb_properties
;
enum
long_option_e
{
LONG_OPTION_START
=
0x100
,
/* Start after regular single char options */
...
...
@@ -953,7 +957,7 @@ static void get_options (int argc, char **argv) {
case
'r'
:
UE_scan
=
0
;
///////////////////////////////////////////////////////////////// frame_parms for NB-IoT are added for test
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
switch
(
atoi
(
optarg
))
{
case
6
:
...
...
@@ -1066,7 +1070,7 @@ static void get_options (int argc, char **argv) {
/* Read eNB configuration file */
// enb_properties = enb_config_init(conf_config_file_name);
enb_properties
=
enb_config_init
_NB_IoT
(
conf_config_file_name
);
enb_properties
=
enb_config_init
(
conf_config_file_name
);
AssertFatal
(
NB_eNB_INST
<=
enb_properties
->
number
,
"Number of eNB is greater than eNB defined in configuration file %s (%d/%d)!"
,
...
...
@@ -1153,7 +1157,7 @@ static void get_options (int argc, char **argv) {
frame_parms
[
CC_id
]
->
nb_antenna_ports_eNB
=
enb_properties
->
properties
[
i
]
->
nb_antenna_ports
[
CC_id
];
frame_parms
[
CC_id
]
->
nb_antennas_rx
=
enb_properties
->
properties
[
i
]
->
nb_antennas_rx
[
CC_id
];
frame_parms_NB_IoT
[
CC_id
]
->
Nid_cell
=
enb_properties
->
properties
[
i
]
->
Nid_cell
[
CC_id
];
frame_parms_NB_IoT
[
CC_id
]
->
Nid_cell
=
enb_properties
->
properties
[
i
]
->
Nid_cell
[
CC_id
];
// in case different CellID this value can be modified
frame_parms_NB_IoT
[
CC_id
]
->
N_RB_DL
=
enb_properties
->
properties
[
i
]
->
N_RB_DL
[
CC_id
];
frame_parms_NB_IoT
[
CC_id
]
->
N_RB_UL
=
enb_properties
->
properties
[
i
]
->
N_RB_DL
[
CC_id
];
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_tx
=
enb_properties
->
properties
[
i
]
->
nb_antennas_tx
[
CC_id
];
...
...
@@ -1634,14 +1638,14 @@ int main( int argc, char **argv ) {
LOG_I
(
PHY
,
"Set nb_rx_antenna %d , nb_tx_antenna %d
\n
"
,
frame_parms
[
CC_id
]
->
nb_antennas_rx
,
frame_parms
[
CC_id
]
->
nb_antennas_tx
);
//#ifdef NB_IOT //
for NB-IoT testing
//#ifdef NB_IOT //
///////////// for NB-IoT testing ///////////////////////////
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_tx
=
nb_antenna_tx
;
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_rx
=
nb_antenna_rx
;
frame_parms_NB_IoT
[
CC_id
]
->
nb_antenna_ports_eNB
=
1
;
//initial value overwritten by initial sync later
LOG_I
(
PHY
,
"[NB-IoT] Set nb_rx_antenna %d , nb_tx_antenna %d
\n
"
,
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_rx
,
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_tx
);
//#endif
//#endif
//////////////////////////// END //////////////////////////////////
}
...
...
@@ -1651,12 +1655,17 @@ int main( int argc, char **argv ) {
// phy_init_top(frame_parms[CC_id]);
phy_init_lte_top
(
frame_parms
[
CC_id
]);
// for testing
//XXXX we need to modify it for NB-IoT????
//init_ul_hopping(frame_parms[CC_id]);
/////////////////////////////////////////////////////// NB-IoT ////////////////////////////////////////////////////////
init_frame_parms_NB_IoT
(
frame_parms_NB_IoT
[
CC_id
],
1
);
// phy_init_top(frame_parms[CC_id]);
phy_init_lte_top_NB_IoT
(
frame_parms_NB_IoT
[
CC_id
]);
/////////////////////////////////////////////////////// END //////////////////////////////////////////////////////////
}
...
...
@@ -1736,15 +1745,15 @@ int main( int argc, char **argv ) {
// printf("tx_max_power = %d -> amp %d\n",tx_max_power,get_tx_amp(tx_max_poHwer,tx_max_power));
}
else
{
//this is eNB
/////////////////////////////////////////////////// this is eNB /////////////////////////////////////////////////////////////
PHY_vars_eNB_g
=
malloc
(
sizeof
(
PHY_VARS_eNB
**
));
//global PHY_vars --> is a matrix
PHY_vars_eNB_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_eNB
*
));
// for NB-IoT testing
///////////////////////// for NB-IoT testing ////////////////////////
PHY_vars_eNB_NB_IoT_g
=
malloc
(
sizeof
(
PHY_VARS_eNB_NB_IoT
**
));
//global PHY_vars --> is a matrix
PHY_vars_eNB_NB_IoT_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_eNB_NB_IoT
*
));
///////////////////////////// END //////////////////////////////////
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
//we initialiaze DL/UL buffer and HARQ (inside the LTE_eNB_DLSCH)
...
...
@@ -1827,7 +1836,7 @@ int main( int argc, char **argv ) {
// for NB-IoT testing
PHY_vars_eNB_
_
NB_IoT_g
[
0
][
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
];
PHY_vars_eNB_NB_IoT_g
[
0
][
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
];
if
(
frame_parms_NB_IoT
[
CC_id
]
->
frame_type
==
FDD
)
{
PHY_vars_eNB_NB_IoT_g
[
0
][
CC_id
]
->
N_TA_offset
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment