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
c7d050c1
Commit
c7d050c1
authored
Sep 03, 2018
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generalization of PHY TX
parent
5d09a92d
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
359 additions
and
313 deletions
+359
-313
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
+21
-28
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+1
-1
openair1/PHY/LTE_TRANSPORT/dlsch_coding_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding_NB_IoT.c
+139
-121
openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
+1
-80
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
+32
-1
openair1/PHY/LTE_TRANSPORT/extern_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/extern_NB_IoT.h
+1
-0
openair1/PHY/LTE_TRANSPORT/lte_mcs_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/lte_mcs_NB_IoT.c
+50
-1
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+36
-31
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
+1
-1
openair1/PHY/LTE_TRANSPORT/vars_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/vars_NB_IoT.h
+1
-0
openair1/PHY/defs.h
openair1/PHY/defs.h
+4
-2
openair1/PHY/impl_defs_lte.h
openair1/PHY/impl_defs_lte.h
+4
-0
openair1/SCHED/IF_Module_L1_primitives_NB_IoT.c
openair1/SCHED/IF_Module_L1_primitives_NB_IoT.c
+11
-10
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+12
-15
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+11
-6
openair2/LAYER2/MAC/output_handler_NB_IoT.c
openair2/LAYER2/MAC/output_handler_NB_IoT.c
+2
-3
openair2/LAYER2/MAC/vars_NB_IoT.h
openair2/LAYER2/MAC/vars_NB_IoT.h
+1
-1
openair2/RRC/LITE/proto_NB_IoT.h
openair2/RRC/LITE/proto_NB_IoT.h
+3
-3
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+3
-3
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+7
-1
targets/SIMU/USER/init_lte.c
targets/SIMU/USER/init_lte.c
+18
-5
No files found.
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
View file @
c7d050c1
...
...
@@ -42,6 +42,8 @@
//
#define MAX_NUM_DLSCH_SEGMENTS_NB_IoT 16
#define MAX_NUM_ULSCH_SEGMENTS_NB_IoT MAX_NUM_DLSCH_SEGMENTS_NB_IoT
#define MAX_NUM_BITS_IN_DL_PER_SF_NB_IoT 284 // case one NB-IoT antenna && one LTE antenna
//#define MAX_DLSCH_PAYLOAD_BYTES (MAX_NUM_DLSCH_SEGMENTS*768)
//#define MAX_ULSCH_PAYLOAD_BYTES (MAX_NUM_ULSCH_SEGMENTS*768)
//
...
...
@@ -71,6 +73,8 @@
//
//// for NB-IoT
#define MAX_NUM_CHANNEL_BITS_NB_IoT 3360 //14 symbols * 12 sub-carriers * 10 SF * 2bits/RE // to check during real tests
#define MAX_NUM_DL_CHANNEL_BITS_NB_IoT 2840 //284* 10 SF // case In-band operation mode witn 1 NB-IoT antenna && 1 LTE antenna //
#define MAX_TBS_DL_SIZE_BITS_NB_IoT 680 // in release 13 // in release 14 = 2048 // ??? **** not sure
////#define MAX_NUM_CHANNEL_BITS_NB_IOT 3*680 /// ??? ****not sure
//
...
...
@@ -148,16 +152,15 @@ typedef enum {
typedef
struct
{
uint16_t
si_rnti
;
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
uint8_t
e
[
1888
];
uint8_t
e
[
MAX_NUM_DL_CHANNEL_BITS_NB_IoT
];
/// data after scrambling
uint8_t
s_e
[
1888
];
uint8_t
s_e
[
MAX_NUM_DL_CHANNEL_BITS_NB_IoT
];
//length of the table e
uint16_t
length_e
;
// new parameter
/// Tail-biting convolutional coding outputs
uint8_t
d
[
96
+
(
3
*
(
24
+
MAX_TBS_DL_SIZE_BITS_NB_IoT
))];
// new parameter
/// Sub-block interleaver outputs
uint8_t
w
[
3
*
3
*
(
MAX_TBS_DL_SIZE_BITS_NB_IoT
+
24
)];
// new parameter
/// Status Flag indicating for this DLSCH (idle,active,disabled)
//SCH_status_t status;
/// Transport block size
...
...
@@ -179,29 +182,28 @@ typedef struct {
typedef
struct
{
uint16_t
si_rnti
;
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
uint8_t
e
[
236
];
uint8_t
e
[
MAX_NUM_DL_CHANNEL_BITS_NB_IoT
];
/// data after scrambling
uint8_t
s_e
[
236
];
uint8_t
s_e
[
MAX_NUM_DL_CHANNEL_BITS_NB_IoT
];
//length of the table e
uint16_t
length_e
;
// new parameter
/// Tail-biting convolutional coding outputs
uint8_t
d
[
96
+
(
3
*
(
24
+
56
))];
// new parameter
uint8_t
d
[
96
+
(
3
*
(
24
+
MAX_TBS_DL_SIZE_BITS_NB_IoT
))];
// new parameter
/// Sub-block interleaver outputs
uint8_t
w
[
3
*
3
*
(
56
+
24
)];
// new parameter
uint8_t
w
[
3
*
3
*
(
MAX_TBS_DL_SIZE_BITS_NB_IoT
+
24
)];
// new parameter
/////////////////////////////////
uint16_t
si_rnti_x
;
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
uint8_t
e_x
[
472
];
uint8_t
e_x
[
MAX_NUM_DL_CHANNEL_BITS_NB_IoT
];
/// data after scrambling
uint8_t
s_e_x
[
472
];
uint8_t
s_e_x
[
MAX_NUM_DL_CHANNEL_BITS_NB_IoT
];
//length of the table e
uint16_t
length_e_x
;
// new parameter
/// Tail-biting convolutional coding outputs
uint8_t
d_x
[
96
+
(
3
*
(
24
+
256
))];
// new parameter
uint8_t
d_x
[
96
+
(
3
*
(
24
+
MAX_TBS_DL_SIZE_BITS_NB_IoT
))];
// new parameter
/// Sub-block interleaver outputs
uint8_t
w_x
[
3
*
3
*
(
256
+
24
)];
// new parameter
uint8_t
w_x
[
3
*
3
*
(
MAX_TBS_DL_SIZE_BITS_NB_IoT
+
24
)];
// new parameter
////////////////////////////////
/// Status Flag indicating for this DLSCH (idle,active,disabled)
//SCH_status_t status;
/// Transport block size
...
...
@@ -236,16 +238,15 @@ typedef struct {
/// modulation always QPSK Qm = 2
uint8_t
modulation
;
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
uint8_t
e
[
MAX_NUM_CHANNEL_BITS_NB_IoT
];
uint8_t
e
[
MAX_NUM_
DL_
CHANNEL_BITS_NB_IoT
];
/// data after scrambling
uint8_t
s_e
[
MAX_NUM_CHANNEL_BITS_NB_IoT
];
uint8_t
s_e
[
MAX_NUM_
DL_
CHANNEL_BITS_NB_IoT
];
//length of the table e
uint16_t
length_e
;
// new parameter
/// Tail-biting convolutional coding outputs
uint8_t
d
[
96
+
(
3
*
(
24
+
MAX_TBS_DL_SIZE_BITS_NB_IoT
))];
// new parameter
/// Sub-block interleaver outputs
uint8_t
w
[
3
*
3
*
(
MAX_TBS_DL_SIZE_BITS_NB_IoT
+
24
)];
// new parameter
/// Status Flag indicating for this DLSCH (idle,active,disabled)
//SCH_status_t status;
/// Transport block size
...
...
@@ -611,10 +612,7 @@ typedef struct {
typedef
struct
{
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
int32_t
*
txdataF
[
8
];
/// dl channel estimates (estimated from ul channel estimates)
int32_t
**
calib_dl_ch_estimates
;
/// Allocated RNTI (0 means DLSCH_t is not currently used)
uint16_t
rnti
;
/// Active flag for baseband transmitter processing
...
...
@@ -631,21 +629,16 @@ typedef struct {
SCH_status_NB_IoT_t
status
;
//////////////////////////////////////////////////////////////////////
/*
//////////////////////////////////////////////////////////////////////
NB_IoT_DL_eNB_SIB_t content_sib1;
NB_IoT_DL_eNB_SIB_t content_sib23;
NB_IoT_DL_eNB_RAR_t content_rar;
*/
//////////////////////////////////////////////////////////////////////
/// Number of soft channel bits
uint32_t
G
;
/// Maximum number of HARQ rounds
uint8_t
Mlimit
;
/// Nsoft parameter related to UE Category
uint32_t
Nsoft
;
/// amplitude of PDSCH (compared to RS) in symbols without pilots
int16_t
sqrt_rho_a
;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t
sqrt_rho_b
;
///NB-IoT
/// may use in the npdsch_procedures
uint16_t
scrambling_sequence_intialization
;
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
c7d050c1
...
...
@@ -689,7 +689,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
*/
int
dlsch_encoding
(
PHY_VARS_eNB
*
eNB
,
unsigned
char
*
a
,
unsigned
char
*
a
,
uint8_t
num_pdcch_symbols
,
LTE_eNB_DLSCH_t
*
dlsch
,
int
frame
,
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding_NB_IoT.c
View file @
c7d050c1
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
View file @
c7d050c1
...
...
@@ -137,7 +137,7 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
NB_IoT_DL_eNB_
SIB
_t
*
dlsch0
,
//NB_IoT_eNB_NDLSCH_t
NB_IoT_DL_eNB_
HARQ
_t
*
dlsch0
,
//NB_IoT_eNB_NDLSCH_t
int
G
,
// number of bits per subframe
unsigned
int
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
int
subframe
,
...
...
@@ -196,82 +196,3 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
return
(
re_allocated
);
}
////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////////////////////////////tmp functions /////////////////////////////////
int
dlsch_modulation_rar_NB_IoT
(
int32_t
**
txdataF
,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
NB_IoT_DL_eNB_RAR_t
*
dlsch0
,
//NB_IoT_eNB_NDLSCH_t
int
G
,
// number of bits per subframe
unsigned
int
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
int
subframe
,
unsigned
short
NB_IoT_RB_ID
,
uint8_t
option
)
{
//uint8_t harq_pid = dlsch0->current_harq_pid;
//NB_IoT_DL_eNB_HARQ_t *dlsch0_harq = dlsch0->harq_processes[harq_pid];
uint32_t
jj
=
0
;
uint32_t
re_allocated
,
symbol_offset
;
uint16_t
l
;
uint8_t
id_offset
,
pilot_shift
,
pilots
=
0
;
unsigned
short
bandwidth_even_odd
;
unsigned
short
NB_IoT_start
,
RB_IoT_ID
;
re_allocated
=
0
;
id_offset
=
0
;
pilot_shift
=
0
;
// testing if the total number of RBs is even or odd
bandwidth_even_odd
=
frame_parms
->
N_RB_DL
%
2
;
// 0 even, 1 odd
RB_IoT_ID
=
NB_IoT_RB_ID
;
// step 5, 6, 7 // modulation and mapping (slot 1, symbols 0..3)
for
(
l
=
control_region_size
;
l
<
14
;
l
++
)
{
// loop on OFDM symbols
if
((
l
>=
4
&&
l
<=
7
)
||
(
l
>=
11
&&
l
<=
13
))
{
pilots
=
1
;
if
(
l
==
4
||
l
==
6
||
l
==
11
||
l
==
13
)
{
pilot_shift
=
1
;
}
}
else
{
pilots
=
0
;
}
id_offset
=
frame_parms
->
Nid_cell
%
6
;
// Cell_ID_NB_IoT % 6
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
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
else
{
NB_IoT_start
=
1
+
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
symbol_offset
=
(
14
*
subframe
*
frame_parms
->
ofdm_symbol_size
)
+
frame_parms
->
ofdm_symbol_size
*
l
+
NB_IoT_start
;
// symbol_offset = 512 * L + NB_IOT_RB start
if
(
option
==
2
)
{
allocate_REs_in_RB_NB_IoT
(
frame_parms
,
txdataF
,
&
jj
,
symbol_offset
,
&
dlsch0
->
s_e
[
236
],
pilots
,
amp
,
id_offset
,
pilot_shift
,
&
re_allocated
);
}
else
{
allocate_REs_in_RB_NB_IoT
(
frame_parms
,
txdataF
,
&
jj
,
symbol_offset
,
&
dlsch0
->
s_e
[
0
],
pilots
,
amp
,
id_offset
,
pilot_shift
,
&
re_allocated
);
}
}
// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_OUT);
return
(
re_allocated
);
}
\ No newline at end of file
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
View file @
c7d050c1
...
...
@@ -77,7 +77,7 @@ void dlsch_sib_scrambling_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
}
void
dlsch_sib_scrambling_rar_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
NB_IoT_DL_eNB_
RAR
_t
*
dlsch
,
NB_IoT_DL_eNB_
HARQ
_t
*
dlsch
,
int
tot_bits
,
// total number of bits to transmit
uint16_t
Nf
,
// Nf is the frame number (0..9)
uint8_t
Ns
,
...
...
@@ -106,6 +106,37 @@ void dlsch_sib_scrambling_rar_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
}
void
dlsch_scrambling_Gen_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
NB_IoT_eNB_NDLSCH_t
*
dlsch
,
int
tot_bits
,
// total number of bits to transmit
uint16_t
Nf
,
// Nf is the frame number (0..9)
uint8_t
Ns
,
uint32_t
rnti
)
{
int
i
,
j
,
k
=
0
;
uint32_t
x1
,
x2
,
s
=
0
;
uint8_t
*
e
=
dlsch
->
harq_process
->
e
;
//uint8_t *e=dlsch->harq_processes[dlsch->current_harq_pid]->e;
//x2 = (dlsch->si_rnti<<15) + (frame_parms->Nid_cell + 1) * ( (Nf % 61) + 1 ) ;
x2
=
(
rnti
<<
14
)
+
((
Nf
%
2
)
<<
13
)
+
((
Ns
>>
1
)
<<
9
)
+
frame_parms
->
Nid_cell
;
// for NPDSCH not carriying SIBs
//x2 = (dlsch->harq_process_sib1.rnti<<14) + ((Nf%2)<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 10.2.3.1
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
1
);
for
(
i
=
0
;
i
<
(
1
+
(
tot_bits
>>
5
));
i
++
)
{
for
(
j
=
0
;
j
<
32
;
j
++
,
k
++
)
{
dlsch
->
harq_process
->
s_e
[
k
]
=
(
e
[
k
]
&
1
)
^
((
s
>>
j
)
&
1
);
}
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
0
);
}
}
void
init_unscrambling_lut_NB_IoT
()
{
...
...
openair1/PHY/LTE_TRANSPORT/extern_NB_IoT.h
View file @
c7d050c1
...
...
@@ -31,6 +31,7 @@ extern unsigned char cs_ri_extended_NB_IoT[4];
extern
unsigned
char
cs_ack_normal_NB_IoT
[
4
];
extern
unsigned
char
cs_ack_extended_NB_IoT
[
4
];
extern
int8_t
wACK_RX_NB_IoT
[
5
][
4
];
extern
int
G_tab
[
18
];
extern
short
conjugate
[
8
],
conjugate2
[
8
];
...
...
openair1/PHY/LTE_TRANSPORT/lte_mcs_NB_IoT.c
View file @
c7d050c1
...
...
@@ -32,8 +32,10 @@
//#include "PHY/defs.h"
//#include "PHY/extern.h"
#include "PHY/LTE_TRANSPORT/proto_NB_IoT.h"
#include "PHY/LTE_TRANSPORT/extern_NB_IoT.h"
unsigned
char
get_Qm_ul_NB_IoT
(
unsigned
char
I_MCS
,
uint8_t
N_sc_RU
)
{
// N_sc_RU = 1, 3, 6, 12
...
...
@@ -48,3 +50,50 @@ unsigned char get_Qm_ul_NB_IoT(unsigned char I_MCS, uint8_t N_sc_RU)
}
int
get_G_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
uint16_t
num_ctrl_symbols
=
frame_parms
->
control_region_size
;
uint8_t
nb_antennas_tx_LTE
=
frame_parms
->
nb_antennas_tx
;
uint8_t
nb_antennas_tx_NB_IoT
=
frame_parms
->
nb_antennas_tx_NB_IoT
;
int
G_value
=
0
;
switch
(
nb_antennas_tx_NB_IoT
+
(
2
*
nb_antennas_tx_LTE
))
{
case
10
:
G_value
=
G_tab
[(
1
*
3
)
-
num_ctrl_symbols
];
break
;
case
6
:
G_value
=
G_tab
[(
2
*
3
)
-
num_ctrl_symbols
];
break
;
case
4
:
G_value
=
G_tab
[(
3
*
3
)
-
num_ctrl_symbols
];
break
;
case
9
:
G_value
=
G_tab
[(
4
*
3
)
-
num_ctrl_symbols
];
break
;
case
5
:
G_value
=
G_tab
[(
5
*
3
)
-
num_ctrl_symbols
];
break
;
case
3
:
G_value
=
G_tab
[(
6
*
3
)
-
num_ctrl_symbols
];
break
;
default:
printf
(
"Error getting G"
);
}
return
(
G_value
);
}
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
View file @
c7d050c1
...
...
@@ -38,9 +38,12 @@
#include "PHY/defs_NB_IoT.h"
#include "PHY/impl_defs_lte.h"
#include "PHY/defs.h"
//#include "PHY/LTE_TRANSPORT/defs_NB_IoT.h"
//#include <math.h>
//NPSS
void
free_eNB_dlsch_NB_IoT
(
NB_IoT_eNB_NDLSCH_t
*
dlsch
);
void
init_unscrambling_lut_NB_IoT
(
void
);
int
generate_npss_NB_IoT
(
int32_t
**
txdataF
,
...
...
@@ -124,11 +127,28 @@ void dlsch_sib_scrambling_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t
Ns
);
void
dlsch_sib_scrambling_rar_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
NB_IoT_DL_eNB_
RAR
_t
*
dlsch
,
NB_IoT_DL_eNB_
HARQ
_t
*
dlsch
,
int
tot_bits
,
// total number of bits to transmit
uint16_t
Nf
,
// Nf is the frame number (0..9)
uint8_t
Ns
,
uint32_t
rnti
);
uint32_t
rnti
);
void
dlsch_scrambling_Gen_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
NB_IoT_eNB_NDLSCH_t
*
dlsch
,
int
tot_bits
,
// total number of bits to transmit
uint16_t
Nf
,
// Nf is the frame number (0..9)
uint8_t
Ns
,
uint32_t
rnti
);
NB_IoT_eNB_NDLSCH_t
*
new_eNB_dlsch_NB_IoT
(
uint8_t
length
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
/*void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
NB_IoT_eNB_NDLSCH_t *dlsch,
int tot_bits, // total number of bits to transmit
uint16_t Nf, // Nf is the frame number (0..9)
uint8_t Ns,
uint32_t rnti, /// for SIB1 the SI_RNTI should be get from the DL request
uint8_t type);*/
/*
int scrambling_npbch_REs_rel_14(LTE_DL_FRAME_PARMS *frame_parms,
int32_t **txdataF,
...
...
@@ -208,14 +228,6 @@ unsigned int ulsch_decoding_NB_IoT(PHY_VARS_eNB *phy_vars_eNB,
uint8_t
Nbundled
,
uint8_t
llr8_flag
);
//NB-IoT version
NB_IoT_eNB_NDLSCH_t
*
new_eNB_dlsch_NB_IoT
(
//unsigned char Kmimo,
//unsigned char Mdlharq,
uint32_t
Nsoft
,
//unsigned char N_RB_DL,
uint8_t
abstraction_flag
,
NB_IoT_DL_FRAME_PARMS
*
frame_parms
);
// NB_IoT_eNB_NULSCH_t *new_eNB_ulsch_NB_IoT(uint8_t abstraction_flag);
...
...
@@ -289,35 +301,30 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
NB_IoT_DL_eNB_
SIB
_t
*
dlsch0
,
//NB_IoT_eNB_NDLSCH_t
NB_IoT_DL_eNB_
HARQ
_t
*
dlsch0
,
//NB_IoT_eNB_NDLSCH_t
int
G
,
// number of bits per subframe
unsigned
int
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
int
subframe
,
unsigned
short
NB_IoT_RB_ID
);
int
dlsch_modulation_rar_NB_IoT
(
int32_t
**
txdataF
,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
NB_IoT_DL_eNB_RAR
_t
*
dlsch0
,
//NB_IoT_eNB_NDLSCH_t
int
G
,
// number of bits per subframe
unsigned
int
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
int
subframe
,
unsigned
short
NB_IoT_RB_ID
,
uint8_t
option
);
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
NB_IoT_DL_eNB_HARQ
_t
*
dlsch0
,
//NB_IoT_eNB_NDLSCH_t
int
G
,
// number of bits per subframe
unsigned
int
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
int
subframe
,
unsigned
short
NB_IoT_RB_ID
,
uint8_t
option
);
int32_t
dlsch_encoding_NB_IoT
(
unsigned
char
*
a
,
NB_IoT_DL_eNB_
SIB
_t
*
dlsch
,
// NB_IoT_eNB_NDLSCH_t
NB_IoT_DL_eNB_
HARQ
_t
*
dlsch
,
// NB_IoT_eNB_NDLSCH_t
uint8_t
Nsf
,
// number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table)
unsigned
int
G
,
uint8_t
option
);
// G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
///////////////////////temp function ///////////////////////////////
int
dlsch_encoding_rar_NB_IoT
(
unsigned
char
*
a
,
NB_IoT_DL_eNB_RAR_t
*
dlsch
,
//NB_IoT_eNB_NDLSCH_t
uint8_t
Nsf
,
// number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table)
unsigned
int
G
,
uint8_t
option
);
/////////////////////////////////////////////////////////////////
void
rx_ulsch_NB_IoT
(
PHY_VARS_eNB
*
phy_vars_eNB
,
eNB_rxtx_proc_t
*
proc
,
...
...
@@ -394,7 +401,6 @@ int16_t* sub_sampling_NB_IoT(int16_t *input_buffer, uint32_t length_input, uint3
void
filtering_signal
(
int16_t
*
input_buffer
,
int16_t
*
filtered_buffer
,
uint32_t
FRAME_LENGTH_COMPLEX_SAMPLESx
);
//************************************************************//
//*****************Vincent part for ULSCH demodulation ******************//
uint16_t
get_UL_sc_start_NB_IoT
(
uint16_t
I_sc
);
void
generate_grouphop_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
);
...
...
@@ -442,8 +448,6 @@ void rotate_bpsk_NB_IoT(PHY_VARS_eNB *eNB,
uint8_t
symbol
);
//************************************************************//
//************************************************************//
//*****************Vincent part for DLSCH demodulation ******************//
int
rx_npdsch_NB_IoT
(
PHY_VARS_UE_NB_IoT
*
ue
,
unsigned
char
eNB_id
,
...
...
@@ -539,9 +543,10 @@ int ul_chequal_tmp_NB_IoT(int32_t **rxdataF_ext,
////////////////////////////NB-IoT testing ///////////////////////////////
void
clean_eNb_ulsch_NB_IoT
(
NB_IoT_eNB_NULSCH_t
*
ulsch
);
int
get_G_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
);
NB_IoT_eNB_NULSCH_t
*
new_eNB_ulsch_NB_IoT
(
uint8_t
max_turbo_iterations
,
uint8_t
N_RB_UL
,
uint8_t
abstraction_flag
);
//************************************************************//
#endif
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
View file @
c7d050c1
...
...
@@ -190,7 +190,7 @@ NB_IoT_eNB_NULSCH_t *new_eNB_ulsch_NB_IoT(uint8_t max_turbo_iterations,uint8_t N
void
clean_eNb_ulsch_NB_IoT
(
NB_IoT_eNB_NULSCH_t
*
ulsch
)
{
unsigned
char
i
;
//
unsigned char i;
//ulsch = (LTE_eNB_ULSCH_t *)malloc16(sizeof(LTE_eNB_ULSCH_t));
if
(
ulsch
)
{
...
...
openair1/PHY/LTE_TRANSPORT/vars_NB_IoT.h
View file @
c7d050c1
...
...
@@ -30,6 +30,7 @@ unsigned char cs_ri_extended_NB_IoT[4] = {0,3,5,8};
unsigned
char
cs_ack_normal_NB_IoT
[
4
]
=
{
2
,
3
,
8
,
9
};
unsigned
char
cs_ack_extended_NB_IoT
[
4
]
=
{
1
,
2
,
6
,
7
};
int
G_tab
[
18
]
=
{
200
,
224
,
240
,
208
,
232
,
256
,
220
,
244
,
268
,
216
,
240
,
256
,
224
,
248
,
264
,
236
,
260
,
284
};
int8_t
wACK_RX_NB_IoT
[
5
][
4
]
=
{{
-
1
,
-
1
,
-
1
,
-
1
},{
-
1
,
1
,
-
1
,
1
},{
-
1
,
-
1
,
1
,
1
},{
-
1
,
1
,
1
,
-
1
},{
1
,
1
,
1
,
1
}};
...
...
openair1/PHY/defs.h
View file @
c7d050c1
...
...
@@ -512,8 +512,10 @@ volatile uint16_t preamble_index_NB_IoT;
NB_IoT_eNB_NPBCH_t
npbch
;
NB_IoT_eNB_NDLSCH_t
*
ndlsch
[
NUMBER_OF_UE_MAX
];
NB_IoT_eNB_NULSCH_t
*
nulsch
[
NUMBER_OF_UE_MAX
+
1
];
//nulsch[0] contains the RAR
NB_IoT_eNB_NDLSCH_t
ndlsch_SIB
,
*
ndlsch_ra
;
NB_IoT_eNB_NDLSCH_t
ndlsch_rar
;
NB_IoT_eNB_NDLSCH_t
*
ndlsch_SIB1
;
NB_IoT_eNB_NDLSCH_t
*
ndlsch_SIB23
;
NB_IoT_eNB_NDLSCH_t
*
ndlsch_RAR
;
//NB_IoT_eNB_NDLSCH_t ndlsch_rar;
NB_IoT_eNB_NPDCCH_temp_t
npdcch_tmp
;
NB_IoT_eNB_NULSCH_t
*
ulsch_NB_IoT
[
NUMBER_OF_UE_MAX
+
1
];
...
...
openair1/PHY/impl_defs_lte.h
View file @
c7d050c1
...
...
@@ -642,6 +642,10 @@ typedef struct {
////////////////////////// NB-IoT testing //////////////////////////////
uint8_t
subcarrier_spacing
;
uint16_t
control_region_size
;
uint8_t
nb_antennas_tx_NB_IoT
;
// to replace with NB_IoT_frame_params
NPUSCH_CONFIG_COMMONx
npusch_config_common
;
/////////////////////////////////////////////////////////////////////
...
...
openair1/SCHED/IF_Module_L1_primitives_NB_IoT.c
View file @
c7d050c1
...
...
@@ -26,11 +26,11 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
nfapi_dl_config_ndlsch_pdu_rel13_t
*
rel13
=
&
dl_config_pdu
->
ndlsch_pdu
.
ndlsch_pdu_rel13
;
int
UE_id
=
-
1
;
int
flag_malloc
=
0
;
ndlsch
=
&
eNB
->
ndlsch_SIB
;
ndlsch
=
eNB
->
ndlsch_SIB1
;
if
(
flag_malloc
)
free
(
ndlsch
->
harq_process
);
//
if(flag_malloc) free (ndlsch->harq_process);
ndlsch
->
harq_process
=
(
NB_IoT_DL_eNB_HARQ_t
*
)
malloc
(
sizeof
(
NB_IoT_DL_eNB_HARQ_t
));
//
ndlsch->harq_process = (NB_IoT_DL_eNB_HARQ_t*) malloc (sizeof(NB_IoT_DL_eNB_HARQ_t));
flag_malloc
=
1
;
//Check for SI PDU since in NB-IoT there is no DCI for that
//SIB1 (type 0), other DLSCH data (type 1) (include the SI messages) based on our ASSUMPTIONs
...
...
@@ -59,7 +59,8 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
//ndlsch_harq->pdu = sdu;
//LOG_I(PHY,"B content_sib1:%d\n",sdu);
ndlsch
->
content_sib1
.
pdu
=
sdu
;
/////ndlsch->content_sib1.pdu = sdu;
ndlsch_harq
->
pdu
=
sdu
;
//LOG_I(PHY,"A content_sib1:%d\n",ndlsch->content_sib1.pdu);
//should be from 1 to 8
...
...
@@ -109,7 +110,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
ndlsch
->
npdsch_start_symbol
=
rel13
->
start_symbol
;
//start OFDM symbol for the ndlsch transmission
//ndlsch_harq->pdu = sdu;
//LOG_I(PHY,"B content_sib23:%d\n",sdu);
ndlsch
->
content_sib23
.
pdu
=
sdu
;
ndlsch
_harq
->
pdu
=
sdu
;
ndlsch_harq
->
resource_assignment
=
rel13
->
number_of_subframes_for_resource_assignment
;
//value 2 or 8
ndlsch_harq
->
repetition_number
=
rel13
->
repetition_number
;
//should be always fix to 0 to be mapped in 1
ndlsch_harq
->
modulation
=
rel13
->
modulation
;
...
...
@@ -128,7 +129,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
//there is no need of repeating the configuration on the ndlsch
//ndlsch_harq->pdu = NULL;
//LOG_I(PHY,"sib23=NULL\n");
ndlsch
->
content_sib23
.
pdu
=
NULL
;
ndlsch
_harq
->
pdu
=
NULL
;
}
...
...
@@ -144,11 +145,11 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
{
//check if the PDU is for RAR
if
(
eNB
->
ndlsch_
ra
!=
NULL
&&
rel13
->
rnti
==
eNB
->
ndlsch_ra
->
rnti
)
//rnti for the RAR should have been set priviously by the DCI
if
(
eNB
->
ndlsch_
RAR
!=
NULL
&&
rel13
->
rnti
==
eNB
->
ndlsch_RAR
->
rnti
)
//rnti for the RAR should have been set priviously by the DCI
{
eNB
->
ndlsch_
ra
->
harq_process
->
pdu
=
sdu
;
eNB
->
ndlsch_
ra
->
npdsch_start_symbol
=
rel13
->
start_symbol
;
eNB
->
ndlsch_
ra
->
active
=
1
;
eNB
->
ndlsch_
RAR
->
harq_process
->
pdu
=
sdu
;
eNB
->
ndlsch_
RAR
->
npdsch_start_symbol
=
rel13
->
start_symbol
;
eNB
->
ndlsch_
RAR
->
active
=
1
;
}
else
{
//this for ue data
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
c7d050c1
...
...
@@ -541,7 +541,7 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
fclose(fich);
exit(0);
}*/
NB_IoT_eNB_NULSCH_t
**
ulsch_NB_IoT
=
&
eNB
->
ulsch_NB_IoT
;
//[0][0];
NB_IoT_eNB_NULSCH_t
**
ulsch_NB_IoT
=
&
eNB
->
ulsch_NB_IoT
[
0
]
;
//[0][0];
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////// Decoding ACK ////////////////////////////////
...
...
@@ -647,7 +647,7 @@ if(proc->flag_msg4 == 1 && proc->counter_msg4 > 0)
if
(
frame
==
proc
->
frame_msg4
&&
subframe
==
proc
->
subframe_msg4
)
{
NB_IoT_DL_eNB_
RAR_t
*
rar
=
&
eNB
->
ndlsch_rar
.
content_rar
;
NB_IoT_DL_eNB_
HARQ_t
*
rar
=
eNB
->
ndlsch_RAR
->
harq_process
;
//uint8_t tab_rar[15];
//uint8_t tab_rar[18];
uint8_t
tab_rar
[
7
];
...
...
@@ -711,7 +711,7 @@ if(proc->flag_msg4 == 1 && proc->counter_msg4 > 0)
if
(
proc
->
flag_scrambling
==
0
)
{
dlsch_encoding_
rar_
NB_IoT
(
tab_rar
,
dlsch_encoding_NB_IoT
(
tab_rar
,
rar
,
1
,
///// number_of_subframes_required
236
,
...
...
@@ -740,7 +740,7 @@ if(proc->flag_msg4 == 1 && proc->counter_msg4 > 0)
22,
2);
} else {*/
dlsch_modulation_
rar_
NB_IoT
(
txdataF
,
dlsch_modulation_NB_IoT
(
txdataF
,
AMP
,
fp
,
3
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
...
...
@@ -748,8 +748,7 @@ if(proc->flag_msg4 == 1 && proc->counter_msg4 > 0)
236
,
// number of bits per subframe
frame
,
// unrequired
subframe
,
22
,
0
);
22
);
// }
proc
->
counter_msg4
--
;
...
...
@@ -1229,7 +1228,7 @@ if(subframe !=5 && subframe !=0)
{
if
(
proc
->
rar_to_transmit
==
1
&&
proc
->
remaining_rar
>
0
)
{
NB_IoT_DL_eNB_
RAR_t
*
rar
=
&
eNB
->
ndlsch_rar
.
content_rar
;
NB_IoT_DL_eNB_
HARQ_t
*
rar
=
&
eNB
->
ndlsch_RAR
->
harq_process
;
uint8_t
tab_rar
[
7
];
// printf("xxxxx index verif %d XXXXXX",RA_template[0].preamble_index);
tab_rar
[
0
]
=
64
+
RA_template
[
0
].
preamble_index
;
...
...
@@ -1262,7 +1261,7 @@ if(subframe !=5 && subframe !=0)
if
(
proc
->
flag_scrambling
==
0
)
{
dlsch_encoding_
rar_
NB_IoT
(
tab_rar
,
dlsch_encoding_NB_IoT
(
tab_rar
,
rar
,
8
,
///// number_of_subframes_required
236
,
...
...
@@ -1278,7 +1277,7 @@ if(subframe !=5 && subframe !=0)
}
proc
->
flag_scrambling
=
1
;
printf
(
"
\n
RAR sentttttt frame %d, subframe %d"
,
frame
,
subframe
);
dlsch_modulation_
rar_
NB_IoT
(
txdataF
,
dlsch_modulation_NB_IoT
(
txdataF
,
AMP
,
fp
,
3
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
...
...
@@ -1286,8 +1285,7 @@ if(subframe !=5 && subframe !=0)
236
,
// number of bits per subframe
frame
,
// unrequired
subframe
,
22
,
0
);
22
);
proc
->
remaining_rar
--
;
proc
->
next_subframe_tx
=
subframe
+
2
;
...
...
@@ -1311,7 +1309,7 @@ if(subframe !=5 && subframe !=0)
if
(
proc
->
flag_scrambling
==
0
)
{
dlsch_encoding_
rar_
NB_IoT
(
tab_rar
,
dlsch_encoding_NB_IoT
(
tab_rar
,
rar
,
8
,
///// number_of_subframes_required
236
,
...
...
@@ -1328,7 +1326,7 @@ if(subframe !=5 && subframe !=0)
proc
->
flag_scrambling
=
1
;
printf
(
"
\n
RAR sentttttt frame %d, subframe %d"
,
frame
,
subframe
);
dlsch_modulation_
rar_
NB_IoT
(
txdataF
,
dlsch_modulation_NB_IoT
(
txdataF
,
AMP
,
fp
,
3
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
...
...
@@ -1336,8 +1334,7 @@ if(subframe !=5 && subframe !=0)
236
,
// number of bits per subframe
frame
,
// unrequired
subframe
,
22
,
0
);
22
);
proc
->
remaining_rar
--
;
proc
->
next_subframe_tx
=
subframe
+
1
;
...
...
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
View file @
c7d050c1
...
...
@@ -223,9 +223,9 @@ 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_eNB_NPBCH_t
*
broadcast_str
=
&
eNB
->
npbch
;
//NB_IoT_eNB_NDLSCH_t *sib1 = &eNB->ndlsch_SIB;
NB_IoT_eNB_NDLSCH_t
*
ndlsch
=
&
eNB
->
ndlsch_SIB
;
NB_IoT_DL_eNB_SIB_t
*
sib1
=
&
ndlsch
->
content_sib1
;
NB_IoT_DL_eNB_SIB_t
*
sib23
=
&
ndlsch
->
content_sib23
;
//NB_IoT_eNB_NDLSCH_t *ndlsch = &eNB->ndlsch_SIB1
;
NB_IoT_DL_eNB_HARQ_t
*
sib1
=
eNB
->
ndlsch_SIB1
->
harq_process
;
NB_IoT_DL_eNB_HARQ_t
*
sib23
=
eNB
->
ndlsch_SIB23
->
harq_process
;
int
**
txdataF
=
eNB
->
common_vars
.
txdataF
[
0
];
int
subframe
=
proc
->
subframe_tx
;
...
...
@@ -236,7 +236,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
uint32_t
hyper_frame
=
proc
->
HFN
;
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
/*
rrc_eNB_carrier_data_NB_IoT_t *carrier = &eNB_rrc_inst_NB_IoT->carrier[0];
if(frame%64==0 && subframe ==0)
...
...
@@ -252,7 +252,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
do_SIB1_NB_IoT_x(0,0,carrier,208,92,1,3584,28,2,hyper_frame);
}
*/
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
//uint8_t *control_region_size = get_NB_IoT_SIB1_eutracontrolregionsize();
//int G=0;
...
...
@@ -316,6 +316,11 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
///////////////////////////////////////////////////////// SIB1 ////////////////////////////////////
// we need two parameter, NB-IoT cell_id and scheduling info for sib1 (can be found in the MIB)
// using scheduling_info parameter we can get the TBS size.
// cell_id help to find the start subframe for sib1.
// MAC_TBStable_NB_IoT_SIB1 to be used to get TBS value.
//
if
((
subframe
==
4
)
&&
(
frame
%
2
==
0
)
&&
(
frame
%
32
<
16
)
)
////if((subframe != 0) && (subframe != 4) && (subframe != 9) )
{
LOG_I
(
PHY
,
"SIB1 NB-IoT content:
\n
"
);
...
...
@@ -329,7 +334,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
dlsch_encoding_NB_IoT
(
sib1_pdu
,
sib1
,
8
,
///// number_of_subframes_required
236
,
get_G_NB_IoT
(
fp
)
,
1
);
//////////// G*2
...
...
openair2/LAYER2/MAC/output_handler_NB_IoT.c
View file @
c7d050c1
...
...
@@ -18,8 +18,6 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
uint8_t
MIB_size
=
0
;
uint8_t
SIB1_size
=
0
,
i
=
0
;
rrc_eNB_carrier_data_NB_IoT_t
*
carrier
=
&
eNB_rrc_inst_NB_IoT
->
carrier
[
0
];
uint8_t
*
MIB_pdu
=
get_NB_IoT_MIB
(
carrier
,
1
,
subframe
,
frame
,
hypersfn
);
uint8_t
*
SIB1_pdu
=
get_NB_IoT_SIB1
(
0
,
0
,
carrier
,
208
,
92
,
1
,
3584
,
28
,
2
,
subframe
,
frame
,
hypersfn
);
Sched_Rsp_NB_IoT_t
*
SCHED_info
=
&
mac_inst
->
Sched_INFO
;
...
...
@@ -30,7 +28,6 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
int
DL_empty
=
0
,
UL_empty
=
0
;
int
flag_malloc
=
0
;
// filled common part of schedule_resoponse
SCHED_info
->
module_id
=
module_id
;
SCHED_info
->
hypersfn
=
hypersfn
;
...
...
@@ -69,6 +66,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
// process downlink data transmission, there will only be single DL_REQ in one subframe (e.g. 1ms), check common signal first
if
(
subframe
==
0
/*MIB_flag == 1*/
)
// TODO back to MIB_flag
{
uint8_t
*
MIB_pdu
=
get_NB_IoT_MIB
(
carrier
,
1
,
subframe
,
frame
,
hypersfn
);
//LOG_D(MAC,"[%d]MIB\n",current_time);
//MIB_size = mac_rrc_data_req_eNB_NB_IoT(*MIB);
//SCHED_info->DL_req = (nfapi_dl_config_request_t*) malloc (sizeof(nfapi_dl_config_request_t));
...
...
@@ -98,6 +96,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
}
else
if
((
subframe
==
4
)
&&
(
frame
%
2
==
0
)
&&
(
frame
%
32
<
16
)
/*SIB1_flag == 1*/
)
// TODO back to SIB1_flag
{
uint8_t
*
SIB1_pdu
=
get_NB_IoT_SIB1
(
0
,
0
,
carrier
,
208
,
92
,
1
,
3584
,
28
,
2
,
subframe
,
frame
,
hypersfn
);
//SIB1_size = mac_rrc_data_req_eNB_NB_IoT(*SIB1);
//SCHED_info->DL_req = (nfapi_dl_config_request_t*) malloc (sizeof(nfapi_dl_config_request_t));
//SCHED_info->DL_req->dl_config_request_body.number_pdu = 0;
...
...
openair2/LAYER2/MAC/vars_NB_IoT.h
View file @
c7d050c1
...
...
@@ -126,7 +126,7 @@ const uint32_t MAC_TBStable_NB_IoT[14][8] ={ //[ITBS][ISF]
//TBS table for the case containing S1B1-NB_IoT, Table 16.4.1.5.2-1 in TS 36.213 v14.2 (Itbs = 12 ~ 15 is reserved field
//mapping ITBS to SIB1-NB_IoT
const
unsigned
int
MAC_TBStable_NB_IoT_SIB1
[
16
]
=
{
208
,
208
,
208
,
328
,
328
,
328
,
440
,
440
,
440
,
680
,
680
,
680
};
const
unsigned
int
MAC_TBStable_NB_IoT_SIB1
[
16
]
=
{
208
,
208
,
208
,
328
,
328
,
328
,
440
,
440
,
440
,
680
,
680
,
680
,
0
,
0
,
0
,
0
};
const
int
DV_table
[
16
]
=
{
0
,
10
,
14
,
19
,
26
,
36
,
49
,
67
,
91
,
125
,
171
,
234
,
321
,
768
,
1500
,
1500
};
...
...
openair2/RRC/LITE/proto_NB_IoT.h
View file @
c7d050c1
...
...
@@ -44,7 +44,7 @@ uint8_t *get_NB_IoT_MIB(
uint32_t
frame
,
uint32_t
hyper_frame
);
uint8_t
*
get_NB_IoT_MIB_size
(
void
);
uint8_t
get_NB_IoT_MIB_size
(
void
);
uint8_t
*
get_NB_IoT_SIB1
(
uint8_t
Mod_id
,
int
CC_id
,
rrc_eNB_carrier_data_NB_IoT_t
*
carrier
,
...
...
@@ -57,11 +57,11 @@ uint8_t *get_NB_IoT_SIB1(uint8_t Mod_id, int CC_id,
uint32_t
subframe
,
uint32_t
frame
,
uint32_t
hyper_frame
);
uint8_t
*
get_NB_IoT_SIB1_size
(
void
);
uint8_t
get_NB_IoT_SIB1_size
(
void
);
uint8_t
*
get_NB_IoT_SIB23
(
void
);
uint8_t
*
get_NB_IoT_SIB23_size
(
void
);
uint8_t
get_NB_IoT_SIB23_size
(
void
);
long
*
get_NB_IoT_SIB1_eutracontrolregionsize
(
void
);
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
c7d050c1
...
...
@@ -141,7 +141,7 @@ uint8_t *get_NB_IoT_MIB(
}
uint8_t
*
get_NB_IoT_MIB_size
(
void
)
uint8_t
get_NB_IoT_MIB_size
(
void
)
{
// CC_ID=0
return
eNB_rrc_inst_NB_IoT
->
carrier
[
0
].
sizeof_MIB_NB_IoT
;
...
...
@@ -171,7 +171,7 @@ uint8_t *get_NB_IoT_SIB1(uint8_t Mod_id, int CC_id,
return
eNB_rrc_inst_NB_IoT
->
carrier
[
0
].
SIB1_NB_IoT
;
}
uint8_t
*
get_NB_IoT_SIB1_size
(
void
)
uint8_t
get_NB_IoT_SIB1_size
(
void
)
{
return
eNB_rrc_inst_NB_IoT
->
carrier
[
0
].
sizeof_SIB1_NB_IoT
;
}
...
...
@@ -181,7 +181,7 @@ uint8_t *get_NB_IoT_SIB23(void)
return
eNB_rrc_inst_NB_IoT
->
carrier
[
0
].
SIB23_NB_IoT
;
}
uint8_t
*
get_NB_IoT_SIB23_size
(
void
)
uint8_t
get_NB_IoT_SIB23_size
(
void
)
{
return
eNB_rrc_inst_NB_IoT
->
carrier
[
0
].
sizeof_SIB23_NB_IoT
;
}
...
...
targets/RT/USER/lte-softmodem.c
View file @
c7d050c1
...
...
@@ -1173,9 +1173,12 @@ static void get_options (int argc, char **argv) {
frame_parms
[
CC_id
]
->
mode1_flag
=
(
frame_parms
[
CC_id
]
->
nb_antenna_ports_eNB
==
1
)
?
1
:
0
;
frame_parms
[
CC_id
]
->
threequarter_fs
=
threequarter_fs
;
frame_parms_NB_IoT
[
CC_id
]
->
threequarter_fs
=
threequarter_fs
;
frame_parms
[
CC_id
]
->
nb_antennas_tx_NB_IoT
=
enb_properties
->
properties
[
i
]
->
nb_antennas_tx
[
CC_id
];
frame_parms
[
CC_id
]
->
control_region_size
=
3
;
//} // j
}
...
...
@@ -1298,6 +1301,9 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
frame_parms
[
CC_id
]
->
prach_config_common
.
prach_ConfigInfo
.
highSpeedFlag
=
0
;
frame_parms
[
CC_id
]
->
prach_config_common
.
prach_ConfigInfo
.
prach_FreqOffset
=
0
;
frame_parms
[
CC_id
]
->
nb_antennas_tx_NB_IoT
=
enb_properties
->
properties
[
i
]
->
nb_antennas_tx
[
CC_id
];
frame_parms
[
CC_id
]
->
control_region_size
=
3
;
downlink_frequency
[
CC_id
][
0
]
=
2680000000
;
// Use float to avoid issue with frequency over 2^31.
downlink_frequency
[
CC_id
][
1
]
=
downlink_frequency
[
CC_id
][
0
];
downlink_frequency
[
CC_id
][
2
]
=
downlink_frequency
[
CC_id
][
0
];
...
...
targets/SIMU/USER/init_lte.c
View file @
c7d050c1
...
...
@@ -54,8 +54,8 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
PHY_vars_eNB
->
frame_parms
.
Nid_cell
=
Nid_cell
;
///////((Nid_cell/3)*3)+((eNB_id+Nid_cell)%3);
PHY_vars_eNB
->
frame_parms
.
nushift
=
PHY_vars_eNB
->
frame_parms
.
Nid_cell
%
6
;
// for NB-IoT testing
PHY_vars_eNB
->
ndlsch_SIB
.
content_sib1
.
si_rnti
=
0xffff
;
PHY_vars_eNB
->
ndlsch_SIB
.
content_sib23
.
si_rnti
=
0xffff
;
//
PHY_vars_eNB->ndlsch_SIB.content_sib1.si_rnti = 0xffff;
//
PHY_vars_eNB->ndlsch_SIB.content_sib23.si_rnti = 0xffff;
////////////////////////////
phy_init_lte_eNB
(
PHY_vars_eNB
,
0
,
abstraction_flag
);
...
...
@@ -141,8 +141,14 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
LOG_D
(
PHY
,
"eNB %d : RA %p
\n
"
,
eNB_id
,
PHY_vars_eNB
->
dlsch_ra
);
PHY_vars_eNB
->
dlsch_MCH
=
new_eNB_dlsch
(
1
,
8
,
NSOFT
,
frame_parms
->
N_RB_DL
,
0
,
frame_parms
);
LOG_D
(
PHY
,
"eNB %d : MCH %p
\n
"
,
eNB_id
,
PHY_vars_eNB
->
dlsch_MCH
);
///// NB-IoT ////////////
PHY_vars_eNB
->
ndlsch_SIB1
=
new_eNB_dlsch_NB_IoT
(
1
,
frame_parms
);
// frame_parms is not used , to be removed is not used in futur
PHY_vars_eNB
->
ndlsch_SIB23
=
new_eNB_dlsch_NB_IoT
(
1
,
frame_parms
);
PHY_vars_eNB
->
ndlsch_RAR
=
new_eNB_dlsch_NB_IoT
(
1
,
frame_parms
);
PHY_vars_eNB
->
rx_total_gain_dB
=
130
;
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
...
...
@@ -176,10 +182,17 @@ PHY_VARS_eNB_NB_IoT* init_lte_eNB_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
PHY_vars_eNB
->
Mod_id
=
eNB_id
;
PHY_vars_eNB
->
cooperation_flag
=
0
;
//cooperation_flag;
memcpy
(
&
(
PHY_vars_eNB
->
frame_parms
),
frame_parms
,
sizeof
(
NB_IoT_DL_FRAME_PARMS
));
PHY_vars_eNB
->
frame_parms
.
Nid_cell
=
((
Nid_cell
/
3
)
*
3
)
+
((
eNB_id
+
Nid_cell
)
%
3
);
//PHY_vars_eNB->frame_parms.Nid_cell = ((Nid_cell/3)*3)+((eNB_id+Nid_cell)%3);
//PHY_vars_eNB->frame_parms.nushift = PHY_vars_eNB->frame_parms.Nid_cell%6;
PHY_vars_eNB
->
frame_parms
.
Nid_cell
=
Nid_cell
;
///////((Nid_cell/3)*3)+((eNB_id+Nid_cell)%3);
PHY_vars_eNB
->
frame_parms
.
nushift
=
PHY_vars_eNB
->
frame_parms
.
Nid_cell
%
6
;
phy_init_lte_eNB_NB_IoT
(
PHY_vars_eNB
,
0
,
abstraction_flag
);
// for NB-IoT testing
// PHY_vars_eNB->ndlsch_SIB.content_sib1.si_rnti = 0xffff;
// PHY_vars_eNB->ndlsch_SIB.content_sib23.si_rnti = 0xffff;
////////////////////////////
/*LOG_I(PHY,"init eNB: Node Function %d\n",node_function);
LOG_I(PHY,"init eNB: Nid_cell %d\n", frame_parms->Nid_cell);
LOG_I(PHY,"init eNB: frame_type %d,tdd_config %d\n", frame_parms->frame_type,frame_parms->tdd_config);
...
...
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