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
0f538755
Commit
0f538755
authored
Oct 22, 2020
by
Khodr Saaifan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix DMRS RE allocation: 1- allowed_xlsch_re_in_dmrs_symbol 2- Double DMRS 3- w_t and w_f
parent
e0127980
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
14 deletions
+23
-14
openair1/PHY/NR_REFSIG/dmrs_nr.c
openair1/PHY/NR_REFSIG/dmrs_nr.c
+3
-2
openair1/PHY/NR_REFSIG/dmrs_nr.h
openair1/PHY/NR_REFSIG/dmrs_nr.h
+1
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+16
-9
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.c
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+1
-1
No files found.
openair1/PHY/NR_REFSIG/dmrs_nr.c
View file @
0f538755
...
...
@@ -37,6 +37,7 @@
uint8_t
allowed_xlsch_re_in_dmrs_symbol
(
uint16_t
k
,
uint16_t
start_sc
,
uint16_t
ofdm_symbol_size
,
uint8_t
numDmrsCdmGrpsNoData
,
uint8_t
dmrs_type
)
{
uint8_t
delta
;
...
...
@@ -44,7 +45,7 @@ uint8_t allowed_xlsch_re_in_dmrs_symbol(uint16_t k,
if
(
k
>
start_sc
)
diff
=
k
-
start_sc
;
else
diff
=
start_sc
-
k
;
diff
=
(
ofdm_symbol_size
-
start_sc
)
+
k
;
for
(
int
i
=
0
;
i
<
numDmrsCdmGrpsNoData
;
i
++
){
if
(
dmrs_type
==
NFAPI_NR_DMRS_TYPE1
)
{
delta
=
i
;
...
...
@@ -53,7 +54,7 @@ uint8_t allowed_xlsch_re_in_dmrs_symbol(uint16_t k,
}
else
{
delta
=
i
<<
1
;
if
(
(((
diff
)
%
6
)
==
delta
)
||
(((
k
-
start_sc
)
%
6
)
==
(
delta
+
1
))
)
if
(
((
diff
%
6
)
==
delta
)
||
((
diff
%
6
)
==
(
delta
+
1
))
)
return
(
0
);
}
}
...
...
openair1/PHY/NR_REFSIG/dmrs_nr.h
View file @
0f538755
...
...
@@ -58,6 +58,7 @@ uint16_t get_dmrs_freq_idx_ul(uint16_t n, uint8_t k_prime, uint8_t delta, uint8_
uint8_t
allowed_xlsch_re_in_dmrs_symbol
(
uint16_t
k
,
uint16_t
start_sc
,
uint16_t
ofdm_symbol_size
,
uint8_t
numDmrsCdmGrpsNoData
,
uint8_t
dmrs_type
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
0f538755
...
...
@@ -140,7 +140,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
uint32_t
scrambled_output
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
5
];
int16_t
**
mod_symbs
=
(
int16_t
**
)
dlsch
->
mod_symbs
;
int16_t
**
tx_layers
=
(
int16_t
**
)
dlsch
->
txdataF
;
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
l_prime
[
2
]
,
delta
;
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
l_prime
,
delta
;
uint8_t
dmrs_Type
=
rel15
->
dmrsConfigType
;
int
nb_re_dmrs
;
uint16_t
n_dmrs
;
...
...
@@ -251,14 +251,13 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
/// DMRS QPSK modulation
l0
=
get_l0
(
rel15
->
dlDmrsSymbPos
);
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
l0
=
get_l0
(
rel15
->
dlDmrsSymbPos
);
printf
(
"DMRS modulation (single symbol %d, %d symbols, type %d):
\n
"
,
l0
,
n_dmrs
>>
1
,
dmrs_Type
);
for
(
int
i
=
0
;
i
<
n_dmrs
>>
4
;
i
++
)
{
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
...
...
@@ -286,11 +285,12 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
get_Wt
(
Wt
,
ap
,
dmrs_Type
);
get_Wf
(
Wf
,
ap
,
dmrs_Type
);
delta
=
get_delta
(
ap
,
dmrs_Type
);
l_prime
[
0
]
=
0
;
// single symbol ap 0
uint8_t
dmrs_symbol
=
l0
+
l_prime
[
0
];
l_prime
=
0
;
// single symbol ap 0
l0
=
get_l0
(
rel15
->
dlDmrsSymbPos
);
uint8_t
dmrs_symbol
=
l0
+
l_prime
;
#ifdef DEBUG_DLSCH_MAPPING
printf
(
"DMRS Type %d params for ap %d: Wt %d %d
\t
Wf %d %d
\t
delta %d
\t
l_prime %d
\t
l0 %d
\t
DMRS symbol %d
\n
"
,
1
+
dmrs_Type
,
ap
,
Wt
[
0
],
Wt
[
1
],
Wf
[
0
],
Wf
[
1
],
delta
,
l_prime
[
0
]
,
l0
,
dmrs_symbol
);
1
+
dmrs_Type
,
ap
,
Wt
[
0
],
Wt
[
1
],
Wf
[
0
],
Wf
[
1
],
delta
,
l_prime
,
l0
,
dmrs_symbol
);
#endif
uint8_t
k_prime
=
0
;
uint16_t
m
=
0
,
n
=
0
,
dmrs_idx
=
0
,
k
=
0
;
...
...
@@ -309,8 +309,15 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
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
;
if
(
l
==
(
l0
+
1
))
//take into account the double DMRS symbols
l_prime
=
1
;
else
if
(
l
>
(
l0
+
1
)){
//new DMRS pair
l0
=
l
;
l_prime
=
0
;
}
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
(
2
*
txdataF_offset
)]
=
(
Wt
[
l_prime
]
*
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
]
*
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
)],
...
...
@@ -323,7 +330,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
}
else
{
if
(
(
!
(
rel15
->
dlDmrsSymbPos
&
(
1
<<
l
)))
||
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
,
frame_parms
->
ofdm_symbol_size
,
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
...
...
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.c
View file @
0f538755
...
...
@@ -67,12 +67,12 @@ void get_antenna_ports(uint8_t *ap, uint8_t n_symbs, uint8_t config) {
void
get_Wt
(
int8_t
*
Wt
,
uint8_t
ap
,
uint8_t
config
)
{
for
(
int
i
=
0
;
i
<
2
;
i
++
)
*
(
Wt
+
i
)
=
(
config
==
NFAPI_NR_DMRS_TYPE1
)
?
(
pdsch_dmrs_1
[
ap
][
3
+
i
])
:
(
pdsch_dmrs_2
[
ap
][
3
+
i
]);
*
(
Wt
+
i
)
=
(
config
==
NFAPI_NR_DMRS_TYPE1
)
?
(
pdsch_dmrs_1
[
ap
][
5
+
i
])
:
(
pdsch_dmrs_2
[
ap
][
5
+
i
]);
}
void
get_Wf
(
int8_t
*
Wf
,
uint8_t
ap
,
uint8_t
config
)
{
for
(
int
i
=
0
;
i
<
2
;
i
++
)
*
(
Wf
+
i
)
=
(
config
==
NFAPI_NR_DMRS_TYPE1
)
?
(
pdsch_dmrs_1
[
ap
][
5
+
i
])
:
(
pdsch_dmrs_2
[
ap
][
5
+
i
]);
*
(
Wf
+
i
)
=
(
config
==
NFAPI_NR_DMRS_TYPE1
)
?
(
pdsch_dmrs_1
[
ap
][
3
+
i
])
:
(
pdsch_dmrs_2
[
ap
][
3
+
i
]);
}
uint8_t
get_delta
(
uint8_t
ap
,
uint8_t
config
)
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
0f538755
...
...
@@ -360,7 +360,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
ptrs_idx
++
;
}
else
if
(
!
is_dmrs_sym
||
allowed_xlsch_re_in_dmrs_symbol
(
k
,
start_sc
,
cdm_grps_no_data
,
dmrs_type
))
{
}
else
if
(
!
is_dmrs_sym
||
allowed_xlsch_re_in_dmrs_symbol
(
k
,
start_sc
,
frame_parms
->
ofdm_symbol_size
,
cdm_grps_no_data
,
dmrs_type
))
{
((
int16_t
*
)
txdataF
[
ap
])[(
sample_offsetF
)
<<
1
]
=
((
int16_t
*
)
ulsch_ue
->
y
)[
m
<<
1
];
((
int16_t
*
)
txdataF
[
ap
])[((
sample_offsetF
)
<<
1
)
+
1
]
=
((
int16_t
*
)
ulsch_ue
->
y
)[(
m
<<
1
)
+
1
];
...
...
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