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
29913701
Commit
29913701
authored
Aug 25, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
32byte aligned DLSCH RX symbol size
parent
cda82edf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
61 deletions
+51
-61
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+6
-6
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+44
-54
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+1
-1
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
29913701
...
...
@@ -1633,7 +1633,7 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
nr_slot_rx
,
symbol
,
frame_parms
->
ofdm_symbol_size
,
(
int16_t
*
)(
rxdataF_comp
[
0
][
aarx
]
+
symbol
*
nb_re_pdsch
),
(
int16_t
*
)(
rxdataF_comp
[
0
][
aarx
]
+
symbol
*
rx_size_symbol
),
gold
,
(
int16_t
*
)
&
phase_per_symbol
[
symbol
],
&
ptrs_re_symbol
[
symbol
]);
...
...
@@ -1654,21 +1654,21 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
}
#ifdef DEBUG_DL_PTRS
LOG_M
(
"ptrsEst.m"
,
"est"
,
ptrs_phase_per_slot
[
aarx
],
frame_parms
->
symbols_per_slot
,
1
,
1
);
LOG_M
(
"rxdataF_bf_ptrs_comp.m"
,
"bf_ptrs_cmp"
,
rxdataF_comp
[
0
][
aarx
]
+
(
*
startSymbIndex
)
*
NR_NB_SC_PER_RB
*
(
*
nb_rb
),
(
*
nb_rb
)
*
NR_NB_SC_PER_RB
*
(
*
nbSymb
),
1
,
1
);
LOG_M
(
"rxdataF_bf_ptrs_comp.m"
,
"bf_ptrs_cmp"
,
rxdataF_comp
[
0
][
aarx
]
+
(
*
startSymbIndex
)
*
rx_size_symbol
,
rx_size_symbol
*
(
*
nbSymb
),
1
,
1
);
#endif
/*------------------------------------------------------------------------------------------------------- */
/* 3) Compensated DMRS based estimated signal with PTRS estimation */
/*--------------------------------------------------------------------------------------------------------*/
for
(
uint8_t
i
=
*
startSymbIndex
;
i
<
symbInSlot
;
i
++
)
{
for
(
uint8_t
i
=
*
startSymbIndex
;
i
<
symbInSlot
;
i
++
)
{
/* DMRS Symbol has 0 phase so no need to rotate the respective symbol */
/* Skip rotation if the slot processing is wrong */
if
((
!
is_dmrs_symbol
(
i
,
*
dmrsSymbPos
))
&&
(
ret
==
0
))
{
if
((
!
is_dmrs_symbol
(
i
,
*
dmrsSymbPos
))
&&
(
ret
==
0
))
{
#ifdef DEBUG_DL_PTRS
printf
(
"[PHY][DL][PTRS]: Rotate Symbol %2d with %d + j* %d
\n
"
,
i
,
phase_per_symbol
[
i
].
r
,
phase_per_symbol
[
i
].
i
);
#endif
rotate_cpx_vector
((
c16_t
*
)
&
rxdataF_comp
[
0
][
aarx
][
(
i
*
(
*
nb_rb
)
*
NR_NB_SC_PER_RB
)
],
rotate_cpx_vector
((
c16_t
*
)
&
rxdataF_comp
[
0
][
aarx
][
i
*
rx_size_symbol
],
&
phase_per_symbol
[
i
],
(
c16_t
*
)
&
rxdataF_comp
[
0
][
aarx
][
(
i
*
(
*
nb_rb
)
*
NR_NB_SC_PER_RB
)
],
(
c16_t
*
)
&
rxdataF_comp
[
0
][
aarx
][
i
*
rx_size_symbol
],
((
*
nb_rb
)
*
NR_NB_SC_PER_RB
),
15
);
}
// if not DMRS Symbol
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
29913701
...
...
@@ -116,7 +116,6 @@ static int nr_dlsch_llr(uint32_t rx_size_symbol,
unsigned
char
harq_pid
,
unsigned
char
first_symbol_flag
,
unsigned
char
symbol
,
unsigned
short
nb_rb
,
int32_t
codeword_TB0
,
int32_t
codeword_TB1
,
uint32_t
len
,
...
...
@@ -221,7 +220,7 @@ void nr_dlsch_scale_channel(uint32_t rx_size_symbol,
uint8_t
pilots
,
uint32_t
len
,
unsigned
short
nb_rb
);
void
nr_dlsch_detection_mrc
(
uint32_t
rx_size_symbol
,
static
void
nr_dlsch_detection_mrc
(
uint32_t
rx_size_symbol
,
short
n_tx
,
short
n_rx
,
int32_t
rxdataF_comp
[][
n_rx
][
rx_size_symbol
*
NR_SYMBOLS_PER_SLOT
],
...
...
@@ -230,7 +229,6 @@ void nr_dlsch_detection_mrc(uint32_t rx_size_symbol,
int32_t
dl_ch_magb
[][
n_rx
][
rx_size_symbol
],
int32_t
dl_ch_magr
[][
n_rx
][
rx_size_symbol
],
unsigned
char
symbol
,
unsigned
short
nb_rb
,
int
length
);
static
bool
overlap_csi_symbol
(
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csi_pdu
,
int
symbol
)
...
...
@@ -596,7 +594,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
dl_ch_magb
,
dl_ch_magr
,
symbol
,
nb_rb_pdsch
,
nb_re_pdsch
);
if
(
nl
>=
2
)
// Apply MMSE for 2, 3, and 4 Tx layers
nr_dlsch_mmse
(
rx_size_symbol
,
...
...
@@ -691,7 +688,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
harq_pid
,
first_symbol_flag
,
i
,
nb_rb_pdsch
,
codeword_TB0
,
codeword_TB1
,
dl_valid_re
[
i
-
1
],
...
...
@@ -877,15 +873,13 @@ static void nr_dlsch_channel_compensation(uint32_t rx_size_symbol,
QAM_amp128r
=
simde_mm_set1_epi16
(
QAM256_n3
);
}
// printf("comp: rxdataF_comp %p, symbol %d\n",rxdataF_comp[0],symbol);
for
(
int
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
dl_ch128
=
(
simde__m128i
*
)
dl_ch_estimates_ext
[(
l
*
frame_parms
->
nb_antennas_rx
)
+
aarx
];
dl_ch_mag128
=
(
simde__m128i
*
)
dl_ch_mag
[
l
][
aarx
];
dl_ch_mag128b
=
(
simde__m128i
*
)
dl_ch_magb
[
l
][
aarx
];
dl_ch_mag128r
=
(
simde__m128i
*
)
dl_ch_magr
[
l
][
aarx
];
rxdataF128
=
(
simde__m128i
*
)
rxdataF_ext
[
aarx
];
rxdataF_comp128
=
(
simde__m128i
*
)(
rxdataF_comp
[
l
][
aarx
]
+
symbol
*
nb_rb
*
12
);
rxdataF_comp128
=
(
simde__m128i
*
)(
rxdataF_comp
[
l
][
aarx
]
+
symbol
*
rx_size_symbol
);
for
(
int
rb
=
0
;
rb
<
nb_rb_0
;
rb
++
)
{
if
(
mod_order
>
2
)
{
...
...
@@ -1260,7 +1254,7 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz,
}
}
void
nr_dlsch_detection_mrc
(
uint32_t
rx_size_symbol
,
static
void
nr_dlsch_detection_mrc
(
uint32_t
rx_size_symbol
,
short
n_tx
,
short
n_rx
,
int32_t
rxdataF_comp
[][
n_rx
][
rx_size_symbol
*
NR_SYMBOLS_PER_SLOT
],
...
...
@@ -1269,28 +1263,25 @@ void nr_dlsch_detection_mrc(uint32_t rx_size_symbol,
int32_t
dl_ch_magb
[][
n_rx
][
rx_size_symbol
],
int32_t
dl_ch_magr
[][
n_rx
][
rx_size_symbol
],
unsigned
char
symbol
,
unsigned
short
nb_rb
,
int
length
)
{
unsigned
char
aatx
,
aarx
;
int
i
;
int
length
)
{
simde__m128i
*
rxdataF_comp128_0
,
*
rxdataF_comp128_1
,
*
dl_ch_mag128_0
,
*
dl_ch_mag128_1
,
*
dl_ch_mag128_0b
,
*
dl_ch_mag128_1b
,
*
dl_ch_mag128_0r
,
*
dl_ch_mag128_1r
;
uint32_t
nb_rb_0
=
length
/
12
+
((
length
%
12
)
?
1
:
0
);
if
(
n_rx
>
1
)
{
for
(
aatx
=
0
;
aatx
<
n_tx
;
aatx
++
)
{
rxdataF_comp128_0
=
(
simde__m128i
*
)(
rxdataF_comp
[
aatx
][
0
]
+
symbol
*
nb_rb
*
12
);
if
(
n_rx
>
1
)
{
for
(
int
aatx
=
0
;
aatx
<
n_tx
;
aatx
++
)
{
rxdataF_comp128_0
=
(
simde__m128i
*
)(
rxdataF_comp
[
aatx
][
0
]
+
symbol
*
rx_size_symbol
);
dl_ch_mag128_0
=
(
simde__m128i
*
)
dl_ch_mag
[
aatx
][
0
];
dl_ch_mag128_0b
=
(
simde__m128i
*
)
dl_ch_magb
[
aatx
][
0
];
dl_ch_mag128_0r
=
(
simde__m128i
*
)
dl_ch_magr
[
aatx
][
0
];
for
(
aarx
=
1
;
aarx
<
n_rx
;
aarx
++
)
{
rxdataF_comp128_1
=
(
simde__m128i
*
)(
rxdataF_comp
[
aatx
][
aarx
]
+
symbol
*
nb_rb
*
12
);
for
(
int
aarx
=
1
;
aarx
<
n_rx
;
aarx
++
)
{
rxdataF_comp128_1
=
(
simde__m128i
*
)(
rxdataF_comp
[
aatx
][
aarx
]
+
symbol
*
rx_size_symbol
);
dl_ch_mag128_1
=
(
simde__m128i
*
)
dl_ch_mag
[
aatx
][
aarx
];
dl_ch_mag128_1b
=
(
simde__m128i
*
)
dl_ch_magb
[
aatx
][
aarx
];
dl_ch_mag128_1r
=
(
simde__m128i
*
)
dl_ch_magr
[
aatx
][
aarx
];
// MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM/256 llr computation)
for
(
i
=
0
;
i
<
nb_rb_0
*
3
;
i
++
)
{
for
(
i
nt
i
=
0
;
i
<
nb_rb_0
*
3
;
i
++
)
{
rxdataF_comp128_0
[
i
]
=
simde_mm_adds_epi16
(
rxdataF_comp128_0
[
i
],
rxdataF_comp128_1
[
i
]);
dl_ch_mag128_0
[
i
]
=
simde_mm_adds_epi16
(
dl_ch_mag128_0
[
i
],
dl_ch_mag128_1
[
i
]);
dl_ch_mag128_0b
[
i
]
=
simde_mm_adds_epi16
(
dl_ch_mag128_0b
[
i
],
dl_ch_mag128_1b
[
i
]);
...
...
@@ -1299,10 +1290,10 @@ void nr_dlsch_detection_mrc(uint32_t rx_size_symbol,
}
}
#ifdef DEBUG_DLSCH_DEMOD
for
(
i
=
0
;
i
<
nb_rb_0
*
3
;
i
++
)
{
printf
(
"symbol%d RB %d
\n
"
,
symbol
,
i
/
3
);
rxdataF_comp128_0
=
(
simde__m128i
*
)(
rxdataF_comp
[
0
][
0
]
+
symbol
*
nb_rb
*
12
);
rxdataF_comp128_1
=
(
simde__m128i
*
)(
rxdataF_comp
[
0
][
n_rx
]
+
symbol
*
nb_rb
*
12
);
for
(
i
nt
i
=
0
;
i
<
nb_rb_0
*
3
;
i
++
)
{
printf
(
"symbol%d RB %d
\n
"
,
symbol
,
i
/
3
);
rxdataF_comp128_0
=
(
simde__m128i
*
)(
rxdataF_comp
[
0
][
0
]
+
symbol
*
rx_size_symbol
);
rxdataF_comp128_1
=
(
simde__m128i
*
)(
rxdataF_comp
[
0
][
n_rx
]
+
symbol
*
rx_size_symbol
);
print_shorts
(
"tx 1 mrc_re/mrc_Im:"
,(
int16_t
*
)
&
rxdataF_comp128_0
[
i
]);
print_shorts
(
"tx 2 mrc_re/mrc_Im:"
,(
int16_t
*
)
&
rxdataF_comp128_1
[
i
]);
// printf("mrc mag0 = %d = %d \n",((int16_t*)&dl_ch_mag128_0[0])[0],((int16_t*)&dl_ch_mag128_0[0])[1]);
...
...
@@ -1891,7 +1882,6 @@ static int nr_dlsch_llr(uint32_t rx_size_symbol,
unsigned
char
harq_pid
,
unsigned
char
first_symbol_flag
,
unsigned
char
symbol
,
unsigned
short
nb_rb
,
int32_t
codeword_TB0
,
int32_t
codeword_TB1
,
uint32_t
len
,
...
...
@@ -1908,22 +1898,22 @@ static int nr_dlsch_llr(uint32_t rx_size_symbol,
switch
(
dlsch
[
0
].
dlsch_config
.
qamModOrder
)
{
case
2
:
for
(
int
l
=
0
;
l
<
dlsch
[
0
].
Nl
;
l
++
)
nr_qpsk_llr
(
&
rxdataF_comp
[
l
][
0
][
symbol
*
nb_rb
*
12
],
layer_llr
[
l
]
+
llr_offset_symbol
,
len
);
nr_qpsk_llr
(
&
rxdataF_comp
[
l
][
0
][
symbol
*
rx_size_symbol
],
layer_llr
[
l
]
+
llr_offset_symbol
,
len
);
break
;
case
4
:
for
(
int
l
=
0
;
l
<
dlsch
[
0
].
Nl
;
l
++
)
nr_16qam_llr
(
&
rxdataF_comp
[
l
][
0
][
symbol
*
nb_rb
*
12
],
dl_ch_mag
,
layer_llr
[
l
]
+
llr_offset_symbol
,
len
);
nr_16qam_llr
(
&
rxdataF_comp
[
l
][
0
][
symbol
*
rx_size_symbol
],
dl_ch_mag
,
layer_llr
[
l
]
+
llr_offset_symbol
,
len
);
break
;
case
6
:
for
(
int
l
=
0
;
l
<
dlsch
[
0
].
Nl
;
l
++
)
nr_64qam_llr
(
&
rxdataF_comp
[
l
][
0
][
symbol
*
nb_rb
*
12
],
dl_ch_mag
,
dl_ch_magb
,
layer_llr
[
l
]
+
llr_offset_symbol
,
len
);
nr_64qam_llr
(
&
rxdataF_comp
[
l
][
0
][
symbol
*
rx_size_symbol
],
dl_ch_mag
,
dl_ch_magb
,
layer_llr
[
l
]
+
llr_offset_symbol
,
len
);
break
;
case
8
:
for
(
int
l
=
0
;
l
<
dlsch
[
0
].
Nl
;
l
++
)
nr_256qam_llr
(
&
rxdataF_comp
[
l
][
0
][
symbol
*
nb_rb
*
12
],
dl_ch_mag
,
dl_ch_magb
,
dl_ch_magr
,
layer_llr
[
l
]
+
llr_offset_symbol
,
len
);
nr_256qam_llr
(
&
rxdataF_comp
[
l
][
0
][
symbol
*
rx_size_symbol
],
dl_ch_mag
,
dl_ch_magb
,
dl_ch_magr
,
layer_llr
[
l
]
+
llr_offset_symbol
,
len
);
break
;
default:
...
...
@@ -1936,19 +1926,19 @@ static int nr_dlsch_llr(uint32_t rx_size_symbol,
if
(
dlsch1_harq
)
{
switch
(
dlsch
[
1
].
dlsch_config
.
qamModOrder
)
{
case
2
:
nr_qpsk_llr
(
&
rxdataF_comp
[
0
][
0
][
symbol
*
nb_rb
*
12
],
layer_llr
[
0
]
+
llr_offset_symbol
,
len
);
nr_qpsk_llr
(
&
rxdataF_comp
[
0
][
0
][
symbol
*
rx_size_symbol
],
layer_llr
[
0
]
+
llr_offset_symbol
,
len
);
break
;
case
4
:
nr_16qam_llr
(
&
rxdataF_comp
[
0
][
0
][
symbol
*
nb_rb
*
12
],
dl_ch_mag
,
layer_llr
[
0
]
+
llr_offset_symbol
,
len
);
nr_16qam_llr
(
&
rxdataF_comp
[
0
][
0
][
symbol
*
rx_size_symbol
],
dl_ch_mag
,
layer_llr
[
0
]
+
llr_offset_symbol
,
len
);
break
;
case
6
:
nr_64qam_llr
(
&
rxdataF_comp
[
0
][
0
][
symbol
*
nb_rb
*
12
],
dl_ch_mag
,
dl_ch_magb
,
layer_llr
[
0
]
+
llr_offset_symbol
,
len
);
nr_64qam_llr
(
&
rxdataF_comp
[
0
][
0
][
symbol
*
rx_size_symbol
],
dl_ch_mag
,
dl_ch_magb
,
layer_llr
[
0
]
+
llr_offset_symbol
,
len
);
break
;
case
8
:
nr_256qam_llr
(
&
rxdataF_comp
[
0
][
0
][
symbol
*
nb_rb
*
12
],
dl_ch_mag
,
dl_ch_magb
,
dl_ch_magr
,
layer_llr
[
0
]
+
llr_offset_symbol
,
len
);
nr_256qam_llr
(
&
rxdataF_comp
[
0
][
0
][
symbol
*
rx_size_symbol
],
dl_ch_mag
,
dl_ch_magb
,
dl_ch_magr
,
layer_llr
[
0
]
+
llr_offset_symbol
,
len
);
break
;
default:
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
29913701
...
...
@@ -509,7 +509,7 @@ static int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
int32_t
ptrs_re_per_slot
[
ue
->
frame_parms
.
nb_antennas_rx
][
NR_SYMBOLS_PER_SLOT
];
memset
(
ptrs_re_per_slot
,
0
,
sizeof
(
ptrs_re_per_slot
));
const
uint32_t
rx_size_symbol
=
dlsch
[
0
].
dlsch_config
.
number_rbs
*
NR_NB_SC_PER_RB
;
const
uint32_t
rx_size_symbol
=
(
dlsch
[
0
].
dlsch_config
.
number_rbs
*
NR_NB_SC_PER_RB
+
15
)
&
~
15
;
__attribute__
((
aligned
(
32
)))
int32_t
rxdataF_comp
[
dlsch
[
0
].
Nl
][
ue
->
frame_parms
.
nb_antennas_rx
][
rx_size_symbol
*
NR_SYMBOLS_PER_SLOT
];
memset
(
rxdataF_comp
,
0
,
sizeof
(
rxdataF_comp
));
...
...
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