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
e0127980
Commit
e0127980
authored
Oct 20, 2020
by
Khodr Saaifan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gNB: fix Resource mapping to support multiple layers DMRS generation
parent
5d4bc9d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+21
-11
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
e0127980
...
...
@@ -153,10 +153,10 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
n_dmrs
=
((
rel15
->
rbSize
+
rel15
->
rbStart
)
*
4
)
<<
1
;
}
uint16_t
nb_re
;
nb_re
=
((
12
*
rel15
->
NrOfSymbols
)
-
nb_re_dmrs
-
xOverhead
)
*
rel15
->
rbSize
*
rel15
->
NrOfCodeword
s
;
nb_re
=
((
12
*
rel15
->
NrOfSymbols
)
-
nb_re_dmrs
-
xOverhead
)
*
rel15
->
rbSize
*
rel15
->
nrOfLayer
s
;
uint8_t
Qm
=
rel15
->
qamModOrder
[
0
];
uint32_t
encoded_length
=
nb_re
*
Qm
;
int16_t
mod_dmrs
[
n_dmrs
<<
1
]
__attribute__
((
aligned
(
16
)));
int16_t
mod_dmrs
[
14
][
n_dmrs
]
__attribute__
((
aligned
(
16
)));
/// CRC, coding, interleaving and rate matching
...
...
@@ -253,7 +253,10 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
l0
=
get_l0
(
rel15
->
dlDmrsSymbPos
);
nr_modulation
(
pdsch_dmrs
[
l0
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
if
(
rel15
->
dlDmrsSymbPos
&
(
1
<<
l
))
nr_modulation
(
pdsch_dmrs
[
l
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
[
l
]);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
}
#ifdef DEBUG_DLSCH
printf
(
"DMRS modulation (single symbol %d, %d symbols, type %d):
\n
"
,
l0
,
n_dmrs
>>
1
,
dmrs_Type
);
...
...
@@ -293,17 +296,21 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
uint16_t
m
=
0
,
n
=
0
,
dmrs_idx
=
0
,
k
=
0
;
int
txdataF_offset
=
(
slot
%
2
)
*
frame_parms
->
samples_per_slot_wCP
;
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
k
=
start_sc
;
n
=
0
;
k_prime
=
0
;
if
(
dmrs_Type
==
NFAPI_NR_DMRS_TYPE1
)
// another if condition to be included to check pdsch config type (reference of k)
dmrs_idx
=
rel15
->
rbStart
*
6
;
else
dmrs_idx
=
rel15
->
rbStart
*
4
;
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
k
=
start_sc
;
for
(
int
i
=
0
;
i
<
rel15
->
rbSize
*
NR_NB_SC_PER_RB
;
i
++
)
{
if
((
l
==
dmrs_symbol
)
&&
(
k
==
((
start_sc
+
get_dmrs_freq_idx
(
n
,
k_prime
,
delta
,
dmrs_Type
))
%
(
frame_parms
->
ofdm_symbol_size
))))
{
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
(
2
*
txdataF_offset
)]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
amp
*
mod_dmrs
[
dmrs_idx
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
amp
*
mod_dmrs
[(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
if
((
rel15
->
dlDmrsSymbPos
&
(
1
<<
l
))
&&
(
k
==
((
start_sc
+
get_dmrs_freq_idx
(
n
,
k_prime
,
delta
,
dmrs_Type
))
%
(
frame_parms
->
ofdm_symbol_size
))))
{
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
(
2
*
txdataF_offset
)]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
amp
*
mod_dmrs
[
l
][
dmrs_idx
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]
=
(
Wt
[
l_prime
[
0
]]
*
Wf
[
k_prime
]
*
amp
*
mod_dmrs
[
l
][(
dmrs_idx
<<
1
)
+
1
])
>>
15
;
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"dmrs_idx %d
\t
l %d
\t
k %d
\t
k_prime %d
\t
n %d
\t
txdataF: %d %d
\n
"
,
dmrs_idx
,
l
,
k
,
k_prime
,
n
,
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
(
2
*
txdataF_offset
)],
...
...
@@ -316,7 +323,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
}
else
{
if
(
(
l
!=
dmrs_symbol
)
||
allowed_xlsch_re_in_dmrs_symbol
(
k
,
start_sc
,
rel15
->
numDmrsCdmGrpsNoData
,
dmrs_Type
))
{
if
(
(
!
(
rel15
->
dlDmrsSymbPos
&
(
1
<<
l
))
)
||
allowed_xlsch_re_in_dmrs_symbol
(
k
,
start_sc
,
rel15
->
numDmrsCdmGrpsNoData
,
dmrs_Type
))
{
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
(
2
*
txdataF_offset
)]
=
(
amp
*
tx_layers
[
ap
][
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]
=
(
amp
*
tx_layers
[
ap
][(
m
<<
1
)
+
1
])
>>
15
;
#ifdef DEBUG_DLSCH_MAPPING
...
...
@@ -332,6 +339,9 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
}
//RE loop
}
// symbol loop
}
// layer loop
/// RE Precoding
dlsch
->
slot_tx
[
slot
]
=
0
;
}
// dlsch loop
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