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
promise
OpenXG-RAN
Commits
73db1628
Commit
73db1628
authored
Mar 08, 2019
by
Khalid Ahmed
Committed by
Thomas Schlichter
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming and moving nr_layer_mapping to a common liberary between UE and gNB
parent
f1d4d5da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
77 deletions
+83
-77
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+70
-0
openair1/PHY/MODULATION/nr_modulation.h
openair1/PHY/MODULATION/nr_modulation.h
+12
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+1
-72
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+0
-5
No files found.
openair1/PHY/MODULATION/nr_modulation.c
View file @
73db1628
...
...
@@ -49,4 +49,74 @@ void nr_modulation(uint32_t *in,
out
[
i
<<
1
]
=
nr_mod_table
[(
offset
+
idx
)
<<
1
];
out
[(
i
<<
1
)
+
1
]
=
nr_mod_table
[((
offset
+
idx
)
<<
1
)
+
1
];
}
}
void
nr_layer_mapping
(
int16_t
**
mod_symbs
,
uint8_t
n_layers
,
uint16_t
n_symbs
,
int16_t
**
tx_layers
)
{
switch
(
n_layers
)
{
case
1
:
memcpy
((
void
*
)
tx_layers
[
0
],
(
void
*
)
mod_symbs
[
0
],
(
n_symbs
<<
1
)
*
sizeof
(
int16_t
));
break
;
case
2
:
case
3
:
case
4
:
for
(
int
i
=
0
;
i
<
n_symbs
/
n_layers
;
i
++
)
for
(
int
l
=
0
;
l
<
n_layers
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
0
][(
n_layers
*
i
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
0
][((
n_layers
*
i
+
l
)
<<
1
)
+
1
];
}
break
;
case
5
:
for
(
int
i
=
0
;
i
<
n_symbs
>>
1
;
i
++
)
for
(
int
l
=
0
;
l
<
2
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
0
][((
i
<<
1
)
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
0
][(((
i
<<
1
)
+
l
)
<<
1
)
+
1
];
}
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
2
;
l
<
5
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
1
][(
3
*
i
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
1
][((
3
*
i
+
l
)
<<
1
)
+
1
];
}
break
;
case
6
:
for
(
int
q
=
0
;
q
<
2
;
q
++
)
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
q
][(
3
*
i
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
q
][((
3
*
i
+
l
)
<<
1
)
+
1
];
}
break
;
case
7
:
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
1
][(
3
*
i
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
1
][((
3
*
i
+
l
)
<<
1
)
+
1
];
}
for
(
int
i
=
0
;
i
<
n_symbs
/
4
;
i
++
)
for
(
int
l
=
3
;
l
<
7
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
0
][((
i
<<
2
)
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
0
][(((
i
<<
2
)
+
l
)
<<
1
)
+
1
];
}
break
;
case
8
:
for
(
int
q
=
0
;
q
<
2
;
q
++
)
for
(
int
i
=
0
;
i
<
n_symbs
>>
2
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
q
][((
i
<<
2
)
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
q
][(((
i
<<
2
)
+
l
)
<<
1
)
+
1
];
}
break
;
default:
AssertFatal
(
0
,
"Invalid number of layers %d
\n
"
,
n_layers
);
}
}
\ No newline at end of file
openair1/PHY/MODULATION/nr_modulation.h
View file @
73db1628
...
...
@@ -37,4 +37,16 @@ void nr_modulation(uint32_t *in,
uint16_t
mod_order
,
int16_t
*
out
);
/*! \brief Perform NR layer mapping. TS 38.211 V15.4.0 subclause 7.3.1.3
@param[in] mod_symbs, double Pointer to modulated symbols for each codeword
@param[in] n_layers, number of layers
@param[in] n_symbs, number of modulated symbols
@param[out] tx_layers, modulated symbols for each layer
*/
void
nr_layer_mapping
(
int16_t
**
mod_symbs
,
uint8_t
n_layers
,
uint16_t
n_symbs
,
int16_t
**
tx_layers
);
#endif
\ No newline at end of file
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
73db1628
...
...
@@ -65,77 +65,6 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
}
void
nr_pdsch_layer_mapping
(
int16_t
**
mod_symbs
,
uint8_t
n_layers
,
uint16_t
n_symbs
,
int16_t
**
tx_layers
)
{
switch
(
n_layers
)
{
case
1
:
memcpy
((
void
*
)
tx_layers
[
0
],
(
void
*
)
mod_symbs
[
0
],
(
n_symbs
<<
1
)
*
sizeof
(
int16_t
));
break
;
case
2
:
case
3
:
case
4
:
for
(
int
i
=
0
;
i
<
n_symbs
/
n_layers
;
i
++
)
for
(
int
l
=
0
;
l
<
n_layers
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
0
][(
n_layers
*
i
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
0
][((
n_layers
*
i
+
l
)
<<
1
)
+
1
];
}
break
;
case
5
:
for
(
int
i
=
0
;
i
<
n_symbs
>>
1
;
i
++
)
for
(
int
l
=
0
;
l
<
2
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
0
][((
i
<<
1
)
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
0
][(((
i
<<
1
)
+
l
)
<<
1
)
+
1
];
}
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
2
;
l
<
5
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
1
][(
3
*
i
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
1
][((
3
*
i
+
l
)
<<
1
)
+
1
];
}
break
;
case
6
:
for
(
int
q
=
0
;
q
<
2
;
q
++
)
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
q
][(
3
*
i
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
q
][((
3
*
i
+
l
)
<<
1
)
+
1
];
}
break
;
case
7
:
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
1
][(
3
*
i
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
1
][((
3
*
i
+
l
)
<<
1
)
+
1
];
}
for
(
int
i
=
0
;
i
<
n_symbs
/
4
;
i
++
)
for
(
int
l
=
3
;
l
<
7
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
0
][((
i
<<
2
)
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
0
][(((
i
<<
2
)
+
l
)
<<
1
)
+
1
];
}
break
;
case
8
:
for
(
int
q
=
0
;
q
<
2
;
q
++
)
for
(
int
i
=
0
;
i
<
n_symbs
>>
2
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
mod_symbs
[
q
][((
i
<<
2
)
+
l
)
<<
1
];
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
mod_symbs
[
q
][(((
i
<<
2
)
+
l
)
<<
1
)
+
1
];
}
break
;
default:
AssertFatal
(
0
,
"Invalid number of layers %d
\n
"
,
n_layers
);
}
}
static
inline
uint16_t
get_pdsch_dmrs_idx
(
uint8_t
n
,
uint8_t
k_prime
,
uint8_t
delta
,
uint8_t
dmrs_type
)
{
uint16_t
dmrs_idx
=
(
dmrs_type
)
?
(
6
*
n
+
k_prime
+
delta
)
:
((
n
<<
2
)
+
(
k_prime
<<
1
)
+
delta
);
return
dmrs_idx
;
...
...
@@ -223,7 +152,7 @@ for (int i=0; i<nb_symbols>>3; i++) {
/// Layer mapping
nr_
pdsch_
layer_mapping
(
mod_symbs
,
nr_layer_mapping
(
mod_symbs
,
rel15
->
nb_layers
,
nb_symbols
,
tx_layers
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
73db1628
...
...
@@ -68,11 +68,6 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
uint32_t
n_RNTI
,
uint32_t
*
out
);
void
nr_pdsch_layer_mapping
(
int16_t
**
mod_symbs
,
uint8_t
n_layers
,
uint16_t
n_symbs
,
int16_t
**
tx_layers
);
void
nr_fill_dlsch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
...
...
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