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
79c80bc7
Commit
79c80bc7
authored
Jan 31, 2018
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding broadcast channel + bug fixes for physical layer
parent
30ee1222
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
20 deletions
+45
-20
openair1/PHY/LTE_REFSIG/lte_dl_cell_spec_NB_IoT.c
openair1/PHY/LTE_REFSIG/lte_dl_cell_spec_NB_IoT.c
+1
-1
openair1/PHY/LTE_TRANSPORT/lte_Isc_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/lte_Isc_NB_IoT.c
+3
-0
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
+9
-8
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
+1
-1
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
+1
-1
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+3
-3
openair1/PHY/defs.h
openair1/PHY/defs.h
+10
-0
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+17
-6
No files found.
openair1/PHY/LTE_REFSIG/lte_dl_cell_spec_NB_IoT.c
View file @
79c80bc7
...
...
@@ -68,7 +68,7 @@ int lte_dl_cell_spec_NB_IoT(PHY_VARS_eNB *phy_vars_eNB,
NB_IoT_start
=
phy_vars_eNB
->
frame_parms
.
ofdm_symbol_size
-
12
*
(
phy_vars_eNB
->
frame_parms
.
N_RB_DL
/
2
)
-
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
((
int
)(
ceil
(
phy_vars_eNB
->
frame_parms
.
N_RB_DL
/
(
float
)
2
))));
}
else
{
//XXX invalid mod operation (put a cast for the moment)
NB_IoT_start
=
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
((
int
)(
ceil
(
phy_vars_eNB
->
frame_parms
.
N_RB_DL
/
(
float
)
2
))));
NB_IoT_start
=
1
+
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
((
int
)(
ceil
(
phy_vars_eNB
->
frame_parms
.
N_RB_DL
/
(
float
)
2
))));
}
k
+=
NB_IoT_start
;
...
...
openair1/PHY/LTE_TRANSPORT/lte_Isc_NB_IoT.c
View file @
79c80bc7
...
...
@@ -52,6 +52,9 @@ uint16_t get_UL_sc_start_NB_IoT(uint16_t I_sc)
}
if
(
I_sc
>
18
){
return
-
1
;
}
else
{
return
-
1
;
// this was added to remove warning since it is not a void function
}
}
...
...
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
View file @
79c80bc7
...
...
@@ -24,6 +24,7 @@
#include "PHY/LTE_REFSIG/defs_NB_IoT.h"
#include "PHY/impl_defs_lte_NB_IoT.h"
#include "PHY/impl_defs_top_NB_IoT.h"
#include "PHY/impl_defs_lte.h"
//#ifdef PHY_ABSTRACTION
//#include "SIMULATION/TOOLS/defs.h"
...
...
@@ -35,17 +36,17 @@
#define NPBCH_A 34 // 34 for NB-IoT and 24 for LTE
int
allocate_npbch_REs_in_RB
(
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
int
allocate_npbch_REs_in_RB
(
LTE
_DL_FRAME_PARMS
*
frame_parms
,
int32_t
**
txdataF
,
uint32_t
*
jj
,
uint32_t
symbol_offset
,
uint8_t
*
x0
,
uint8_t
pilots
,
int16_t
amp
,
unsigned
short
id_offset
,
unsigned
short
id_offset
,
uint32_t
*
re_allocated
)
// not used variable ??!!
{
MIMO_mode_
NB_IoT_t
mimo_mode
=
(
frame_parms
->
mode1_flag
==
1
)
?
SISO_NB_IoT
:
ALAMOUTI_NB_IoT
;
MIMO_mode_
t
mimo_mode
=
(
frame_parms
->
mode1_flag
==
1
)
?
SISO
:
ALAMOUTI
;
uint32_t
tti_offset
,
aa
;
uint8_t
re
;
...
...
@@ -64,7 +65,7 @@ int allocate_npbch_REs_in_RB(NB_IoT_DL_FRAME_PARMS *frame_parms,
if
(
pilots
!=
1
||
re
%
3
!=
id_offset
)
// if re is not a pilot
{
// diff_re = re%3 - id_offset;
if
(
mimo_mode
==
SISO
_NB_IoT
)
{
//SISO mapping
if
(
mimo_mode
==
SISO
)
{
//SISO mapping
*
re_allocated
=
*
re_allocated
+
1
;
// variable incremented but never used
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
0
]
+=
(
x0
[
*
jj
]
==
1
)
?
(
-
gain_lin_QPSK
)
:
gain_lin_QPSK
;
//I //b_i
...
...
@@ -74,7 +75,7 @@ int allocate_npbch_REs_in_RB(NB_IoT_DL_FRAME_PARMS *frame_parms,
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
+=
(
x0
[
*
jj
]
==
1
)
?
(
-
gain_lin_QPSK
)
:
gain_lin_QPSK
;
//Q //b_{i+1}
}
*
jj
=
*
jj
+
1
;
}
else
if
(
mimo_mode
==
ALAMOUTI
_NB_IoT
)
{
}
else
if
(
mimo_mode
==
ALAMOUTI
)
{
*
re_allocated
=
*
re_allocated
+
1
;
((
int16_t
*
)
&
tmp_sample1
)[
0
]
=
(
x0
[
*
jj
]
==
1
)
?
(
-
gain_lin_QPSK
)
:
gain_lin_QPSK
;
...
...
@@ -123,7 +124,7 @@ int allocate_npbch_REs_in_RB(NB_IoT_DL_FRAME_PARMS *frame_parms,
int
generate_npbch
(
NB_IoT_eNB_NPBCH_t
*
eNB_npbch
,
int32_t
**
txdataF
,
int
amp
,
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_pdu
,
uint8_t
frame_mod64
,
unsigned
short
NB_IoT_RB_ID
)
...
...
@@ -199,7 +200,7 @@ int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch,
{
NB_IoT_start
=
frame_parms
->
ofdm_symbol_size
-
12
*
(
frame_parms
->
N_RB_DL
/
2
)
-
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
else
{
NB_IoT_start
=
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
NB_IoT_start
=
1
+
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
symbol_offset
=
frame_parms
->
ofdm_symbol_size
*
l
+
NB_IoT_start
;
// symbol_offset = 512 * L + NB_IOT_RB start
...
...
@@ -220,7 +221,7 @@ return(0);
}
/**********************************************************
**********************************************************/
void
npbch_scrambling
(
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
void
npbch_scrambling
(
LTE
_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_e
,
uint32_t
length
)
// 1600
{
...
...
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
View file @
79c80bc7
...
...
@@ -49,7 +49,7 @@ int generate_npss_NB_IoT(int32_t **txdataF,
{
NB_IoT_start
=
frame_parms
->
ofdm_symbol_size
-
12
*
(
frame_parms
->
N_RB_DL
/
2
)
-
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
else
{
NB_IoT_start
=
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
NB_IoT_start
=
1
+
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
// For the In-band or Stand-alone case the REs of NPSS signal have the same positions
for
(
s
=
0
;
s
<
11
;
s
++
)
// loop on OFDM symbols
...
...
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
View file @
79c80bc7
...
...
@@ -115,7 +115,7 @@ int generate_sss_NB_IoT(int32_t **txdataF,
{
NB_IoT_start
=
frame_parms
->
ofdm_symbol_size
-
12
*
(
frame_parms
->
N_RB_DL
/
2
)
-
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
else
{
NB_IoT_start
=
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
NB_IoT_start
=
1
+
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
// For the In-band or Stand-alone case the REs of NPSS signal have the same positions
for
(
s
=
0
;
s
<
11
;
s
++
)
// loop on OFDM symbols
...
...
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
View file @
79c80bc7
...
...
@@ -76,7 +76,7 @@ void generate_pilots_NB_IoT(PHY_VARS_eNB *phy_vars_eNB,
//NPBCH
int
allocate_npbch_REs_in_RB
(
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
int
allocate_npbch_REs_in_RB
(
LTE
_DL_FRAME_PARMS
*
frame_parms
,
int32_t
**
txdataF
,
uint32_t
*
jj
,
uint32_t
symbol_offset
,
...
...
@@ -90,13 +90,13 @@ int allocate_npbch_REs_in_RB(NB_IoT_DL_FRAME_PARMS *frame_parms,
int
generate_npbch
(
NB_IoT_eNB_NPBCH_t
*
eNB_npbch
,
int32_t
**
txdataF
,
int
amp
,
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
LTE
_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_pdu
,
uint8_t
frame_mod64
,
unsigned
short
NB_IoT_RB_ID
);
void
npbch_scrambling
(
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
void
npbch_scrambling
(
LTE
_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_e
,
uint32_t
length
);
...
...
openair1/PHY/defs.h
View file @
79c80bc7
...
...
@@ -120,6 +120,8 @@ static inline void* malloc16_clear( size_t size )
#include "impl_defs_top.h"
#include "impl_defs_lte.h"
#include "PHY/LTE_TRANSPORT/defs_NB_IoT.h"
#include "PHY/TOOLS/time_meas.h"
#include "PHY/CODING/defs.h"
#include "PHY/TOOLS/defs.h"
...
...
@@ -500,6 +502,14 @@ typedef struct PHY_VARS_eNB_s {
/// Pointer for ifdevice buffer struct
if_buffer_t
ifbuffer
;
/////////////// NB-IoT testing ////////////////////////////
NB_IoT_eNB_NPBCH_t
npbch
;
//////////////////// END /////////////////////////////////
}
PHY_VARS_eNB
;
#define debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg
...
...
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
View file @
79c80bc7
...
...
@@ -33,6 +33,7 @@
#include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h"
#include "PHY/LTE_ESTIMATION/defs_NB_IoT.h"
#include "PHY/LTE_TRANSPORT/defs_NB_IoT.h"
//#include "PHY/extern_NB_IoT.h" //where we get the global Sched_Rsp_t structure filled
//#include "SCHED/defs.h"
#include "SCHED/extern_NB_IoT.h"
...
...
@@ -46,7 +47,7 @@
// for NB-IoT
#include "SCHED/defs_NB_IoT.h"
#include "openair2/RRC/LITE/proto_NB_IoT.h"
//#define DEBUG_PHY_PROC (Already defined in cmake)
//#define DEBUG_ULSCH
...
...
@@ -217,13 +218,14 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
{
//LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
NB_IoT_eNB_NPBCH_t
*
broadcast_str
=
&
eNB
->
npbch
;
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
=
2
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
With_NSSS
=
0
;
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
uint8_t
*
npbch_pdu
=
get_NB_IoT_MIB
();
//NSSS only happened in the even frame
if
(
frame
%
2
==
0
)
...
...
@@ -236,8 +238,6 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
if
(
subframe
==
5
)
{
...
...
@@ -250,8 +250,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
else
if
((
subframe
==
9
)
&&
(
With_NSSS
==
1
))
{
//printf("NSSS");
generate_sss_NB_IoT
(
txdataF
,
generate_sss_NB_IoT
(
txdataF
,
AMP
,
fp
,
3
,
...
...
@@ -267,6 +267,17 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
subframe
,
RB_IoT_ID
,
With_NSSS
);
if
(
subframe
==
0
)
{
generate_npbch
(
broadcast_str
,
txdataF
,
AMP
,
fp
,
npbch_pdu
,
frame
%
64
,
RB_IoT_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