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
zzha zzha
OpenXG-RAN
Commits
9b52bf29
Commit
9b52bf29
authored
Apr 16, 2020
by
Ahmed Hussein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separating "is_ptrs_subcarrier" from "is_ptrs_symbol"
parent
f8c0de63
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
81 deletions
+51
-81
openair1/PHY/NR_REFSIG/ptrs_nr.c
openair1/PHY/NR_REFSIG/ptrs_nr.c
+17
-28
openair1/PHY/NR_REFSIG/ptrs_nr.h
openair1/PHY/NR_REFSIG/ptrs_nr.h
+11
-13
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+13
-29
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+10
-11
No files found.
openair1/PHY/NR_REFSIG/ptrs_nr.c
View file @
9b52bf29
...
@@ -139,11 +139,14 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
...
@@ -139,11 +139,14 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
* NAME : is_ptrs_subcarrier
* NAME : is_ptrs_subcarrier
*
*
* PARAMETERS : k subcarrier index
* PARAMETERS : k subcarrier index
* K_ptrs the parameter K_ptrs
* n_rnti UE CRNTI
* n_rnti UE CRNTI
* dmrs_antenna_port DMRS antenna port
* K_ptrs the parameter K_ptrs
* pusch_dmrs_type the DMRS configuration type used for PUSCH
* N_RB number of RBs scheduled for PUSCH
* N_RB number of RBs scheduled for PUSCH
* k_RE_ref the parameter k_RE_ref
* k_RE_ref the parameter k_RE_ref
* start_sc first subcarrier index
* start_sc first subcarrier index
* ofdm_symbol_size number of samples in an OFDM symbol
*
*
* RETURN : 1 if subcarrier k is PTRS, or 0 otherwise
* RETURN : 1 if subcarrier k is PTRS, or 0 otherwise
*
*
...
@@ -151,8 +154,17 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
...
@@ -151,8 +154,17 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
*
*
*********************************************************************/
*********************************************************************/
uint8_t
is_ptrs_subcarrier
(
uint16_t
k
,
uint8_t
K_ptrs
,
uint16_t
n_rnti
,
uint16_t
N_RB
,
int16_t
k_RE_ref
,
uint16_t
start_sc
,
uint16_t
ofdm_symbol_size
)
{
uint8_t
is_ptrs_subcarrier
(
uint16_t
k
,
uint16_t
n_rnti
,
uint8_t
dmrs_antenna_port
,
uint8_t
pusch_dmrs_type
,
uint8_t
K_ptrs
,
uint16_t
N_RB
,
uint8_t
k_RE_ref
,
uint16_t
start_sc
,
uint16_t
ofdm_symbol_size
)
{
// int16_t k_RE_ref = get_kRE_ref(dmrs_antenna_port, pusch_dmrs_type, resourceElementOffset);
uint16_t
k_RB_ref
;
uint16_t
k_RB_ref
;
if
(
N_RB
%
K_ptrs
==
0
)
if
(
N_RB
%
K_ptrs
==
0
)
...
@@ -174,39 +186,16 @@ uint8_t is_ptrs_subcarrier(uint16_t k, uint8_t K_ptrs, uint16_t n_rnti, uint16_t
...
@@ -174,39 +186,16 @@ uint8_t is_ptrs_subcarrier(uint16_t k, uint8_t K_ptrs, uint16_t n_rnti, uint16_t
* NAME : is_ptrs_symbol
* NAME : is_ptrs_symbol
*
*
* PARAMETERS : l ofdm symbol index within slot
* PARAMETERS : l ofdm symbol index within slot
* k subcarrier index
* n_rnti UE CRNTI
* N_RB number of RBs scheduled for PUSCH
* dmrs_antenna_port DMRS antenna port
* K_ptrs the parameter K_ptrs
* ptrs_symbols bit mask of ptrs
* ptrs_symbols bit mask of ptrs
* start_sc first subcarrier index
* pusch_dmrs_type PUSCH DMRS type (1 or 2)
* ptrs_UplinkConfig PTRS uplink configuration
*
*
* RETURN :
0 if symbol(k,l) is data, or 1 if symbol(k,l) is ptrs
* RETURN :
1 if symbol is ptrs, or 0 otherwise
*
*
* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH
* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH
*
*
*********************************************************************/
*********************************************************************/
uint8_t
is_ptrs_symbol
(
uint8_t
l
,
uint8_t
is_ptrs_symbol
(
uint8_t
l
,
uint16_t
ptrs_symbols
)
uint16_t
k
,
uint16_t
n_rnti
,
uint16_t
N_RB
,
uint8_t
dmrs_antenna_port
,
uint8_t
K_ptrs
,
uint16_t
ptrs_symbols
,
uint16_t
start_sc
,
uint8_t
pusch_dmrs_type
,
uint8_t
k_RE_ref
,
uint16_t
ofdm_symbol_size
)
{
{
// int16_t k_RE_ref = get_kRE_ref(dmrs_antenna_port, pusch_dmrs_type, resourceElementOffset);
uint8_t
is_ptrs_freq
=
is_ptrs_subcarrier
(
k
,
K_ptrs
,
n_rnti
,
N_RB
,
k_RE_ref
,
start_sc
,
ofdm_symbol_size
);
if
(
is_ptrs_freq
==
0
)
return
0
;
if
(((
ptrs_symbols
>>
l
)
&
1
)
==
1
)
if
(((
ptrs_symbols
>>
l
)
&
1
)
==
1
)
return
1
;
return
1
;
...
...
openair1/PHY/NR_REFSIG/ptrs_nr.h
View file @
9b52bf29
...
@@ -55,20 +55,18 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
...
@@ -55,20 +55,18 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
uint8_t
L_ptrs
,
uint8_t
L_ptrs
,
uint16_t
ul_dmrs_symb_pos
);
uint16_t
ul_dmrs_symb_pos
);
uint8_t
is_ptrs_subcarrier
(
uint16_t
k
,
uint8_t
K_ptrs
,
uint16_t
n_rnti
,
uint16_t
N_RB
,
int16_t
k_RE_ref
,
uint16_t
start_sc
,
uint16_t
ofdm_symbol_size
);
uint8_t
is_ptrs_subcarrier
(
uint16_t
k
,
uint8_t
is_ptrs_symbol
(
uint8_t
l
,
uint16_t
k
,
uint16_t
n_rnti
,
uint16_t
n_rnti
,
uint16_t
N_RB
,
uint8_t
dmrs_antenna_port
,
uint8_t
dmrs_antenna_port
,
uint8_t
K_ptrs
,
uint16_t
ptrs_symbols
,
uint16_t
start_sc
,
uint8_t
pusch_dmrs_type
,
uint8_t
pusch_dmrs_type
,
uint8_t
K_ptrs
,
uint16_t
N_RB
,
uint8_t
k_RE_ref
,
uint8_t
k_RE_ref
,
uint16_t
start_sc
,
uint16_t
ofdm_symbol_size
);
uint16_t
ofdm_symbol_size
);
uint8_t
is_ptrs_symbol
(
uint8_t
l
,
uint16_t
ptrs_symbols
);
#endif
/* PTRS_NR_H */
#endif
/* PTRS_NR_H */
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
9b52bf29
...
@@ -285,17 +285,15 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
...
@@ -285,17 +285,15 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
is_dmrs_re
=
0
;
is_dmrs_re
=
0
;
if
(
((
pusch_pdu
->
pdu_bit_map
)
>>
2
)
&
0x01
)
{
if
(
((
pusch_pdu
->
pdu_bit_map
)
>>
2
)
&
0x01
)
{
if
(
is_ptrs_symbol
(
symbol
,
pusch_vars
->
ptrs_symbols
))
is_ptrs_symbol_flag
=
is_ptrs_symbol
(
symbol
,
is_ptrs_symbol_flag
=
is_ptrs_subcarrier
((
start_re
+
re
)
%
frame_parms
->
ofdm_symbol_size
,
(
start_re
+
re
)
%
frame_parms
->
ofdm_symbol_size
,
n_rnti
,
n_rnti
,
pusch_pdu
->
rb_size
,
aarx
,
aarx
,
K_ptrs
,
pusch_vars
->
ptrs_symbols
,
start_re
,
pusch_pdu
->
dmrs_config_type
,
pusch_pdu
->
dmrs_config_type
,
K_ptrs
,
pusch_pdu
->
rb_size
,
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
,
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
,
start_re
,
frame_parms
->
ofdm_symbol_size
);
frame_parms
->
ofdm_symbol_size
);
if
(
is_ptrs_symbol_flag
==
1
)
if
(
is_ptrs_symbol_flag
==
1
)
...
@@ -1026,7 +1024,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1026,7 +1024,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
unsigned
char
harq_pid
)
unsigned
char
harq_pid
)
{
{
uint8_t
first_symbol_flag
,
aarx
,
aatx
,
dmrs_symbol_flag
,
ptrs_symbol_flag
;
// dmrs_symbol_flag, a flag to indicate DMRS REs in current symbol
uint8_t
first_symbol_flag
,
aarx
,
aatx
,
dmrs_symbol_flag
;
// dmrs_symbol_flag, a flag to indicate DMRS REs in current symbol
uint32_t
nb_re_pusch
,
bwp_start_subcarrier
;
uint32_t
nb_re_pusch
,
bwp_start_subcarrier
;
uint8_t
L_ptrs
=
0
;
// PTRS parameter
uint8_t
L_ptrs
=
0
;
// PTRS parameter
int
avgs
;
int
avgs
;
...
@@ -1035,7 +1033,6 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1035,7 +1033,6 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
nfapi_nr_pusch_pdu_t
*
rel15_ul
=
&
gNB
->
ulsch
[
UE_id
][
0
]
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
nfapi_nr_pusch_pdu_t
*
rel15_ul
=
&
gNB
->
ulsch
[
UE_id
][
0
]
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
dmrs_symbol_flag
=
0
;
dmrs_symbol_flag
=
0
;
ptrs_symbol_flag
=
0
;
first_symbol_flag
=
0
;
first_symbol_flag
=
0
;
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_sc_per_ofdm_symbol
=
0
;
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_sc_per_ofdm_symbol
=
0
;
...
@@ -1069,20 +1066,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1069,20 +1066,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
}
}
if
(
((
rel15_ul
->
pdu_bit_map
)
>>
2
)
&
0x01
)
{
// if there is ptrs pdu
if
(
((
rel15_ul
->
pdu_bit_map
)
>>
2
)
&
0x01
)
{
// if there is ptrs pdu
ptrs_symbol_flag
=
is_ptrs_symbol
(
symbol
,
if
(
is_ptrs_symbol
(
symbol
,
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_symbols
))
0
,
rel15_ul
->
rnti
,
rel15_ul
->
rb_size
,
0
,
(
rel15_ul
->
pusch_ptrs
.
ptrs_freq_density
)
?
4
:
2
,
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_symbols
,
0
,
rel15_ul
->
dmrs_config_type
,
rel15_ul
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
,
frame_parms
->
ofdm_symbol_size
);
}
if
(
ptrs_symbol_flag
==
1
){
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_symbol_index
=
symbol
;
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_symbol_index
=
symbol
;
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
9b52bf29
...
@@ -396,16 +396,15 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -396,16 +396,15 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
if
((
harq_process_ul_ue
->
pusch_pdu
.
pdu_bit_map
>>
2
)
&
0x01
){
if
((
harq_process_ul_ue
->
pusch_pdu
.
pdu_bit_map
>>
2
)
&
0x01
){
i
s_ptrs
=
is_ptrs_symbol
(
l
,
i
f
(
is_ptrs_symbol
(
l
,
ulsch_ue
->
ptrs_symbols
))
k
,
is_ptrs
=
is_ptrs_subcarrier
(
k
,
rnti
,
rnti
,
nb_rb
,
ap
,
ap
,
K_ptrs
,
ulsch_ue
->
ptrs_symbols
,
start_sc
,
dmrs_type
,
dmrs_type
,
K_ptrs
,
nb_rb
,
harq_process_ul_ue
->
pusch_pdu
.
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
,
harq_process_ul_ue
->
pusch_pdu
.
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
,
start_sc
,
frame_parms
->
ofdm_symbol_size
);
frame_parms
->
ofdm_symbol_size
);
}
}
...
...
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