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
e7f6906b
Commit
e7f6906b
authored
Feb 26, 2019
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrambling update for release 13.5.0
parent
efa4401e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
110 deletions
+151
-110
openair1/PHY/LTE_TRANSPORT/SIB_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/SIB_NB_IoT.c
+49
-40
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
+9
-5
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
+62
-46
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+14
-8
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+17
-11
No files found.
openair1/PHY/LTE_TRANSPORT/SIB_NB_IoT.c
View file @
e7f6906b
...
@@ -47,7 +47,8 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
...
@@ -47,7 +47,8 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
uint32_t
frame
,
uint32_t
frame
,
uint32_t
subframe
,
uint32_t
subframe
,
int
RB_IoT_ID
,
int
RB_IoT_ID
,
uint8_t
operation_mode
)
uint8_t
operation_mode
,
uint8_t
release_v13_5_0
)
{
{
int
done
=
0
;
int
done
=
0
;
uint8_t
*
sib1_pdu
=
sib1_struct
->
harq_process
->
pdu
;
uint8_t
*
sib1_pdu
=
sib1_struct
->
harq_process
->
pdu
;
...
@@ -97,7 +98,7 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
...
@@ -97,7 +98,7 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
if
((
subframe
==
4
)
&&
(
frame
%
2
==
var
)
&&
(
born_inf
<=
frame
%
rep_val
)
&&
(
frame
%
rep_val
<
born_sup
))
if
((
subframe
==
4
)
&&
(
frame
%
2
==
var
)
&&
(
born_inf
<=
frame
%
rep_val
)
&&
(
frame
%
rep_val
<
born_sup
))
{
{
LOG_D
(
PHY
,
"[%3d][%2d] Generating SIB1
\n
"
,
frame
,
subframe
);
LOG_D
(
PHY
,
"[%3d][%2d] Generating SIB1
\n
"
,
frame
,
subframe
);
int
G
=
get_G_SIB1_NB_IoT
(
frame_parms
,
operation_mode
);
int
G
=
get_G_SIB1_NB_IoT
(
frame_parms
,
operation_mode
);
if
(
frame
%
rep_val
==
var
)
if
(
frame
%
rep_val
==
var
)
{
{
...
@@ -111,7 +112,9 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
...
@@ -111,7 +112,9 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
8
*
G
,
8
*
G
,
frame
,
frame
,
subframe
*
2
,
subframe
*
2
,
sib1_struct
->
rnti
);
sib1_struct
->
rnti
,
release_v13_5_0
,
1
);
}
}
dlsch_modulation_NB_IoT
(
txdataF
,
dlsch_modulation_NB_IoT
(
txdataF
,
...
@@ -137,13 +140,14 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
...
@@ -137,13 +140,14 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
int
generate_SIB23
(
NB_IoT_eNB_NDLSCH_t
*
SIB23
,
int
generate_SIB23
(
NB_IoT_eNB_NDLSCH_t
*
SIB23
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
int16_t
amp
,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint32_t
frame
,
uint32_t
subframe
,
uint32_t
subframe
,
int
RB_IoT_ID
)
int
RB_IoT_ID
,
uint8_t
release_v13_5_0
)
{
{
int
done
=
0
;
int
done
=
0
;
...
@@ -152,8 +156,8 @@ int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
...
@@ -152,8 +156,8 @@ int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
//LOG_I(PHY,"[Frame: %d][Subframe: %d]sent SIB23\n",frame,subframe);
//LOG_I(PHY,"[Frame: %d][Subframe: %d]sent SIB23\n",frame,subframe);
uint8_t
*
SIB23_pdu
=
SIB23
->
harq_process
->
pdu
;
uint8_t
*
SIB23_pdu
=
SIB23
->
harq_process
->
pdu
;
uint32_t
rep
=
SIB23
->
resource_assignment
;
uint32_t
rep
=
SIB23
->
resource_assignment
;
uint8_t
eutra_control_region
=
3
;
uint8_t
eutra_control_region
=
3
;
uint32_t
counter_rep
=
SIB23
->
counter_repetition_number
;
uint32_t
counter_rep
=
SIB23
->
counter_repetition_number
;
uint32_t
pointer_to_sf
=
SIB23
->
pointer_to_subframe
;
/// to identify wich encoded subframe to transmit
uint32_t
pointer_to_sf
=
SIB23
->
pointer_to_subframe
;
/// to identify wich encoded subframe to transmit
...
@@ -173,7 +177,9 @@ int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
...
@@ -173,7 +177,9 @@ int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
Nsf
*
G
,
Nsf
*
G
,
frame
,
frame
,
subframe
*
2
,
subframe
*
2
,
SIB23
->
rnti
);
SIB23
->
rnti
,
release_v13_5_0
,
1
);
}
}
dlsch_modulation_NB_IoT
(
txdataF
,
dlsch_modulation_NB_IoT
(
txdataF
,
...
@@ -208,30 +214,29 @@ int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
...
@@ -208,30 +214,29 @@ int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
int
generate_NDLSCH_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
int
generate_NDLSCH_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
NB_IoT_eNB_NDLSCH_t
*
RAR
,
NB_IoT_eNB_NDLSCH_t
*
RAR
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
int16_t
amp
,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint32_t
frame
,
uint32_t
subframe
,
uint32_t
subframe
,
int
RB_IoT_ID
)
int
RB_IoT_ID
,
uint8_t
release_v13_5_0
)
{
{
int
done
=
0
;
int
done
=
0
;
if
(
RAR
->
active
==
1
)
if
(
RAR
->
active
==
1
)
{
{
uint8_t
*
RAR_pdu
=
RAR
->
harq_process
->
pdu
;
uint8_t
*
RAR_pdu
=
RAR
->
harq_process
->
pdu
;
// TODO: process the RAR PDU to get the subcarrier indication for NPUSCH , Then set value in NPUSCH
if
(
RAR
->
active_msg2
==
1
&&
RAR_pdu
!=
NULL
)
if
(
RAR
->
active_msg2
==
1
&&
RAR_pdu
!=
NULL
)
{
{
//printf("RAR PDU = %p\n",RAR_pdu);
uint8_t
one_byte
=
RAR_pdu
[
2
]
>>
3
;
uint8_t
one_byte
=
RAR_pdu
[
2
]
>>
3
;
uint8_t
subcarrier_spacing
=
one_byte
&
0x01
;
uint8_t
subcarrier_spacing
=
one_byte
&
0x01
;
eNB
->
ulsch_NB_IoT
[
0
]
->
harq_process
->
subcarrier_spacing
=
subcarrier_spacing
;
eNB
->
ulsch_NB_IoT
[
0
]
->
harq_process
->
subcarrier_spacing
=
subcarrier_spacing
;
}
}
// make different between RAR data and NPDSCH data // add a flag in NPDSCH to switch between RA and normal data transmission
// to be added at the end of NPDSCH process
uint32_t
rep
=
RAR
->
repetition_number
;
// make different between RAR data and NPDSCH data // add a flag in NPDSCH to switch between RA and normal data transmission
uint8_t
eutra_control_region
=
3
;
uint32_t
rep
=
RAR
->
repetition_number
;
uint8_t
eutra_control_region
=
3
;
uint32_t
counter_rep
=
RAR
->
counter_repetition_number
;
uint32_t
counter_rep
=
RAR
->
counter_repetition_number
;
uint32_t
counter_sf_rep
=
RAR
->
counter_current_sf_repetition
;
/// for identifiying when to trigger new scrambling
uint32_t
counter_sf_rep
=
RAR
->
counter_current_sf_repetition
;
/// for identifiying when to trigger new scrambling
...
@@ -242,8 +247,8 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
...
@@ -242,8 +247,8 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
//LOG_I(PHY,"[Frame: %d][Subframe: %d]sent RAR, rep : %d, counter_rep:%d, Num_res:%d\n",frame,subframe,rep,counter_rep,Nsf);
//LOG_I(PHY,"[Frame: %d][Subframe: %d]sent RAR, rep : %d, counter_rep:%d, Num_res:%d\n",frame,subframe,rep,counter_rep,Nsf);
if
(
(
counter_rep
==
rep
)
&&
(
counter_sf_rep
==
0
)
&&
(
pointer_to_sf
==
0
)
)
if
(
(
counter_rep
==
rep
)
&&
(
counter_sf_rep
==
0
)
&&
(
pointer_to_sf
==
0
)
)
{
{
dlsch_encoding_NB_IoT
(
RAR_pdu
,
dlsch_encoding_NB_IoT
(
RAR_pdu
,
RAR
,
RAR
,
...
@@ -255,18 +260,22 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
...
@@ -255,18 +260,22 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
Nsf
*
G
,
Nsf
*
G
,
frame
,
frame
,
subframe
*
2
,
subframe
*
2
,
RAR
->
rnti
);
RAR
->
rnti
,
}
release_v13_5_0
,
0
);
if
(
(
counter_rep
!=
rep
)
&&
(
counter_sf_rep
==
0
)
&&
(
pointer_to_sf
==
0
)
)
}
{
dlsch_scrambling_Gen_NB_IoT
(
frame_parms
,
if
(
(
counter_rep
!=
rep
)
&&
(
counter_sf_rep
==
0
)
&&
(
pointer_to_sf
==
0
)
)
{
dlsch_scrambling_Gen_NB_IoT
(
frame_parms
,
RAR
,
RAR
,
Nsf
*
G
,
Nsf
*
G
,
frame
,
frame
,
subframe
*
2
,
subframe
*
2
,
RAR
->
rnti
);
RAR
->
rnti
,
}
release_v13_5_0
,
0
);
}
if
(
rep
>
4
)
if
(
rep
>
4
)
{
{
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
View file @
e7f6906b
...
@@ -53,16 +53,20 @@ void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -53,16 +53,20 @@ void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
int
tot_bits
,
// total number of bits to transmit
int
tot_bits
,
// total number of bits to transmit
uint16_t
Nf
,
// Nf is the frame number (0..9)
uint16_t
Nf
,
// Nf is the frame number (0..9)
uint8_t
Ns
,
uint8_t
Ns
,
uint32_t
rnti
)
uint32_t
rnti
,
uint8_t
release_v13_5_0
,
uint8_t
SIB
)
{
{
int
i
,
j
,
k
=
0
;
int
i
,
j
,
k
=
0
;
uint32_t
x1
,
x2
,
s
=
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;
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 ) ;
if
(
release_v13_5_0
==
1
&&
SIB
==
1
)
/// for SIBs from release 13.5.0 and above
x2
=
(
rnti
<<
14
)
+
((
Nf
%
2
)
<<
13
)
+
((
Ns
>>
1
)
<<
9
)
+
frame_parms
->
Nid_cell
;
{
// for NPDSCH not carriying SIBs
x2
=
(
rnti
<<
15
)
+
(
frame_parms
->
Nid_cell
+
1
)
*
(
(
Nf
%
61
)
+
1
)
;
//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
}
else
{
x2
=
(
rnti
<<
14
)
+
((
Nf
%
2
)
<<
13
)
+
((
Ns
>>
1
)
<<
9
)
+
frame_parms
->
Nid_cell
;
}
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
1
);
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
1
);
...
...
openair1/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
View file @
e7f6906b
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
/*! \file PHY/LTE_TRANSPORT/npbch_NB_IoT.c
/*! \file PHY/LTE_TRANSPORT/npbch_NB_IoT.c
* \Fucntions for the generation of broadcast channel (NPBCH) for NB_IoT, TS 36-212, V13.4.0 2017-02
* \Fucntions for the generation of broadcast channel (NPBCH) for NB_IoT, TS 36-212, V13.4.0 2017-02
* \author M. KANJ
* \author M. KANJ
, V. Savaux
* \date 2017
* \date 2017
* \version 0.0
* \version 0.0
* \company bcom
* \company bcom
* \email: matthieu.kanj@b-com.com
* \email: matthieu.kanj@b-com.com
, vincent.savaux@b-com.com
* \note
* \note
* \warning
* \warning
*/
*/
...
@@ -53,18 +53,19 @@
...
@@ -53,18 +53,19 @@
#define NPBCH_A 34 // 34 for NB-IoT and 24 for LTE
#define NPBCH_A 34 // 34 for NB-IoT and 24 for LTE
/*
int scrambling_npbch_REs_rel_14(LTE_DL_FRAME_PARMS *frame_parms,
int
scrambling_npbch_REs_rel_13_5_0
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int32_t **txdataF,
int32_t
**
txdataF
,
uint32_t *jj,
uint32_t
*
jj
,
int l,
int
l
,
uint32_t symbol_offset,
uint32_t
symbol_offset
,
uint8_t pilots,
uint8_t
pilots
,
unsigned short id_offset,
unsigned
short
id_offset
,
uint8_t *reset,
uint8_t
*
reset
,
uint32_t *x1,
uint32_t
*
x1
,
uint32_t *x2,
uint32_t
*
x2
,
uint32_t *s)
uint32_t
*
s
,
uint8_t
*
flag_32
)
{
{
uint32_t
tti_offset
,
aa
;
uint32_t
tti_offset
,
aa
;
uint8_t
re
;
uint8_t
re
;
...
@@ -72,22 +73,23 @@ int scrambling_npbch_REs_rel_14(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -72,22 +73,23 @@ int scrambling_npbch_REs_rel_14(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t
c_even
,
c_odd
;
uint8_t
c_even
,
c_odd
;
int16_t
theta_re
,
theta_im
;
int16_t
theta_re
,
theta_im
;
int16_t
data_re
[
frame_parms
->
nb_antennas_tx
],
data_im
[
frame_parms
->
nb_antennas_tx
];
int16_t
data_re
[
frame_parms
->
nb_antennas_tx
],
data_im
[
frame_parms
->
nb_antennas_tx
];
uint32_t
mem_jj
;
first_re
=
0
;
first_re
=
0
;
last_re
=
12
;
last_re
=
12
;
for
(
re
=
first_re
;
re
<
last_re
;
re
++
)
{
// re varies between 0 and 12 sub-carriers
for
(
re
=
first_re
;
re
<
last_re
;
re
++
)
{
// re varies between 0 and 12 sub-carriers
if ((
(l-3)*12+re)%16
== 0){
if
((
*
jj
)
%
32
==
0
&&
*
flag_32
==
0
){
*
s
=
lte_gold_generic_NB_IoT
(
x1
,
x2
,
*
reset
);
*
s
=
lte_gold_generic_NB_IoT
(
x1
,
x2
,
*
reset
);
*
reset
=
0
;
*
reset
=
0
;
*jj = 0
;
mem_jj
=
*
jj
;
}
}
c_even
=
(
*
s
>>*
jj
)
&
1
;
c_even
=
(
*
s
>>*
jj
)
&
1
;
c_odd
=
(
*
s
>>
(
*
jj
+
1
))
&
1
;
c_odd
=
(
*
s
>>
(
*
jj
+
1
))
&
1
;
if
(
c_even
==
c_odd
){
if
(
c_even
==
c_odd
){
if
(
c_even
){
if
(
c_even
){
theta_re
=
0
;
theta_re
=
0
;
theta_im = -3276
8
;
theta_im
=
-
3276
7
;
}
else
{
}
else
{
theta_re
=
32767
;
theta_re
=
32767
;
theta_im
=
0
;
theta_im
=
0
;
...
@@ -97,7 +99,7 @@ int scrambling_npbch_REs_rel_14(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -97,7 +99,7 @@ int scrambling_npbch_REs_rel_14(LTE_DL_FRAME_PARMS *frame_parms,
theta_re
=
0
;
theta_re
=
0
;
theta_im
=
32767
;
theta_im
=
32767
;
}
else
{
}
else
{
theta_re = -3276
8
;
theta_re
=
-
3276
7
;
theta_im
=
0
;
theta_im
=
0
;
}
}
}
}
...
@@ -117,14 +119,21 @@ int scrambling_npbch_REs_rel_14(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -117,14 +119,21 @@ int scrambling_npbch_REs_rel_14(LTE_DL_FRAME_PARMS *frame_parms,
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
=
(
int16_t
)
(((
int32_t
)
data_im
[
aa
]
*
(
int32_t
)
theta_re
+
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
=
(
int16_t
)
(((
int32_t
)
data_im
[
aa
]
*
(
int32_t
)
theta_re
+
(
int32_t
)
data_re
[
aa
]
*
(
int32_t
)
theta_im
)
>>
15
);
//Q //b_{i+1}
(
int32_t
)
data_re
[
aa
]
*
(
int32_t
)
theta_im
)
>>
15
);
//Q //b_{i+1}
}
}
*
jj
=
*
jj
+
2
;
*
jj
=
*
jj
+
2
;
}
}
if
(
mem_jj
==
*
jj
)
// avoid to shift lte_gold_generic_NB_IoT 2 times
{
*
flag_32
=
1
;
}
else
{
*
flag_32
=
0
;
}
}
}
return
(
0
);
return
(
0
);
}
}
*/
int
allocate_npbch_REs_in_RB
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int
allocate_npbch_REs_in_RB
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
...
@@ -217,7 +226,8 @@ int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch,
...
@@ -217,7 +226,8 @@ int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch,
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_pdu
,
uint8_t
*
npbch_pdu
,
uint8_t
frame_mod64
,
uint8_t
frame_mod64
,
unsigned
short
NB_IoT_RB_ID
)
unsigned
short
NB_IoT_RB_ID
,
uint8_t
release_v13_5_0
)
{
{
int
i
,
l
;
int
i
,
l
;
int
id_offset
;
int
id_offset
;
...
@@ -231,19 +241,14 @@ int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch,
...
@@ -231,19 +241,14 @@ int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch,
uint32_t
re_allocated
=
0
;
uint32_t
re_allocated
=
0
;
uint32_t
symbol_offset
;
uint32_t
symbol_offset
;
uint16_t
amask
=
0
;
uint16_t
amask
=
0
;
///////////////////////////// for release 13.5.0 and above ////////////////////////
//uint32_t ii=0;
//uint8_t reset=1,flag_32=0;
//uint32_t x1_v13_5_0, x2_v13_5_0, s_v13_5_0 =0;
//////////////////////////////////////////////////////////////////////////////////
frame_parms
->
flag_free_sf
=
1
;
frame_parms
->
flag_free_sf
=
1
;
/*
uint32_t ii=0;
uint8_t reset=1;
uint32_t x1_r14, x2_r14, s_r14=0;
x2_r14 = ((frame_parms->Nid_cell+1) * (frame_mod64%8 + 1)
* (frame_mod64%8 + 1) * (frame_mod64%8 + 1) <<9)
+ frame_parms->Nid_cell; // specific to Rel 14
*/
npbch_D
=
16
+
NPBCH_A
;
npbch_D
=
16
+
NPBCH_A
;
npbch_E
=
1600
;
npbch_E
=
1600
;
...
@@ -313,19 +318,30 @@ int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch,
...
@@ -313,19 +318,30 @@ int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch,
amp
,
amp
,
id_offset
,
id_offset
,
&
re_allocated
);
&
re_allocated
);
/*
scrambling_npbch_REs_rel_14(frame_parms,
if
(
release_v13_5_0
==
1
)
txdataF,
{
&ii,
uint32_t
ii
=
0
;
l,
uint8_t
reset
=
1
,
flag_32
=
0
;
symbol_offset,
uint32_t
x1_v13_5_0
,
x2_v13_5_0
,
s_v13_5_0
=
0
;
pilots,
id_offset,
x2_v13_5_0
=
(((
frame_parms
->
Nid_cell
+
1
)
*
(
frame_mod64
%
8
+
1
)
*
(
frame_mod64
%
8
+
1
)
*
(
frame_mod64
%
8
+
1
))
<<
9
)
+
frame_parms
->
Nid_cell
;
&reset,
&x1_r14,
scrambling_npbch_REs_rel_13_5_0
(
frame_parms
,
&x2_r14,
txdataF
,
&s_r14);
&
ii
,
*/
l
,
symbol_offset
,
pilots
,
id_offset
,
&
reset
,
&
x1_v13_5_0
,
&
x2_v13_5_0
,
&
s_v13_5_0
,
&
flag_32
);
}
}
}
return
(
0
);
return
(
0
);
}
}
...
...
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
View file @
e7f6906b
...
@@ -107,14 +107,15 @@ int allocate_REs_in_RB_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -107,14 +107,15 @@ int allocate_REs_in_RB_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t
pilot_shift
,
uint8_t
pilot_shift
,
uint32_t
*
re_allocated
);
uint32_t
*
re_allocated
);
int
generate_NDLSCH_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
int
generate_NDLSCH_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
NB_IoT_eNB_NDLSCH_t
*
RAR
,
NB_IoT_eNB_NDLSCH_t
*
RAR
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
int16_t
amp
,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint32_t
frame
,
uint32_t
subframe
,
uint32_t
subframe
,
int
RB_IoT_ID
);
int
RB_IoT_ID
,
uint8_t
release_v13_5_0
);
int
generate_NPDCCH_NB_IoT
(
NB_IoT_eNB_NPDCCH_t
*
DCI
,
int
generate_NPDCCH_NB_IoT
(
NB_IoT_eNB_NPDCCH_t
*
DCI
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
...
@@ -130,7 +131,8 @@ int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
...
@@ -130,7 +131,8 @@ int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint32_t
frame
,
uint32_t
subframe
,
uint32_t
subframe
,
int
RB_IoT_ID
);
int
RB_IoT_ID
,
uint8_t
release_v13_5_0
);
int
generate_SIB1
(
NB_IoT_eNB_NDLSCH_t
*
sib1_struct
,
int
generate_SIB1
(
NB_IoT_eNB_NDLSCH_t
*
sib1_struct
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
...
@@ -139,15 +141,17 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
...
@@ -139,15 +141,17 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
uint32_t
frame
,
uint32_t
frame
,
uint32_t
subframe
,
uint32_t
subframe
,
int
RB_IoT_ID
,
int
RB_IoT_ID
,
uint8_t
operation_mode
);
uint8_t
operation_mode
,
uint8_t
release_v13_5_0
);
int
generate_npbch
(
NB_IoT_eNB_NPBCH_t
*
eNB_npbch
,
int
generate_npbch
(
NB_IoT_eNB_NPBCH_t
*
eNB_npbch
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
int
amp
,
int
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
npbch_pdu
,
uint8_t
*
npbch_pdu
,
uint8_t
frame_mod64
,
uint8_t
frame_mod64
,
unsigned
short
NB_IoT_RB_ID
);
unsigned
short
NB_IoT_RB_ID
,
uint8_t
release_v13_5_0
);
void
npbch_scrambling
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
void
npbch_scrambling
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
...
@@ -160,7 +164,9 @@ void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -160,7 +164,9 @@ void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
int
tot_bits
,
// total number of bits to transmit
int
tot_bits
,
// total number of bits to transmit
uint16_t
Nf
,
// Nf is the frame number (0..9)
uint16_t
Nf
,
// Nf is the frame number (0..9)
uint8_t
Ns
,
uint8_t
Ns
,
uint32_t
rnti
);
uint32_t
rnti
,
uint8_t
release_v13_5_0
,
uint8_t
SIB
);
NB_IoT_eNB_NDLSCH_t
*
new_eNB_dlsch_NB_IoT
(
uint8_t
length
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
NB_IoT_eNB_NDLSCH_t
*
new_eNB_dlsch_NB_IoT
(
uint8_t
length
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
...
...
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
View file @
e7f6906b
...
@@ -231,6 +231,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -231,6 +231,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
//uint16_t Ntti = 10; //ntti = 10
//uint16_t Ntti = 10; //ntti = 10
int
RB_IoT_ID
=
22
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
RB_IoT_ID
=
22
;
// 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
int
With_NSSS
=
0
;
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
uint8_t
release_v13_5_0
=
0
;
uint32_t
hyper_frame
=
proc
->
HFN
;
uint32_t
hyper_frame
=
proc
->
HFN
;
...
@@ -300,7 +301,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -300,7 +301,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
fp
,
fp
,
npbch_pdu
,
npbch_pdu
,
frame
%
64
,
frame
%
64
,
RB_IoT_ID
);
RB_IoT_ID
,
release_v13_5_0
);
}
}
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////// SIB1 ////////////////////////////////////
/////////////////////////////////////// SIB1 ////////////////////////////////////
...
@@ -309,13 +311,14 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -309,13 +311,14 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
if
(
subframe
==
4
)
if
(
subframe
==
4
)
{
{
sib1_state
=
generate_SIB1
(
sib1
,
sib1_state
=
generate_SIB1
(
sib1
,
txdataF
,
txdataF
,
AMP
,
AMP
,
fp
,
fp
,
frame
,
frame
,
subframe
,
subframe
,
RB_IoT_ID
,
RB_IoT_ID
,
0
);
0
,
release_v13_5_0
);
}
}
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////// SIB23 ////////////////////////////////////
///////////////////////////////////// SIB23 ////////////////////////////////////
...
@@ -328,7 +331,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -328,7 +331,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
fp
,
fp
,
frame
,
frame
,
subframe
,
subframe
,
RB_IoT_ID
);
RB_IoT_ID
,
release_v13_5_0
);
}
}
if
(
(
subframe
!=
0
)
&&
(
subframe
!=
5
)
&&
(
nsss_state
!=
1
)
&&
(
fp
->
flag_free_sf
==
0
)
)
if
(
(
subframe
!=
0
)
&&
(
subframe
!=
5
)
&&
(
nsss_state
!=
1
)
&&
(
fp
->
flag_free_sf
==
0
)
)
...
@@ -358,7 +362,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -358,7 +362,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
fp
,
fp
,
frame
,
frame
,
subframe
,
subframe
,
RB_IoT_ID
);
RB_IoT_ID
,
release_v13_5_0
);
}
else
if
(
eNB
->
ndlsch
[
0
]
!=
NULL
)
{
}
else
if
(
eNB
->
ndlsch
[
0
]
!=
NULL
)
{
generate_NDLSCH_NB_IoT
(
eNB
,
generate_NDLSCH_NB_IoT
(
eNB
,
...
@@ -368,7 +373,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -368,7 +373,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
fp
,
fp
,
frame
,
frame
,
subframe
,
subframe
,
RB_IoT_ID
);
RB_IoT_ID
,
release_v13_5_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