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
e21a0996
Commit
e21a0996
authored
Mar 15, 2023
by
Roberto Louro Magueta
Committed by
rmagueta
Jun 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compute LLR for QPSK for ML
parent
8fffe50a
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
325 additions
and
16 deletions
+325
-16
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+12
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+49
-16
openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
+264
-0
No files found.
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
e21a0996
...
...
@@ -292,6 +292,18 @@ void nr_ulsch_compute_llr(int32_t *rxdataF_comp,
void
reset_active_stats
(
PHY_VARS_gNB
*
gNB
,
int
frame
);
void
reset_active_ulsch
(
PHY_VARS_gNB
*
gNB
,
int
frame
);
void
nr_ulsch_compute_ML_llr
(
int32_t
**
rxdataF_comp
,
int32_t
***
rho
,
int16_t
**
llr_layers
,
uint8_t
nb_antennas_rx
,
uint32_t
rb_size
,
uint32_t
nb_re
,
uint8_t
symbol
,
uint32_t
rxdataF_ext_offset
,
uint8_t
mod_order
);
void
nr_ulsch_shift_llr
(
int16_t
**
llr_layers
,
uint32_t
nb_re
,
uint32_t
rxdataF_ext_offset
,
uint8_t
mod_order
,
int
shift
);
void
nr_fill_ulsch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
e21a0996
...
...
@@ -12,6 +12,7 @@
//#define DEBUG_CH_COMP
//#define DEBUG_RB_EXT
//#define DEBUG_CH_MAG
//#define ML_DEBUG
#define INVALID_VALUE 255
...
...
@@ -1898,6 +1899,9 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
unsigned
char
harq_pid
)
{
// Temporary flag: (true) ML receiver, (false) MMSE receiver
bool
ml_rx
=
true
;
uint8_t
aarx
,
aatx
;
uint32_t
nb_re_pusch
,
bwp_start_subcarrier
;
int
avgs
=
0
;
...
...
@@ -2001,8 +2005,8 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
int
ad_shift
=
0
;
if
(
rel15_ul
->
nrOfLayers
==
1
)
{
ad_shift
=
1
+
log2_approx
(
frame_parms
->
nb_antennas_rx
>>
2
);
}
else
{
ad_shift
=
-
3
;
// For 2-layers, we are already doing a bit shift in the nr_ulsch_
zero_forcing_rx
_2layers() function, so we can use more bits
}
else
if
(
ml_rx
==
false
)
{
ad_shift
=
-
3
;
// For 2-layers, we are already doing a bit shift in the nr_ulsch_
mmse
_2layers() function, so we can use more bits
}
for
(
uint8_t
symbol
=
rel15_ul
->
start_symbol_index
;
symbol
<
(
rel15_ul
->
start_symbol_index
+
rel15_ul
->
nr_of_symbols
);
symbol
++
)
{
...
...
@@ -2108,7 +2112,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
nb_re_pusch
);
// Apply MMSE for 2 Tx layers
if
(
rel15_ul
->
nrOfLayers
==
2
)
{
if
(
ml_rx
==
false
&&
rel15_ul
->
nrOfLayers
==
2
)
{
nr_ulsch_mmse_2layers
(
frame_parms
,
pusch_vars
->
rxdataF_comp
,
pusch_vars
->
ul_ch_mag0
,
...
...
@@ -2159,17 +2163,46 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
/*-------------------- LLRs computation -------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------------------------*/
start_meas
(
&
gNB
->
ulsch_llr_stats
);
if
(
ml_rx
==
false
||
rel15_ul
->
nrOfLayers
==
1
)
{
for
(
aatx
=
0
;
aatx
<
rel15_ul
->
nrOfLayers
;
aatx
++
)
{
nr_ulsch_compute_llr
(
&
pusch_vars
->
rxdataF_comp
[
aatx
*
frame_parms
->
nb_antennas_rx
][
symbol
*
(
off
+
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
)],
pusch_vars
->
ul_ch_mag0
[
aatx
*
frame_parms
->
nb_antennas_rx
],
pusch_vars
->
ul_ch_magb0
[
aatx
*
frame_parms
->
nb_antennas_rx
],
pusch_vars
->
ul_ch_magc0
[
aatx
*
frame_parms
->
nb_antennas_rx
],
nr_ulsch_compute_llr
(
&
pusch_vars
->
rxdataF_comp
[
aatx
*
frame_parms
->
nb_antennas_rx
][
symbol
*
(
off
+
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
)],
pusch_vars
->
ul_ch_mag0
[
aatx
*
frame_parms
->
nb_antennas_rx
],
pusch_vars
->
ul_ch_magb0
[
aatx
*
frame_parms
->
nb_antennas_rx
],
pusch_vars
->
ul_ch_magc0
[
aatx
*
frame_parms
->
nb_antennas_rx
],
&
pusch_vars
->
llr_layers
[
aatx
][
rxdataF_ext_offset
*
rel15_ul
->
qam_mod_order
],
rel15_ul
->
rb_size
,
pusch_vars
->
ul_valid_re_per_slot
[
symbol
],
symbol
,
rel15_ul
->
qam_mod_order
);
}
}
else
{
nr_ulsch_compute_ML_llr
(
pusch_vars
->
rxdataF_comp
,
pusch_vars
->
rho
,
pusch_vars
->
llr_layers
,
frame_parms
->
nb_antennas_rx
,
rel15_ul
->
rb_size
,
nb_re_pusch
,
symbol
,
rxdataF_ext_offset
,
rel15_ul
->
qam_mod_order
);
if
(
rel15_ul
->
qam_mod_order
==
2
)
{
nr_ulsch_shift_llr
(
pusch_vars
->
llr_layers
,
nb_re_pusch
,
rxdataF_ext_offset
,
rel15_ul
->
qam_mod_order
,
4
);
}
#ifdef ML_DEBUG
c16_t
*
llr_layers0
=
(
c16_t
*
)
&
pusch_vars
->
llr_layers
[
0
][
rxdataF_ext_offset
*
rel15_ul
->
qam_mod_order
];
c16_t
*
llr_layers1
=
(
c16_t
*
)
&
pusch_vars
->
llr_layers
[
1
][
rxdataF_ext_offset
*
rel15_ul
->
qam_mod_order
];
printf
(
"===============================
\n
"
);
printf
(
"AFTER nr_ulsch_compute_ML_llr()
\n
"
);
printf
(
"===============================
\n
"
);
for
(
int
k
=
0
;
k
<
nb_re_pusch
;
k
++
)
{
printf
(
"[%3i] llr_layers0 = (%6i, %6i), llr_layers1 = (%6i, %6i)
\n
"
,
k
,
llr_layers0
[
k
].
r
,
llr_layers0
[
k
].
i
,
llr_layers1
[
k
].
r
,
llr_layers1
[
k
].
i
);
}
printf
(
"
\n
"
);
#endif
}
stop_meas
(
&
gNB
->
ulsch_llr_stats
);
rxdataF_ext_offset
+=
pusch_vars
->
ul_valid_re_per_slot
[
symbol
];
}
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
View file @
e21a0996
This diff is collapsed.
Click to expand it.
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