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
9257223e
Commit
9257223e
authored
Jun 08, 2017
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link the physical layer stuff in cmakelist and debugged
parent
15e4e6a4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
12 deletions
+75
-12
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+4
-0
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
+7
-5
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
+4
-2
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
+4
-3
openair1/PHY/LTE_TRANSPORT/pilots_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/pilots_NB_IoT.c
+3
-2
openair1/PHY/LTE_TRANSPORT/proto_nb_iot.h
openair1/PHY/LTE_TRANSPORT/proto_nb_iot.h
+53
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
9257223e
...
...
@@ -975,6 +975,10 @@ set(PHY_SRC
# depend on code generation from asn1c
${
RRC_FULL_DIR
}
/asn1_constants.h
# actual source
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/npss_NB_IoT.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/pilots_NB_IoT.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/pss.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/sss.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/pilots.c
...
...
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
View file @
9257223e
...
...
@@ -13,6 +13,7 @@
*/
#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "PHY/CODING/extern.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "defs.h"
...
...
@@ -118,10 +119,11 @@ int generate_npbch(NB_IoT_eNB_NPBCH *eNB_npbch,
int
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_pdu
,
uint8_t
frame_mod64
uint8_t
frame_mod64
,
unsigned
short
NB_IoT_RB_ID
)
{
int
i
,
l
;
int
id_offset
;
uint32_t
npbch_D
,
npbch_E
;
uint8_t
npbch_a
[
5
];
// 34/8 =4.25 => 4 bytes and 2 bits
uint8_t
RCC
;
...
...
@@ -139,7 +141,7 @@ int generate_npbch(NB_IoT_eNB_NPBCH *eNB_npbch,
if
(
frame_mod64
==
0
)
{
bzero
(
npbch_a
,
5
);
// initializing input data stream , filling with zeros
bzero
(
eNB_npbch
->
npbch_e
,
pbch_E
);
// filling with "0" the table pbch_e[1600]
bzero
(
eNB_npbch
->
npbch_e
,
n
pbch_E
);
// filling with "0" the table pbch_e[1600]
memset
(
eNB_npbch
->
npbch_d
,
LTE_NULL
,
96
);
// filling with "2" the first 96 elements of table pbch_d[216]
for
(
i
=
0
;
i
<
5
;
i
++
)
// set input bits stream
...
...
@@ -155,7 +157,7 @@ int generate_npbch(NB_IoT_eNB_NPBCH *eNB_npbch,
if
(
frame_parms
->
mode1_flag
==
1
)
// setting CRC mask depending on the number of used eNB antennas
amask
=
0x0000
;
else
{
switch
(
frame_parms
->
nb_antennas_tx
_eNB
)
{
// *****???? better replacing nb_antennas_tx_eNB by nb_antennas_tx_eNB_NB_IoT
switch
(
frame_parms
->
nb_antennas_tx
)
{
// *****???? better replacing nb_antennas_tx_eNB by nb_antennas_tx_eNB_NB_IoT
case
1
:
amask
=
0x0000
;
break
;
...
...
@@ -190,9 +192,9 @@ int generate_npbch(NB_IoT_eNB_NPBCH *eNB_npbch,
if
(
RB_IoT_ID
<
(
frame_parms
->
N_RB_DL
/
2
))
{
NB_IoT_start
=
frame_parms
->
ofdm_symbol_size
-
12
*
(
frame_parms
->
N_RB_DL
/
2
)
-
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
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
%
(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
NB_IoT_start
=
(
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
...
...
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
View file @
9257223e
...
...
@@ -13,7 +13,9 @@
*/
#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "PHY/extern.h"
#include "PHY/LTE_REFSIG/primary_synch_NB_IoT.h"
int
generate_npss_NB_IoT
(
int32_t
**
txdataF
,
short
amp
,
...
...
@@ -41,9 +43,9 @@ int generate_npss_NB_IoT(int32_t **txdataF,
if
(
RB_IoT_ID
<
(
frame_parms
->
N_RB_DL
/
2
))
{
NB_IoT_start
=
frame_parms
->
ofdm_symbol_size
-
12
*
(
frame_parms
->
N_RB_DL
/
2
)
-
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
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
%
(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
NB_IoT_start
=
(
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 @
9257223e
...
...
@@ -14,8 +14,10 @@
#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "defs.h"
#include "PHY/extern.h"
#include "nsss_NB_IoT.h"
int
generate_sss_NB_IoT
(
int32_t
**
txdataF
,
int16_t
amp
,
...
...
@@ -27,7 +29,6 @@ int generate_sss_NB_IoT(int32_t **txdataF,
{
uint8_t
aa
,
Nid_NB_IoT
,
Nid2
,
f
,
q
,
s
,
c
,
u
;
int16_t
*
d
;
uint8_t
Nid2
;
uint16_t
n_f
;
unsigned
short
a
;
uint16_t
slot_id
;
// slot_id = 17 in NB_IoT
...
...
@@ -109,9 +110,9 @@ int generate_sss_NB_IoT(int32_t **txdataF,
if
(
RB_IoT_ID
<
(
frame_parms
->
N_RB_DL
/
2
))
{
NB_IoT_start
=
frame_parms
->
ofdm_symbol_size
-
12
*
(
frame_parms
->
N_RB_DL
/
2
)
-
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
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
%
(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
NB_IoT_start
=
(
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/pilots_NB_IoT.c
View file @
9257223e
...
...
@@ -13,16 +13,17 @@
*/
#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
void
generate_pilots_NB_IoT
(
PHY_VARS_eNB
*
phy_vars_eNB
,
int32_t
**
txdataF
,
int16_t
amp
,
uint16_t
Ntti
,
// Ntti = 10
unsigned
short
RB_IoT_ID
,
// RB reserved for NB-IoT
unsigned
short
With_NSSS
;
)
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
unsigned
short
With_NSSS
)
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
{
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
phy_vars_eNB
->
lte_
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
phy_vars_eNB
->
frame_parms
;
uint32_t
tti
,
tti_offset
,
slot_offset
,
Nsymb
,
samples_per_symbol
;
uint8_t
first_pilot
,
second_pilot
;
...
...
openair1/PHY/LTE_TRANSPORT/proto_nb_iot.h
View file @
9257223e
...
...
@@ -34,6 +34,59 @@
#include "PHY/defs_nb_iot.h"
#include <math.h>
//NPSS
int
generate_npss_NB_IoT
(
int32_t
**
txdataF
,
short
amp
,
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
//NSSS
int
generate_sss_NB_IoT
(
int32_t
**
txdataF
,
int16_t
amp
,
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
unsigned
short
RB_IoT_ID
);
// new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
//NRS
void
generate_pilots_NB_IoT
(
PHY_VARS_eNB
*
phy_vars_eNB
,
int32_t
**
txdataF
,
int16_t
amp
,
uint16_t
Ntti
,
// Ntti = 10
unsigned
short
RB_IoT_ID
,
// RB reserved for NB-IoT
unsigned
short
With_NSSS
);
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
//NPBCH
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
,
uint32_t
*
re_allocated
);
int
generate_npbch
(
NB_IoT_eNB_NPBCH
*
eNB_npbch
,
int32_t
**
txdataF
,
int
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_pdu
,
uint8_t
frame_mod64
,
unsigned
short
NB_IoT_RB_ID
);
void
npbch_scrambling
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_e
,
uint32_t
length
);
// Functions below implement 36-211 and 36-212
/*Function to pack the DCI*/
...
...
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