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
bbe8e16c
Commit
bbe8e16c
authored
May 30, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/nr-ue-channel-level-assert-fix' into integration_2024_w22
parents
c7f1dcfb
8cf8a44e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+22
-19
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
bbe8e16c
...
...
@@ -213,12 +213,10 @@ static void nr_dlsch_channel_compensation(uint32_t rx_size_symbol,
*/
static
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_rx
,
uint8_t
n_tx
,
int32_t
avg
[
MAX_ANT
][
MAX_ANT
],
uint8_t
symbol
,
uint32_t
len
,
unsigned
short
nb_rb
);
uint32_t
len
);
void
nr_dlsch_scale_channel
(
uint32_t
rx_size_symbol
,
int32_t
dl_ch_estimates_ext
[][
rx_size_symbol
],
...
...
@@ -441,8 +439,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
if
(
meas_enabled
)
start_meas
(
&
meas
);
if
(
first_symbol_flag
)
{
int32_t
avg
[
MAX_ANT
][
MAX_ANT
];
nr_dlsch_channel_level
(
rx_size_symbol
,
dl_ch_estimates_ext
,
frame_parms
,
nl
,
avg
,
symbol
,
nb_re_pdsch
,
nb_rb_pdsch
);
int32_t
avg
[
MAX_ANT
][
MAX_ANT
]
=
{};
if
(
nb_re_pdsch
)
nr_dlsch_channel_level
(
rx_size_symbol
,
dl_ch_estimates_ext
,
frame_parms
->
nb_antennas_rx
,
nl
,
avg
,
nb_re_pdsch
);
else
LOG_E
(
NR_PHY
,
"Average channel level is 0: nb_rb_pdsch = %d, nb_re_pdsch = %d
\n
"
,
nb_rb_pdsch
,
nb_re_pdsch
);
int
avgs
=
0
;
int32_t
median
[
MAX_ANT
][
MAX_ANT
];
for
(
int
aatx
=
0
;
aatx
<
nl
;
aatx
++
)
...
...
@@ -1001,33 +1002,35 @@ void nr_dlsch_scale_channel(uint32_t rx_size_symbol,
}
//compute average channel_level on each (TX,RX) antenna pair
/** @brief This function computes the average channel level over all allocated RBs
* and antennas (TX/RX) in order to compute output shift for compensated signal
@param rx_size_symbol
@param dl_ch_estimates_ext Channel estimates in allocated RBs
@param n_rx number of antennas in RX
@param n_tx number of antennas in TX
@param avg Pointer to average signal strength
@param len Number of allocated PDSCH REs
*/
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_rx
,
uint8_t
n_tx
,
int32_t
avg
[
MAX_ANT
][
MAX_ANT
],
uint8_t
symbol
,
uint32_t
len
,
unsigned
short
nb_rb
)
uint32_t
len
)
{
simde__m128i
*
dl_ch128
,
avg128D
;
//nb_rb*nre = y * 2^x
int16_t
x
=
factor2
(
len
);
//x = (x>4) ? 4 : x;
int16_t
y
=
(
len
)
>>
x
;
//printf("len = %d = %d * 2^(%d)\n",len,y,x);
uint32_t
nb_rb_0
=
len
/
12
+
((
len
%
12
)
?
1
:
0
);
AssertFatal
(
y
!=
0
,
"Cannot divide by zero: in function %s of file %s
\n
"
,
__func__
,
__FILE__
);
LOG_D
(
NR_PHY
,
"%s: %d = %d * 2^(%d)
\n
"
,
__func__
,
len
,
y
,
x
);
uint32_t
nb_rb_0
=
len
/
NR_NB_SC_PER_RB
+
((
len
%
NR_NB_SC_PER_RB
)
?
1
:
0
);
for
(
int
aatx
=
0
;
aatx
<
n_tx
;
aatx
++
)
{
for
(
int
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas
_rx
;
aarx
++
)
{
for
(
int
aarx
=
0
;
aarx
<
n
_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
*
n
_rx
)
+
aarx
];
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
));
...
...
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