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
58b9481c
Commit
58b9481c
authored
Sep 07, 2018
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NPDCCH functions
parent
e901ecdf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
60 deletions
+19
-60
openair1/PHY/LTE_TRANSPORT/dci_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dci_NB_IoT.c
+14
-55
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+5
-5
No files found.
openair1/PHY/LTE_TRANSPORT/dci_NB_IoT.c
View file @
58b9481c
...
...
@@ -49,16 +49,11 @@
//#include "assertions.h"
//#include "T.h"
/////////////////////////////////////////////////////////////////////
//------------------------------------------------
// BCOM code functions npdcch start
// (TODO solve some error in compilation)
//------------------------------------------------
//static uint8_t d[2][3*(MAX_DCI_SIZE_BITS_NB_IoT + 16) + 96];
//static uint8_t w[2][3*3*(MAX_DCI_SIZE_BITS_NB_IoT+16)];
void
dci_encoding_NB_IoT
(
uint8_t
*
a
,
// Array of two DCI pdus, even if one DCI is to transmit , the number of DCI is indicated in dci_number
NB_IoT_eNB_NPDCCH_t
*
dlcch
,
////uint8_t *e[2], // *e should be e[2][G]
uint8_t
A
,
...
...
@@ -85,15 +80,15 @@ void dci_encoding_NB_IoT(uint8_t *a, // Array of tw
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///The scrambling sequence shall be initialised at the start of the search space and after every 4th NPDCCH subframes.
///
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void
npdcch_scrambling_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
e
,
// Input data
int
length
,
// Total number of bits to transmit in one subframe(case of DCI = G)
NB_IoT_eNB_NPDCCH_t
*
dlcch
,
// Input data
int
G
,
// Total number of bits to transmit in one subframe(case of DCI = G)
uint8_t
Ns
,
//XXX we pass the subframe // Slot number (0..19)
uint8_t
dci_number
,
// This variable should takes the 1 or 2 (1 for in case of one DCI, 2 in case of two DCI)
uint8_t
ncce_index
,
uint8_t
agr_level
)
// Aggregation level
{
int
i
;
...
...
@@ -103,61 +98,28 @@ void npdcch_scrambling_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
reset
=
1
;
if
(
agr_level
==
2
)
if
(
agr_level
==
2
&&
ncce_index
==
1
)
{
occupation_size
=
1
;
}
else
{
occupation_size
=
2
;
}
if
(
dci_number
==
1
)
// Case of one DCI
{
x2
=
((
Ns
>>
1
)
<<
9
)
+
frame_parms
->
Nid_cell
;
// This is c_init in 36.211 Sec 10.2.3.1
for
(
i
=
0
;
i
<
length
/
occupation_size
;
i
++
)
{
for
(
i
=
0
;
i
<
G
/
occupation_size
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
e
[
i
]
=
(
e
[
i
]
&
1
)
^
((
s
>>
(
i
&
0x1f
))
&
1
);
dlcch
->
npdcch_e
[
ncce_index
-
1
][
i
]
=
(
dlcch
->
npdcch_e
[
ncce_index
-
1
]
[
i
]
&
1
)
^
((
s
>>
(
i
&
0x1f
))
&
1
);
}
}
else
if
(
dci_number
==
2
&&
occupation_size
==
2
)
{
// Case of two DCI
// Scrambling the first DCI
//
x2
=
((
Ns
>>
1
)
<<
9
)
+
frame_parms
->
Nid_cell
;
// This is c_init in 36.211 Sec 10.2.3.1
for
(
i
=
0
;
i
<
length
/
occupation_size
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
e
[
i
]
=
(
e
[
i
]
&
1
)
^
((
s
>>
(
i
&
0x1f
))
&
1
);
}
// reset of the scrambling function
reset
=
1
;
// Scrambling the second DCI
//
x2
=
((
Ns
>>
1
)
<<
9
)
+
frame_parms
->
Nid_cell
;
//this is c_init in 36.211 Sec 10.2.3.1
for
(
i
=
0
;
i
<
length
/
occupation_size
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
e
[
i
]
=
(
e
[
i
]
&
1
)
^
((
s
>>
(
i
&
0x1f
))
&
1
);
}
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int
dci_allocate_REs_in_RB_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int32_t
**
txdataF
,
uint32_t
*
jj
,
...
...
@@ -321,10 +283,7 @@ int dci_allocate_REs_in_RB_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
return
(
0
);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int
dci_modulation_NB_IoT
(
int32_t
**
txdataF
,
...
...
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
View file @
58b9481c
...
...
@@ -290,10 +290,10 @@ void dci_encoding_NB_IoT(uint8_t *a,
void
npdcch_scrambling_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
*
e
,
int
length
,
uint8_t
Ns
,
uint8_t
dci_number
,
NB_IoT_eNB_NPDCCH_t
*
dlcch
,
// Input data
int
G
,
// Total number of bits to transmit in one subframe(case of DCI = G)
uint8_t
Ns
,
//XXX we pass the subframe // Slot number (0..19)
uint8_t
ncce_index
,
uint8_t
agr_level
);
...
...
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