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
wangjie
OpenXG-RAN
Commits
1c2cbc76
Commit
1c2cbc76
authored
Mar 15, 2021
by
sfn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review pdsch precoding
parent
7dc97108
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
15 deletions
+57
-15
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+57
-15
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
1c2cbc76
...
@@ -413,25 +413,67 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
...
@@ -413,25 +413,67 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
///Layer Precoding and Antenna port mapping
///Layer Precoding and Antenna port mapping
// tx_layers 1-8 are mapped on antenna ports 1000-1007
// tx_layers 1-8 are mapped on antenna ports 1000-1007
uint8_t
pmi
=
4
;
//hard coded, should be changed later from the upper layer
// The precoding info is supported by nfapi such as numPRGs, prgSize, and PMIdx
// The same precoding matrix is applied on prgSize RBs, Thus
// pmi = PMIdx[rbidx/prgSize], rbidx =0,...,rbSize-1
// The Precoding matrix:
// The Codebook Type I and Type II are not supported yet.
// We adopt the precoding matrices of PUSCH for 4 layers.
uint8_t
pmi
;
for
(
int
ap
=
0
;
ap
<
frame_parms
->
nb_antennas_tx
;
ap
++
)
{
for
(
int
ap
=
0
;
ap
<
frame_parms
->
nb_antennas_tx
;
ap
++
)
{
char
*
W_prec
=
nr_W_1l_4p
[
pmi
][
ap
];
//Hard coded, should be changed later from the upper layer
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
uint16_t
k
=
start_sc
;
uint16_t
k
=
start_sc
;
for
(
int
i
=
0
;
i
<
rel15
->
rbSize
*
NR_NB_SC_PER_RB
;
i
++
)
{
for
(
int
rb
=
0
;
rb
<
rel15
->
rbSize
;
rb
++
)
{
//get pmi info
if
(
rel15
->
precodingAndBeamforming
.
prgSize
>
0
)
pmi
=
rel15
->
precodingAndBeamforming
.
PMIdx
[(
int
)
rb
/
rel15
->
precodingAndBeamforming
.
prgSize
];
else
pmi
=
0
;
//no precoding
//get the precoding matrix weights:
char
*
W_prec
;
switch
(
frame_parms
->
nb_antennas_tx
)
{
case
1
:
//1 antenna port
W_prec
=
nr_W_1l_2p
[
pmi
][
ap
];
break
;
case
2
:
//2 antenna ports
if
(
rel15
->
nrOfLayers
==
1
)
//1 layer
W_prec
=
nr_W_1l_2p
[
pmi
][
ap
];
else
//2 layers
W_prec
=
nr_W_2l_2p
[
pmi
][
ap
];
break
;
case
4
:
//4 antenna ports
if
(
rel15
->
nrOfLayers
==
1
)
//1 layer
W_prec
=
nr_W_1l_4p
[
pmi
][
ap
];
else
if
(
rel15
->
nrOfLayers
==
2
)
//2 layers
W_prec
=
nr_W_2l_4p
[
pmi
][
ap
];
else
if
(
rel15
->
nrOfLayers
==
3
)
//3 layers
W_prec
=
nr_W_3l_4p
[
pmi
][
ap
];
else
//4 layers
W_prec
=
nr_W_4l_4p
[
pmi
][
ap
];
break
;
default:
LOG_D
(
PHY
,
"Precoding 1,2, or 4 antenna ports are currently supported
\n
"
);
W_prec
=
nr_W_1l_2p
[
pmi
][
ap
];
break
;
}
for
(
int
i
=
0
;
i
<
NR_NB_SC_PER_RB
;
i
++
)
{
int32_t
re_offset
=
l
*
frame_parms
->
ofdm_symbol_size
+
k
;
int32_t
re_offset
=
l
*
frame_parms
->
ofdm_symbol_size
+
k
;
int32_t
precodatatx_F
=
nr_layer_precoder
(
txdataF_precoding
,
W_prec
,
rel15
->
nrOfLayers
,
re_offset
+
txdataF_offset
);
int32_t
precodatatx_F
=
nr_layer_precoder
(
txdataF_precoding
,
W_prec
,
rel15
->
nrOfLayers
,
re_offset
+
txdataF_offset
);
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
(
2
*
txdataF_offset
)]
=
((
int16_t
*
)
&
precodatatx_F
)[
0
];
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
(
2
*
txdataF_offset
)]
=
((
int16_t
*
)
&
precodatatx_F
)[
0
];
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]
=
((
int16_t
*
)
&
precodatatx_F
)[
1
];
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]
=
((
int16_t
*
)
&
precodatatx_F
)[
1
];
#ifdef DEBUG_DLSCH_MAPPING
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"antenna %d
\t
l %d
\t
k %d
\t
txdataF: %d %d
\n
"
,
printf
(
"antenna %d
\t
l %d
\t
k %d
\t
txdataF: %d %d
\n
"
,
ap
,
l
,
k
,
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
(
2
*
txdataF_offset
)],
ap
,
l
,
k
,
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
(
2
*
txdataF_offset
)],
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]);
((
int16_t
*
)
txdataF
[
ap
])[(
re_offset
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]);
#endif
#endif
if
(
++
k
>=
frame_parms
->
ofdm_symbol_size
)
if
(
++
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
-=
frame_parms
->
ofdm_symbol_size
;
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
}
//RE loop
}
//RE loop
}
// symbol loop
}
// symbol loop
}
// port loop
}
// port loop
...
...
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