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
ZhouShuya
OpenXG-RAN
Commits
bb2efbe4
Commit
bb2efbe4
authored
Aug 14, 2019
by
Khalid Ahmed
Committed by
Thomas Schlichter
Aug 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimizing nr_ue_ulsch_procedures
parent
779e8996
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
14 deletions
+113
-14
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+97
-0
openair1/PHY/MODULATION/nr_modulation.h
openair1/PHY/MODULATION/nr_modulation.h
+13
-0
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+3
-14
No files found.
openair1/PHY/MODULATION/nr_modulation.c
View file @
bb2efbe4
...
@@ -120,6 +120,103 @@ void nr_layer_mapping(int16_t **mod_symbs,
...
@@ -120,6 +120,103 @@ void nr_layer_mapping(int16_t **mod_symbs,
}
}
}
}
void
nr_ue_layer_mapping
(
NR_UE_ULSCH_t
**
ulsch_ue
,
uint8_t
n_layers
,
uint16_t
n_symbs
,
int16_t
**
tx_layers
)
{
int16_t
*
mod_symbs
;
switch
(
n_layers
)
{
case
1
:
mod_symbs
=
(
int16_t
*
)
ulsch_ue
[
0
]
->
d_mod
;
for
(
int
i
=
0
;
i
<
n_symbs
;
i
++
){
tx_layers
[
0
][
i
<<
1
]
=
(
mod_symbs
[
i
<<
1
]
*
AMP
)
>>
15
;
tx_layers
[
0
][(
i
<<
1
)
+
1
]
=
(
mod_symbs
[(
i
<<
1
)
+
1
]
*
AMP
)
>>
15
;
}
break
;
case
2
:
case
3
:
case
4
:
mod_symbs
=
(
int16_t
*
)
ulsch_ue
[
0
]
->
d_mod
;
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
[(
n_layers
*
i
+
l
)
<<
1
]
*
AMP
)
>>
15
;
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
(
mod_symbs
[((
n_layers
*
i
+
l
)
<<
1
)
+
1
]
*
AMP
)
>>
15
;
}
}
break
;
case
5
:
mod_symbs
=
(
int16_t
*
)
ulsch_ue
[
0
]
->
d_mod
;
for
(
int
i
=
0
;
i
<
n_symbs
>>
1
;
i
++
)
for
(
int
l
=
0
;
l
<
2
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
(
mod_symbs
[((
i
<<
1
)
+
l
)
<<
1
]
*
AMP
)
>>
15
;
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
(
mod_symbs
[(((
i
<<
1
)
+
l
)
<<
1
)
+
1
]
*
AMP
)
>>
15
;
}
mod_symbs
=
(
int16_t
*
)
ulsch_ue
[
1
]
->
d_mod
;
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
2
;
l
<
5
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
(
mod_symbs
[(
3
*
i
+
l
)
<<
1
]
*
AMP
)
>>
15
;
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
(
mod_symbs
[((
3
*
i
+
l
)
<<
1
)
+
1
]
*
AMP
)
>>
15
;
}
break
;
case
6
:
for
(
int
q
=
0
;
q
<
2
;
q
++
){
mod_symbs
=
(
int16_t
*
)
ulsch_ue
[
q
]
->
d_mod
;
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
(
mod_symbs
[(
3
*
i
+
l
)
<<
1
]
*
AMP
)
>>
15
;
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
(
mod_symbs
[((
3
*
i
+
l
)
<<
1
)
+
1
]
*
AMP
)
>>
15
;
}
}
break
;
case
7
:
mod_symbs
=
(
int16_t
*
)
ulsch_ue
[
1
]
->
d_mod
;
for
(
int
i
=
0
;
i
<
n_symbs
/
3
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
(
mod_symbs
[(
3
*
i
+
l
)
<<
1
]
*
AMP
)
>>
15
;
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
(
mod_symbs
[((
3
*
i
+
l
)
<<
1
)
+
1
]
*
AMP
)
>>
15
;
}
mod_symbs
=
(
int16_t
*
)
ulsch_ue
[
0
]
->
d_mod
;
for
(
int
i
=
0
;
i
<
n_symbs
/
4
;
i
++
)
for
(
int
l
=
3
;
l
<
7
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
(
mod_symbs
[((
i
<<
2
)
+
l
)
<<
1
]
*
AMP
)
>>
15
;
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
(
mod_symbs
[(((
i
<<
2
)
+
l
)
<<
1
)
+
1
]
*
AMP
)
>>
15
;
}
break
;
case
8
:
for
(
int
q
=
0
;
q
<
2
;
q
++
){
mod_symbs
=
(
int16_t
*
)
ulsch_ue
[
q
]
->
d_mod
;
for
(
int
i
=
0
;
i
<
n_symbs
>>
2
;
i
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
{
tx_layers
[
l
][
i
<<
1
]
=
(
mod_symbs
[((
i
<<
2
)
+
l
)
<<
1
]
*
AMP
)
>>
15
;
tx_layers
[
l
][(
i
<<
1
)
+
1
]
=
(
mod_symbs
[(((
i
<<
2
)
+
l
)
<<
1
)
+
1
]
*
AMP
)
>>
15
;
}
}
break
;
default:
AssertFatal
(
0
,
"Invalid number of layers %d
\n
"
,
n_layers
);
}
}
void
nr_dft
(
int32_t
*
z
,
int32_t
*
d
,
uint32_t
Msc_PUSCH
)
void
nr_dft
(
int32_t
*
z
,
int32_t
*
d
,
uint32_t
Msc_PUSCH
)
{
{
...
...
openair1/PHY/MODULATION/nr_modulation.h
View file @
bb2efbe4
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <stdint.h>
#include <stdint.h>
#include "PHY/defs_nr_common.h"
#include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#define DMRS_MOD_ORDER 2
#define DMRS_MOD_ORDER 2
...
@@ -52,6 +53,18 @@ void nr_layer_mapping(int16_t **mod_symbs,
...
@@ -52,6 +53,18 @@ void nr_layer_mapping(int16_t **mod_symbs,
uint16_t
n_symbs
,
uint16_t
n_symbs
,
int16_t
**
tx_layers
);
int16_t
**
tx_layers
);
/*! \brief Perform NR layer mapping. TS 38.211 V15.4.0 subclause 7.3.1.3
@param[in] ulsch_ue, double Pointer to NR_UE_ULSCH_t struct
@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_ue_layer_mapping
(
NR_UE_ULSCH_t
**
ulsch_ue
,
uint8_t
n_layers
,
uint16_t
n_symbs
,
int16_t
**
tx_layers
);
/*!
/*!
\brief This function implements the OFDM front end processor on reception (FEP)
\brief This function implements the OFDM front end processor on reception (FEP)
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
bb2efbe4
...
@@ -94,7 +94,6 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -94,7 +94,6 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
unsigned
int
available_bits
;
unsigned
int
available_bits
;
uint8_t
mod_order
,
cwd_index
,
num_of_codewords
;
uint8_t
mod_order
,
cwd_index
,
num_of_codewords
;
uint32_t
scrambled_output
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
5
];
uint32_t
scrambled_output
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
5
];
int32_t
*
mod_symbols
[
NR_MAX_NB_CODEWORDS
];
uint32_t
***
pusch_dmrs
;
uint32_t
***
pusch_dmrs
;
int16_t
**
tx_layers
;
int16_t
**
tx_layers
;
int32_t
**
txdataF
;
int32_t
**
txdataF
;
...
@@ -180,14 +179,12 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -180,14 +179,12 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
mod_order
,
mod_order
,
(
int16_t
*
)
ulsch_ue
->
d_mod
);
(
int16_t
*
)
ulsch_ue
->
d_mod
);
// pusch_transform_precoding(ulsch_ue, frame_parms, harq_pid);
// pusch_transform_precoding(ulsch_ue, frame_parms, harq_pid);
///////////
///////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
mod_symbols
[
cwd_index
]
=
(
int32_t
*
)
malloc16
((
NR_MAX_PUSCH_ENCODED_LENGTH
)
*
sizeof
(
int32_t
*
));
memcpy
(
mod_symbols
[
cwd_index
],
ulsch_ue
->
d_mod
,(
available_bits
/
mod_order
)
*
sizeof
(
int32_t
));
}
}
...
@@ -212,13 +209,10 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -212,13 +209,10 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
tx_layers
=
(
int16_t
**
)
pusch_ue
->
txdataF_layers
;
tx_layers
=
(
int16_t
**
)
pusch_ue
->
txdataF_layers
;
nr_
layer_mapping
((
int16_t
**
)
mod_symbols
,
nr_
ue_layer_mapping
(
UE
->
ulsch
[
thread_id
][
eNB_id
]
,
harq_process_ul_ue
->
Nl
,
harq_process_ul_ue
->
Nl
,
available_bits
/
mod_order
,
available_bits
/
mod_order
,
tx_layers
);
tx_layers
);
for
(
uint32_t
i
=
0
;
i
<
2
*
available_bits
/
mod_order
;
i
++
)
tx_layers
[
0
][
i
]
=
(
tx_layers
[
0
][
i
]
*
AMP
)
>>
15
;
///////////
///////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
@@ -323,15 +317,10 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -323,15 +317,10 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
}
}
}
}
}
}
///////////
///////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
for
(
cwd_index
=
0
;
cwd_index
<
num_of_codewords
;
cwd_index
++
)
{
free
(
mod_symbols
[
cwd_index
]);
}
return
0
;
return
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