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
ZhouShuya
OpenXG-RAN
Commits
3c1373a1
Commit
3c1373a1
authored
Jan 18, 2018
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preparation for synchro signals testing
parent
fd0f6cbb
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
100 additions
and
78 deletions
+100
-78
openair1/PHY/LTE_ESTIMATION/lte_sync_time_NB_IoT.c
openair1/PHY/LTE_ESTIMATION/lte_sync_time_NB_IoT.c
+2
-2
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation_NB_IoT.c
+1
-1
openair1/PHY/LTE_TRANSPORT/group_hopping_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/group_hopping_NB_IoT.c
+1
-1
openair1/PHY/LTE_TRANSPORT/nprach_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/nprach_NB_IoT.c
+9
-8
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
+2
-1
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
+3
-3
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation_NB_IoT.c
+2
-2
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+19
-8
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+2
-2
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+24
-22
openair2/LAYER2/MAC/main_NB_IoT.c
openair2/LAYER2/MAC/main_NB_IoT.c
+2
-2
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+32
-25
targets/SIMU/USER/init_lte.c
targets/SIMU/USER/init_lte.c
+1
-1
No files found.
openair1/PHY/LTE_ESTIMATION/lte_sync_time_NB_IoT.c
View file @
3c1373a1
...
...
@@ -363,10 +363,10 @@ int lte_sync_time_NB_IoT(int **rxdata, ///rx data in time domain
// perform a time domain correlation using the oversampled sync sequence
unsigned
int
n
,
ar
,
/*s,*/
peak_pos
,
peak_val
/*, sync_source*/
;
int
result
,
result2
;
int
result
;
//
result2;
// int sync_out[3] = {0,0,0},sync_out2[3] = {0,0,0};
// int tmp[3] = {0,0,0};
int
sync_out
=
0
,
sync_out2
=
0
;
int
sync_out
=
0
;
//
sync_out2 = 0;
int
tmp
=
0
;
// int length = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti>>1;
int
length
=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
samples_per_tti
;
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation_NB_IoT.c
View file @
3c1373a1
...
...
@@ -4067,7 +4067,7 @@ unsigned short dlsch_extract_rbs_single_NB_IoT(int **rxdataF,
unsigned
short
rb
,
nb_rb
=
0
;
unsigned
char
rb_alloc_ind
;
unsigned
char
i
,
aarx
=
0
;
/
*,l,nsymb /*,skip_half=0,sss_symb,pss_symb=0*/
unsigned
char
i
,
aarx
=
0
;
/
/,l,nsymb,skip_half=0,sss_symb,pss_symb=0
int
*
dl_ch0
,
*
dl_ch0_ext
,
*
rxF
,
*
rxF_ext
;
unsigned
short
UL_RB_ID_NB_IoT
;
// index of the NB-IoT RB
uint8_t
id_offset
;
// offset of pilot position in symbols: 0,1,2
...
...
openair1/PHY/LTE_TRANSPORT/group_hopping_NB_IoT.c
View file @
3c1373a1
...
...
@@ -167,7 +167,7 @@ void generate_grouphop_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms)
void
init_ul_hopping_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
frame_parms
)
{
generate_grouphop
(
frame_parms
);
////////////////////////////////////////
generate_grouphop(frame_parms);
// generate_seqhop(frame_parms);
// generate_nPRS(frame_parms);
}
openair1/PHY/LTE_TRANSPORT/nprach_NB_IoT.c
View file @
3c1373a1
...
...
@@ -44,15 +44,15 @@ uint8_t NPRACH_detection_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
uint16_t
sub_sampling_rate
,
uint32_t
FRAME_LENGTH_COMPLEX_SUB_SAMPLES
){
uint32_t
P_noise
;
// needs to be defined or calculated
uint16_t
FFT_size
;
uint16_t
delta_t
;
// size, in samples, between 2 successive FFTs
// uint32_t P_noise ; // to uncomment when needed
// needs to be defined or calculated
uint16_t
FFT_size
=
0
;
uint16_t
delta_t
=
0
;
// size, in samples, between 2 successive FFTs
uint16_t
Nb_packets
,
n_subcarriers
;
uint16_t
N_sample_per_sc
;
// number of samples per subcarrier
uint16_t
N_sample_per_sc
=
0
;
// number of samples per subcarrier
int16_t
**
mat_from_buffer
,
**
mat_to_detector
;
uint32_t
**
mat_energy
;
uint64_t
energy_per_subcarrier
;
uint32_t
threshold_gamma
;
// threshold for signal detection
uint32_t
threshold_gamma
=
0
;
// threshold for signal detection
int
k
,
n
,
m
;
uint8_t
is_NPRACH_present
=
0
;
...
...
@@ -159,7 +159,7 @@ uint32_t TA_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
uint16_t
length_seq_NPRACH
,
length_CP
,
length_symbol
;
// in number of samples, per NPRACH preamble: 4 sequences ; length of CP in number of samples
uint16_t
length_CP_0
=
eNB
->
frame_parms
.
nprach_config_common
.
nprach_CP_Length
;
//NB-IoT: 0: short, 1: long
uint32_t
fs
;
//NB-IoT: sampling frequency of Rx_buffer, must be defined somewhere
uint32_t
fs
=
0
;
//NB-IoT: sampling frequency of Rx_buffer, must be defined somewhere
uint32_t
fs_sub_sampled
;
uint16_t
length_correl_window
,
base_length
;
int64_t
*
vec_correlation
;
...
...
@@ -355,10 +355,11 @@ int16_t* sub_sampling_NB_IoT(int16_t *input_buffer, uint32_t length_input, uint3
void
RX_NPRACH_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
int16_t
*
Rx_buffer
){
uint32_t
estimated_TA
,
estimated_TA_coarse
;
uint32_t
estimated_TA
=
0
;
uint32_t
estimated_TA_coarse
=
0
;
int16_t
*
Rx_sub_sampled_buffer_128
,
*
Rx_sub_sampled_buffer_16
;
uint16_t
sub_sampling_rate
;
//NB-IoT: to be defined somewhere
uint32_t
FRAME_LENGTH_COMPLEX_SAMPLES
;
// NB-IoT: length of input buffer, to be defined somewhere
uint32_t
FRAME_LENGTH_COMPLEX_SAMPLES
=
0
;
// NB-IoT: length of input buffer, to be defined somewhere
uint32_t
FRAME_LENGTH_COMPLEX_SUB_SAMPLES
;
// Length of buffer after sub-sampling
uint32_t
*
length_ouput
;
// Length of buffer after sub-sampling
char
coarse
=
1
;
// flag that indicate the level of TA estimation
...
...
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
View file @
3c1373a1
...
...
@@ -142,6 +142,7 @@ int rx_nsss_NB_IoT(PHY_VARS_UE_NB_IoT *ue,int32_t *tot_metric)
uint8_t
Nid2
,
q_est
,
u_est
;
NB_IoT_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int
l
,
k
,
m
;
int
toto
=
0
;
int16_t
*
d
,
*
nsss_sf
;
int32_t
nsss_ext
[
2
][
132
];
// up to 2 rx antennas ?
int32_t
metric
;
// correlation metric
...
...
@@ -149,7 +150,7 @@ int rx_nsss_NB_IoT(PHY_VARS_UE_NB_IoT *ue,int32_t *tot_metric)
// we suppose we are in NSSS subframe, after DFT
// this could be changed in further version
for
(
l
=
0
;
l
<
11
;
l
++
){
nsss_extract_NB_IoT
(
ue
,
frame_parms
,
nsss_ext
,
l
);
toto
=
nsss_extract_NB_IoT
(
ue
,
frame_parms
,
nsss_ext
,
l
);
}
// now do the Cell ID estimation based on the precomputed sequences in PHY/LTE_TRANSPORT/nsss_NB_IoT.h
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
View file @
3c1373a1
...
...
@@ -958,7 +958,7 @@ unsigned int ulsch_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
NB_IoT_UL_eNB_HARQ_t
*
ulsch_harq
;
uint8_t
harq_pid
;
unsigned
short
nb_rb
;
//
unsigned short nb_rb;
unsigned
int
A
;
uint8_t
Q_m
;
unsigned
int
i
,
i2
,
j
,
j2
;
...
...
@@ -970,7 +970,7 @@ unsigned int ulsch_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
// uint8_t *columnset;
unsigned
int
sumKr
=
0
;
//unsigned int Qprime,L,O_RCC;
unsigned
int
G
,
Q_CQI
,
Q_RI
,
H
,
Hprime
,
Hpp
,
Cmux
,
Rmux_prime
;
unsigned
int
G
,
Q_CQI
,
Q_RI
=
0
,
H
,
Hprime
,
Hpp
,
Cmux
,
Rmux_prime
;
//unsigned int Qprime_ACK,Qprime_RI,len_ACK=0,len_RI=0;
...
...
@@ -1012,7 +1012,7 @@ unsigned int ulsch_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
/* ----------------------- Segmentation */
// nb_rb = ulsch_harq->nb_rb; // nb_rb set but not used ??
nb_rb
=
1
;
// nb_rb set but not used ??
//
nb_rb = 1; // nb_rb set but not used ??
A
=
ulsch_harq
->
TBS
;
Q_m
=
get_Qm_ul_NB_IoT
(
ulsch_harq
->
mcs
,
ulsch_harq
->
N_sc_RU
);
//G = nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch;
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation_NB_IoT.c
View file @
3c1373a1
...
...
@@ -1571,7 +1571,7 @@ void rx_ulsch_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
uint8_t
harq_pid
;
uint8_t
Qm
;
uint16_t
rx_power_correction
;
///
uint16_t rx_power_correction;
int16_t
*
llrp
;
int
subframe
=
proc
->
subframe_rx
;
...
...
@@ -1590,7 +1590,7 @@ void rx_ulsch_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
harq_pid
=
subframe2harq_pid_NB_IoT
(
frame_parms
,
proc
->
frame_rx
,
subframe
);
Qm
=
get_Qm_ul_NB_IoT
(
ulsch
[
UE_id
]
->
harq_process
->
mcs
,
Nsc_RU
);
rx_power_correction
=
1
;
///
rx_power_correction = 1;
if
(
ulsch
[
UE_id
]
->
harq_process
->
nb_rb
==
0
)
{
LOG_E
(
PHY
,
"PUSCH (%d/%x) nb_rb=0!
\n
"
,
harq_pid
,
ulsch
[
UE_id
]
->
rnti
);
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
3c1373a1
...
...
@@ -37,6 +37,7 @@
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if5_tools.h"
#include "openair1/SCHED/defs_NB_IoT.h"
#ifdef EMOS
#include "SCHED/phy_procedures_emos.h"
...
...
@@ -520,6 +521,8 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX
,
0
);
}
//////////////////////////// for NB-IoT testing /////////////////////////////
/*
// First half of PSS/SSS (FDD, slot 0)
if (subframe == 0) {
if ((fp->frame_type == FDD) &&
...
...
@@ -536,7 +539,11 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
0);
}
*/
/////////////////////////////////////////////////////////////////////////////////////
//////////////////////////// for NB-IoT testing /////////////////////////////
/*
// generate PBCH (Physical Broadcast CHannel) info
if ((frame&3) == 0) {
pbch_pdu[2] = 0;
...
...
@@ -602,7 +609,10 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
pbch_pdu[1] = frame&0xfc;
pbch_pdu[0] = 0;
}
*/
////////////////////////////////////////////////////////////////END////////////////////////////////////////////////
/*
//////////////////////////// for NB-IoT testing /////////////////////////////
/// First half of SSS (TDD, slot 1)
if ((fp->frame_type == TDD)&&
...
...
@@ -678,7 +688,8 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
2,
12);
}
*/
/////////////////////////////////////////////////////////////////////////
}
void
generate_eNB_dlsch_params
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
DCI_ALLOC_t
*
dci_alloc
,
const
int
UE_id
)
{
...
...
@@ -2877,8 +2888,8 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){
const
int
frame
=
proc
->
frame_rx
;
int
offset
=
(
eNB
->
single_thread_flag
==
1
)
?
0
:
(
subframe
&
1
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB
+
offset
,
proc
->
frame_rx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB
+
offset
,
proc
->
subframe_rx
);
///
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB+offset, proc->frame_rx );
///
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB+offset, proc->subframe_rx );
if
((
fp
->
frame_type
==
TDD
)
&&
(
subframe_select
(
fp
,
subframe
)
!=
SF_UL
))
{
...
...
@@ -2890,14 +2901,14 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON
+
offset
,
1
);
start_meas
(
&
eNB
->
phy_proc_rx
);
///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 1 );
///
start_meas(&eNB->phy_proc_rx);
LOG_D
(
PHY
,
"[eNB %d] Frame %d: Doing phy_procedures_eNB_common_RX(%d)
\n
"
,
eNB
->
Mod_id
,
frame
,
subframe
);
if
(
eNB
->
fep
)
eNB
->
fep
(
eNB
,
proc
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON
+
offset
,
0
);
///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 0 );
}
...
...
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
View file @
3c1373a1
...
...
@@ -221,7 +221,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
int
subframe
=
proc
->
subframe_tx
;
int
frame
=
proc
->
frame_tx
;
uint16_t
Ntti
=
10
;
//ntti = 10
int
RB_IoT_ID
=
1
9
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
RB_IoT_ID
=
9
;
// 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*/
...
...
@@ -1072,7 +1072,7 @@ void phy_procedures_eNB_TX_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
}
//generate NPSS/NSSS
common_signal_procedures_NB_IoT
(
eNB
,
proc
);
// common_signal_procedures_NB_IoT(eNB,proc); // to uncomment after NB-IoT testing
//Generate MIB
if
(
subframe
==
0
&&
(
eNB
->
npbch
!=
NULL
))
...
...
openair2/ENB_APP/enb_config.c
View file @
3c1373a1
...
...
@@ -54,7 +54,7 @@
#include "PHY/extern.h"
///////// for NB-IoT /////////////////////////
#include "SystemInformationBlockType2-NB-r13.h"
//
#include "SystemInformationBlockType2-NB-r13.h"
//////////////////END/////////////////////
/* those macros are here to help diagnose problems in configuration files
...
...
@@ -249,10 +249,10 @@
#define ENB_CONFIG_STRING_OSA_LOG_VERBOSITY "osa_log_verbosity"
//
//
************************************* NB-IoT parameters **************************************************************
//
///////////////////////////////////////////////NB-IoT parameters ///////////////////////////////////////////////
//
//
*************
RRC parameters in the config file of merge branch
/*
//
///////////////////////////////////////////////
RRC parameters in the config file of merge branch
#define ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT "rach_powerRampingStep_NB"
#define ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IOT "rach_preambleInitialReceivedTargetPower_NB"
#define ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX_CE_NB_IOT "rach_preambleTransMax_CE_NB"
...
...
@@ -297,8 +297,8 @@
#define ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT "npdcch_NumRepetitions_RA"
#define ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT "npdcch_StartSF_CSS_RA"
#define ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT "npdcch_Offset_RA"
//
*********************************************END*********************************************************************
*/
//
///////////////////////////////////////////////END///////////////////////////////////////////////
#define KHz (1000UL)
#define MHz (1000 * KHz)
...
...
@@ -761,8 +761,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
char
*
osa_log_verbosity
=
NULL
;
//
//
********************************** NB-IoT parameters ************************************
//
///////////////////////////////////////////////NB-IoT parameters ///////////////////////////////////////////////
//
/*
libconfig_int rach_raResponseWindowSize_NB = 0;
libconfig_int rach_macContentionResolutionTimer_NB = 0;
libconfig_int rach_powerRampingStep_NB = 0;
...
...
@@ -803,8 +804,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
libconfig_int npdcch_NumRepetitions_RA = 0;
libconfig_int npdcch_StartSF_CSS_RA = 0;
const char* npdcch_Offset_RA = NULL;
//
************************************END***************************************************
*/
//
//////////////////////////////////////////////END///////////////////////////////////////////////
/* for no gcc warnings */
...
...
@@ -1019,8 +1020,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_N310
,
&
ue_TimersAndConstants_n310
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_N311
,
&
ue_TimersAndConstants_n311
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UE_TRANSMISSION_MODE
,
&
ue_TransmissionMode
)
/*
//
//
************************************************************ NB-IoT ***********************************************************************************
//
///////////////////////////////////////////// NB-IoT ///////////////////////////////////////////////
//
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE_NB_IOT, &rach_raResponseWindowSize_NB)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IOT, &rach_macContentionResolutionTimer_NB)
...
...
@@ -1062,7 +1064,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT, &npdcch_NumRepetitions_RA)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT, &npdcch_StartSF_CSS_RA)
&& config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT, &npdcch_Offset_RA)
/////******************************************************************END*******************************************************************************************
*/
////////////////////////////////////////////////////END///////////////////////////////////////////////
#if defined(Rel10) || defined(Rel14)
...
...
@@ -2116,10 +2119,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
lib_config_file_name_pP
,
i
,
ue_TransmissionMode
);
break
;
}
//
****************************************************************************************************************
//
************************************ NB-IoT part ***************************************************************
//
****************************************************************************************************************
/*
//
////////////////////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////// NB-IoT part ///////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////////////////////////////////
switch (rach_raResponseWindowSize_NB) {
case 2:
...
...
@@ -2685,7 +2688,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
lib_config_file_name_pP, i, deltaPreambleMsg3);
//
************************************************************************* NB-IoT Timer ************************************************************
//
///////////////////////////////////////////////NB-IoT Timer ///////////////////////////////////////////////
switch (ue_TimersAndConstants_t300_NB) {
case 2500:
enb_properties.properties[enb_properties_index]->ue_TimersAndConstants_t300_NB[j] = UE_TimersAndConstants_NB_r13__t300_r13_ms2500;
...
...
@@ -2923,7 +2926,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
}
//
************************************************************************** NBPRACH NB-IoT *****************************************************
//
/////////////////////////////////////////////// NBPRACH NB-IoT ///////////////////////////////////////////////
switch (nprach_Periodicity) {
case 40:
enb_properties.properties[enb_properties_index]->nprach_Periodicity[j] = NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms40;
...
...
@@ -3274,11 +3277,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for npdcch_Offset_RA choice: zero,oneEighth,oneFourth,threeEighth !\n",
lib_config_file_name_pP, i, npdcch_Offset_RA);
//****************************************************************************************************************
//***********************************************END**************************************************************
//****************************************************************************************************************
*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////END//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
...
...
openair2/LAYER2/MAC/main_NB_IoT.c
View file @
3c1373a1
...
...
@@ -27,8 +27,8 @@ int mac_init_global_param_NB_IoT(void)
}
*/
/////////////////////////////////////////////////////////////////////////////
LOG_I
(
MAC
,
"[MAIN] RRC NB-IoT initialization of global params
\n
"
);
rrc_init_global_param_NB_IoT
();
//
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 //////////////
/*
...
...
targets/RT/USER/lte-enb.c
View file @
3c1373a1
...
...
@@ -586,21 +586,26 @@ 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
)
{
///////////////////////////////////////////////////// Remove comments after testing phase 1 //////////////////////////
//Allocate memory for the structures used by PHY and MAC
// 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));
///////////////////////////////////// for NB-IoT testing ////////////////////////
/// UL_IND_t *UL_INFO;
/// Sched_Rsp_t *Sched_Rsp;
start_meas
(
&
softmodem_stats_rxtx_sf
);
/// UL_INFO = (UL_IND_t*) malloc(sizeof(UL_IND_t));
/// Sched_Rsp = (Sched_Rsp_t*) malloc(sizeof(Sched_Rsp_t));
/////////////////////////////////////// END ///////////////////////////////////////////
//start_meas(&softmodem_stats_rxtx_sf);
// ****************************************
// Common RX procedures subframe n
// 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);
///////////////////////////////////// for NB-IoT testing ////////////////////////
/// if ((eNB->do_prach)&&((eNB->node_function != NGFI_RCC_IF4p5_NB_IoT)))
/// eNB->do_prach(eNB,proc->frame_rx,proc->subframe_rx);
///////////////////////////////////////// END //////////////////////////////////////
/*UE-specific RX processing for subframe n*/
...
...
@@ -608,14 +613,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
);
...
...
@@ -623,7 +628,7 @@ static inline int rxtx_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc, ch
if
(
release_thread
(
&
proc
->
mutex_rxtx
,
&
proc
->
instance_cnt_rxtx
,
thread_name
)
<
0
)
return
(
-
1
);
stop_meas
(
&
softmodem_stats_rxtx_sf
);
//
stop_meas( &softmodem_stats_rxtx_sf );
return
(
0
);
}
...
...
@@ -631,7 +636,7 @@ static inline int rxtx_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc, ch
static
inline
int
rxtx
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
char
*
thread_name
)
{
start_meas
(
&
softmodem_stats_rxtx_sf
);
///
start_meas(&softmodem_stats_rxtx_sf);
// ****************************************
// Common RX procedures subframe n
...
...
@@ -642,9 +647,11 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
phy_procedures_eNB_common_RX
(
eNB
,
proc
);
// UE-specific RX processing for subframe n
///////////////////////////////////// for NB-IoT testing ////////////////////////
// for NB-IoT testing // activating only TX part
//if (eNB->proc_uespec_rx) eNB->proc_uespec_rx(eNB, proc, no_relay );
/// if (eNB->proc_uespec_rx) eNB->proc_uespec_rx(eNB, proc, no_relay );
////////////////////////////////////END///////////////////////
// *****************************************
// TX processing for subframe n+4
// run PHY TX procedures the one after the other for all CCs to avoid race conditions
...
...
@@ -658,7 +665,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
if
(
release_thread
(
&
proc
->
mutex_rxtx
,
&
proc
->
instance_cnt_rxtx
,
thread_name
)
<
0
)
return
(
-
1
);
stop_meas
(
&
softmodem_stats_rxtx_sf
);
///
stop_meas( &softmodem_stats_rxtx_sf );
return
(
0
);
}
...
...
@@ -673,11 +680,11 @@ static void* eNB_thread_rxtx( void* param ) {
static
int
eNB_thread_rxtx_status
;
eNB_rxtx_proc_t
*
proc
=
(
eNB_rxtx_proc_t
*
)
param
;
eNB_rxtx_proc_NB_IoT_t
*
proc_NB_IoT
=
(
eNB_rxtx_proc_NB_IoT_t
*
)
param
;
// to remove when eNB_thread_rxtx_status is duplicated for NB-IoT
///
eNB_rxtx_proc_NB_IoT_t *proc_NB_IoT = (eNB_rxtx_proc_NB_IoT_t*)param; // to remove when eNB_thread_rxtx_status is duplicated for NB-IoT
PHY_VARS_eNB
*
eNB
=
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
];
PHY_VARS_eNB_NB_IoT
*
eNB_NB_IoT
=
PHY_vars_eNB_NB_IoT_g
[
0
][
proc_NB_IoT
->
CC_id
];
// to remove when eNB_thread_rxtx_status is duplicated for NB-IoT
///
PHY_VARS_eNB_NB_IoT *eNB_NB_IoT = PHY_vars_eNB_NB_IoT_g[0][proc_NB_IoT->CC_id]; // to remove when eNB_thread_rxtx_status is duplicated for NB-IoT
char
thread_name
[
100
];
...
...
@@ -702,11 +709,11 @@ static void* eNB_thread_rxtx( void* param ) {
if
(
eNB
->
CC_id
==
0
)
{
#ifdef NB_IOT
if
(
rxtx_NB_IoT
(
eNB_NB_IoT
,
proc_NB_IoT
,
thread_name
)
<
0
)
break
;
#else
//
#ifdef NB_IOT
// if(rxtx_NB_IoT(eNB,proc
,thread_name)<0) break;
//
#else
if
(
rxtx
(
eNB
,
proc
,
thread_name
)
<
0
)
break
;
#endif
//
#endif
}
}
// while !oai_exit
...
...
@@ -1604,9 +1611,9 @@ static void* eNB_thread_single( void* param ) {
eNB_proc_t
*
proc
=
(
eNB_proc_t
*
)
param
;
eNB_rxtx_proc_t
*
proc_rxtx
=
&
proc
->
proc_rxtx
[
0
];
PHY_VARS_eNB
*
eNB
=
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
];
PHY_VARS_eNB_NB_IoT
*
eNB_NB_IoT
=
PHY_vars_eNB_NB_IoT_g
[
0
][
proc
->
CC_id
];
//
PHY_VARS_eNB_NB_IoT *eNB_NB_IoT = PHY_vars_eNB_NB_IoT_g[0][proc->CC_id];
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
NB_IoT_DL_FRAME_PARMS
*
fp_NB_IoT
=
&
eNB_NB_IoT
->
frame_parms
;
// NB_IoT_DL_FRAME_PARMS *fp_NB_IoT = &eNB_NB_IoT->frame_parms_NB_IoT
;
eNB
->
CC_id
=
proc
->
CC_id
;
void
*
rxp
[
2
],
*
rxp2
[
2
];
...
...
@@ -1758,7 +1765,7 @@ static void* eNB_thread_single( void* param ) {
wakeup_slaves
(
proc
);
if
(
rxtx_NB_IoT
(
eNB_NB_IoT
,
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/SIMU/USER/init_lte.c
View file @
3c1373a1
...
...
@@ -157,7 +157,7 @@ PHY_VARS_eNB_NB_IoT* init_lte_eNB_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
uint8_t
abstraction_flag
)
{
int
i
;
//
int i;
PHY_VARS_eNB_NB_IoT
*
PHY_vars_eNB
=
malloc
(
sizeof
(
PHY_VARS_eNB_NB_IoT
));
memset
(
PHY_vars_eNB
,
0
,
sizeof
(
PHY_VARS_eNB_NB_IoT
));
PHY_vars_eNB
->
Mod_id
=
eNB_id
;
...
...
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