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
spbro
OpenXG-RAN
Commits
d247abb5
Commit
d247abb5
authored
Oct 10, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup
parent
82597e7e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
148 deletions
+64
-148
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+0
-2
openair1/PHY/NR_REFSIG/ptrs_nr.c
openair1/PHY/NR_REFSIG/ptrs_nr.c
+38
-106
openair1/PHY/NR_REFSIG/ptrs_nr.h
openair1/PHY/NR_REFSIG/ptrs_nr.h
+1
-6
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+8
-10
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+3
-4
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+14
-18
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+0
-2
No files found.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
d247abb5
...
...
@@ -506,7 +506,6 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
uint16_t
*
dmrsSymbPos
=
&
rel15_ul
->
ul_dmrs_symb_pos
;
uint16_t
*
ptrsSymbPos
=
&
pusch_vars
->
ptrs_symbols
;
uint8_t
*
ptrsSymbIdx
=
&
pusch_vars
->
ptrs_symbol_index
;
uint8_t
*
dmrsConfigType
=
&
rel15_ul
->
dmrs_config_type
;
uint16_t
*
nb_rb
=
&
rel15_ul
->
rb_size
;
uint8_t
*
ptrsReOffset
=
&
rel15_ul
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
;
...
...
@@ -548,7 +547,6 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
/*------------------------------------------------------------------------------------------------------- */
nr_ptrs_cpe_estimation
(
*
K_ptrs
,
*
ptrsReOffset
,
*
dmrsConfigType
,
*
nb_rb
,
rel15_ul
->
rnti
,
nr_tti_rx
,
...
...
openair1/PHY/NR_REFSIG/ptrs_nr.c
View file @
d247abb5
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_REFSIG/ptrs_nr.h
View file @
d247abb5
...
...
@@ -47,18 +47,14 @@
/************** FUNCTION ******************************************/
int16_t
get_kRE_ref
(
uint8_t
dmrs_antenna_port
,
uint8_t
pusch_dmrs_type
,
uint8_t
resourceElementOffset
);
void
set_ptrs_symb_idx
(
uint16_t
*
ptrs_symbols
,
uint8_t
duration_in_symbols
,
uint8_t
start_symbol
,
uint8_t
L_ptrs
,
uint16_t
ul_
dmrs_symb_pos
);
uint16_t
dmrs_symb_pos
);
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
,
...
...
@@ -93,7 +89,6 @@ int8_t nr_ptrs_process_slot(uint16_t dmrsSymbPos,
/* general function to estimate common phase error based upon PTRS */
void
nr_ptrs_cpe_estimation
(
uint8_t
K_ptrs
,
uint8_t
ptrsReOffset
,
uint8_t
dmrsConfigType
,
uint16_t
nb_rb
,
uint16_t
rnti
,
unsigned
char
Ns
,
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
d247abb5
...
...
@@ -117,11 +117,11 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
uint8_t
is_ptrs_re
=
0
;
if
(
rel15
->
pduBitmap
&
0x1
)
{
set_ptrs_symb_idx
(
&
dlPtrsSymPos
,
rel15
->
NrOfSymbols
,
rel15
->
StartSymbolIndex
,
1
<<
rel15
->
PTRSTimeDensity
,
rel15
->
dlDmrsSymbPos
);
n_ptrs
=
(
rel15
->
rbSize
+
rel15
->
PTRSFreqDensity
-
1
)
/
rel15
->
PTRSFreqDensity
;
rel15
->
NrOfSymbols
,
rel15
->
StartSymbolIndex
,
1
<<
rel15
->
PTRSTimeDensity
,
rel15
->
dlDmrsSymbPos
);
n_ptrs
=
(
rel15
->
rbSize
+
rel15
->
PTRSFreqDensity
-
1
)
/
rel15
->
PTRSFreqDensity
;
}
/// CRC, coding, interleaving and rate matching
...
...
@@ -303,13 +303,13 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
ptrs_idx
=
0
;
int16_t
*
mod_ptrs
=
NULL
;
if
(
rel15
->
pduBitmap
&
0x1
)
{
ptrs_symbol
=
is_ptrs_symbol
(
l
,
dlPtrsSymPos
);
ptrs_symbol
=
is_ptrs_symbol
(
l
,
dlPtrsSymPos
);
if
(
ptrs_symbol
)
{
/* PTRS QPSK Modulation for each OFDM symbol in a slot */
LOG_D
(
PHY
,
"Doing ptrs modulation for symbol %d, n_ptrs %d
\n
"
,
l
,
n_ptrs
);
int16_t
mod_ptrsBuf
[
n_ptrs
<<
1
]
__attribute__
((
aligned
(
16
)));
mod_ptrs
=
mod_ptrsBuf
;
nr_modulation
(
pdsch_dmrs
[
l
][
rel15
->
SCID
],
(
n_ptrs
<<
1
),
DMRS_MOD_ORDER
,
mod_ptrs
);
mod_ptrs
=
mod_ptrsBuf
;
nr_modulation
(
pdsch_dmrs
[
l
][
rel15
->
SCID
],
(
n_ptrs
<<
1
),
DMRS_MOD_ORDER
,
mod_ptrs
);
}
}
uint16_t
k
=
start_sc
;
...
...
@@ -323,8 +323,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
if
(
ptrs_symbol
){
is_ptrs_re
=
is_ptrs_subcarrier
(
k
,
rel15
->
rnti
,
nl
,
rel15
->
dmrsConfigType
,
rel15
->
PTRSFreqDensity
,
rel15
->
rbSize
,
rel15
->
PTRSReOffset
,
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
d247abb5
...
...
@@ -1777,7 +1777,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
uint16_t
*
ptrsSymbPos
=
NULL
;
uint8_t
*
ptrsSymbIdx
=
NULL
;
uint8_t
*
ptrsReOffset
=
NULL
;
uint8_t
*
dmrsConfigType
=
NULL
;
uint16_t
*
nb_rb
=
NULL
;
int
nscid
=
0
;
...
...
@@ -1789,7 +1788,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
K_ptrs
=
&
dlsch
[
0
].
dlsch_config
.
PTRSFreqDensity
;
dmrsSymbPos
=
&
dlsch
[
0
].
dlsch_config
.
dlDmrsSymbPos
;
ptrsReOffset
=
&
dlsch
[
0
].
dlsch_config
.
PTRSReOffset
;
dmrsConfigType
=
&
dlsch
[
0
].
dlsch_config
.
dmrsConfigType
;
nb_rb
=
&
dlsch
[
0
].
dlsch_config
.
number_rbs
;
ptrsSymbPos
=
&
dlsch
[
0
].
ptrs_symbols
;
ptrsSymbIdx
=
&
dlsch
[
0
].
ptrs_symbol_index
;
...
...
@@ -1803,7 +1801,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
K_ptrs
=
&
dlsch
[
1
].
dlsch_config
.
PTRSFreqDensity
;
dmrsSymbPos
=
&
dlsch
[
1
].
dlsch_config
.
dlDmrsSymbPos
;
ptrsReOffset
=
&
dlsch
[
1
].
dlsch_config
.
PTRSReOffset
;
dmrsConfigType
=
&
dlsch
[
1
].
dlsch_config
.
dmrsConfigType
;
nb_rb
=
&
dlsch
[
1
].
dlsch_config
.
number_rbs
;
ptrsSymbPos
=
&
dlsch
[
1
].
ptrs_symbols
;
ptrsSymbIdx
=
&
dlsch
[
1
].
ptrs_symbol_index
;
...
...
@@ -1844,7 +1841,9 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
/*------------------------------------------------------------------------------------------------------- */
/* 1) Estimate common phase error per PTRS symbol */
/*------------------------------------------------------------------------------------------------------- */
nr_ptrs_cpe_estimation
(
*
K_ptrs
,
*
ptrsReOffset
,
*
dmrsConfigType
,
*
nb_rb
,
nr_ptrs_cpe_estimation
(
*
K_ptrs
,
*
ptrsReOffset
,
*
nb_rb
,
rnti
,
nr_slot_rx
,
symbol
,
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
d247abb5
...
...
@@ -602,7 +602,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
ue
,
nbRx
,
ptrs_phase_per_slot
,
ptrs_re_per_slot
,
rx_size_symbol
,
rxdataF_comp
,
frame_parms
,
dlsch0_harq
,
dlsch1_harq
,
gNB_id
,
nr_slot_rx
,
symbol
,
(
nb_rb_pdsch
*
12
),
dlsch
[
0
].
rnti
,
dlsch
);
dl_valid_re
[
symbol
-
1
]
-=
ptrs_re_per_slot
[
0
][
symbol
];
}
/* at last symbol in a slot calculate LLR's for whole slot */
if
(
symbol
==
(
startSymbIdx
+
nbSymb
-
1
))
{
uint8_t
nb_re_dmrs
;
...
...
@@ -1156,17 +1156,13 @@ void nr_dlsch_scale_channel(uint32_t rx_size_symbol,
//compute average channel_level on each (TX,RX) antenna pair
void
nr_dlsch_channel_level
(
uint32_t
rx_size_symbol
,
int32_t
dl_ch_estimates_ext
[][
rx_size_symbol
],
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
n_tx
,
int32_t
*
avg
,
uint8_t
symbol
,
uint32_t
len
,
unsigned
short
nb_rb
)
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
n_tx
,
int32_t
*
avg
,
uint8_t
symbol
,
uint32_t
len
,
unsigned
short
nb_rb
)
{
short
rb
;
unsigned
char
aatx
,
aarx
;
simde__m128i
*
dl_ch128
,
avg128D
;
//nb_rb*nre = y * 2^x
...
...
@@ -1178,14 +1174,14 @@ void nr_dlsch_channel_level(uint32_t rx_size_symbol,
AssertFatal
(
y
!=
0
,
"Cannot divide by zero: in function %s of file %s
\n
"
,
__func__
,
__FILE__
);
for
(
aatx
=
0
;
aatx
<
n_tx
;
aatx
++
)
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
int
aatx
=
0
;
aatx
<
n_tx
;
aatx
++
)
{
for
(
int
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
//clear average level
avg128D
=
simde_mm_setzero_si128
();
dl_ch128
=
(
simde__m128i
*
)
dl_ch_estimates_ext
[(
aatx
*
frame_parms
->
nb_antennas_rx
)
+
aarx
];
dl_ch128
=
(
simde__m128i
*
)
dl_ch_estimates_ext
[(
aatx
*
frame_parms
->
nb_antennas_rx
)
+
aarx
];
for
(
rb
=
0
;
rb
<
nb_rb_0
;
rb
++
)
{
for
(
int
rb
=
0
;
rb
<
nb_rb_0
;
rb
++
)
{
avg128D
=
simde_mm_add_epi32
(
avg128D
,
simde_mm_srai_epi32
(
simde_mm_madd_epi16
(
dl_ch128
[
0
],
dl_ch128
[
0
]),
x
));
avg128D
=
simde_mm_add_epi32
(
avg128D
,
simde_mm_srai_epi32
(
simde_mm_madd_epi16
(
dl_ch128
[
1
],
dl_ch128
[
1
]),
x
));
avg128D
=
simde_mm_add_epi32
(
avg128D
,
simde_mm_srai_epi32
(
simde_mm_madd_epi16
(
dl_ch128
[
2
],
dl_ch128
[
2
]),
x
));
...
...
@@ -1195,10 +1191,10 @@ void nr_dlsch_channel_level(uint32_t rx_size_symbol,
avg
[(
aatx
*
frame_parms
->
nb_antennas_rx
)
+
aarx
]
=
(((
int32_t
*
)
&
avg128D
)[
0
]
+
((
int32_t
*
)
&
avg128D
)[
1
]
+
((
int32_t
*
)
&
avg128D
)[
2
]
+
((
int32_t
*
)
&
avg128D
)[
3
])
/
y
;
// printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
((
int32_t
*
)
&
avg128D
)[
3
])
/
y
;
// printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
}
}
simde_mm_empty
();
simde_m_empty
();
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
d247abb5
...
...
@@ -425,8 +425,6 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
}
else
if
(
is_ptrs_sym
)
{
is_ptrs
=
is_ptrs_subcarrier
(
k
,
rnti
,
nl
,
dmrs_type
,
K_ptrs
,
nb_rb
,
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
,
...
...
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