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
lizhongxiao
OpenXG-RAN
Commits
927e2195
Commit
927e2195
authored
Apr 28, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UL channel estimation with a formulation closer to 3GPP, because this will be useful next
parent
badb6cb5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
36 deletions
+72
-36
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+71
-35
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
+1
-1
No files found.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
927e2195
...
...
@@ -76,6 +76,10 @@ void freq2time(uint16_t ofdm_symbol_size,
}
}
// Table 6.4.1.1.3-1/2 from TS 38.211
const
uint16_t
delta1
[
8
]
=
{
0
,
0
,
1
,
1
,
0
,
0
,
1
,
1
};
const
uint16_t
delta2
[
12
]
=
{
0
,
0
,
2
,
2
,
4
,
4
,
0
,
0
,
2
,
2
,
4
,
4
};
int
nr_pusch_channel_estimation
(
PHY_VARS_gNB
*
gNB
,
unsigned
char
Ns
,
unsigned
short
p
,
...
...
@@ -86,7 +90,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
int
pilot
[
3280
]
__attribute__
((
aligned
(
16
)));
unsigned
char
aarx
;
unsigned
short
k
;
unsigned
short
k
0
;
unsigned
int
pilot_cnt
,
re_cnt
;
int16_t
ch
[
2
],
ch_r
[
2
],
ch_l
[
2
],
*
pil
,
*
rxF
,
*
ul_ch
;
int16_t
*
fl
,
*
fm
,
*
fr
,
*
fml
,
*
fmr
,
*
fmm
,
*
fdcl
,
*
fdcr
,
*
fdclh
,
*
fdcrh
;
...
...
@@ -112,18 +116,18 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
symbol_offset
=
gNB
->
frame_parms
.
ofdm_symbol_size
*
symbol
;
k
=
bwp_start_subcarrier
;
k
0
=
bwp_start_subcarrier
;
int
re_offset
;
uint16_t
nb_rb_pusch
=
pusch_pdu
->
rb_size
;
LOG_D
(
PHY
,
"In %s: ch_offset %d, soffset %d, symbol_offset %d
OFDM size %d, Ns = %d, k = %d
symbol %d
\n
"
,
LOG_D
(
PHY
,
"In %s: ch_offset %d, soffset %d, symbol_offset %d
, OFDM size %d, Ns = %d, k0 = %d,
symbol %d
\n
"
,
__FUNCTION__
,
ch_offset
,
soffset
,
symbol_offset
,
gNB
->
frame_parms
.
ofdm_symbol_size
,
Ns
,
k
,
k
0
,
symbol
);
switch
(
nushift
)
{
...
...
@@ -206,31 +210,64 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
}
#endif
for
(
aarx
=
0
;
aarx
<
gNB
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
// Based on Table 6.4.1.1.3-1/2 from TS 38.211
int
delta
=
0
;
//int deltas[3] = {0};
//int n_delta = 0;
if
(
pusch_pdu
->
dmrs_config_type
==
pusch_dmrs_type1
)
{
delta
=
delta1
[
p
];
/*if (pusch_pdu->nrOfLayers <= 2) {
n_delta = 1;
} else {
n_delta = 2;
deltas[1] = 1;
}*/
}
else
{
delta
=
delta2
[
p
];
/*if (pusch_pdu->nrOfLayers <= 2) {
n_delta = 1;
} else if (pusch_pdu->nrOfLayers <= 4) {
n_delta = 2;
deltas[1] = 2;
} else {
n_delta = 3;
deltas[1] = 2;
deltas[2] = 4;
}*/
}
re_offset
=
k
;
/* Initializing the Resource element offset for each Rx antenna */
for
(
aarx
=
0
;
aarx
<
gNB
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
pil
=
(
int16_t
*
)
&
pilot
[
0
];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
k
+
nushift
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
k0
+
nushift
)];
ul_ch
=
(
int16_t
*
)
&
ul_ch_estimates
[
p
*
gNB
->
frame_parms
.
nb_antennas_rx
+
aarx
][
ch_offset
];
re_offset
=
k
;
re_offset
=
k
0
;
memset
(
ul_ch
,
0
,
4
*
(
gNB
->
frame_parms
.
ofdm_symbol_size
));
#ifdef DEBUG_PUSCH
LOG_I
(
PHY
,
"In %s symbol_offset %d, nushift %d
\n
"
,
__FUNCTION__
,
symbol_offset
,
nushift
);
LOG_I
(
PHY
,
"In %s ch est pilot addr %p, N_RB_UL %d
\n
"
,
__FUNCTION__
,
&
pilot
[
0
],
gNB
->
frame_parms
.
N_RB_UL
);
LOG_I
(
PHY
,
"In %s bwp_start_subcarrier %d, k
%d, first_carrier %d, nb_rb_pusch %d
\n
"
,
__FUNCTION__
,
bwp_start_subcarrier
,
k
,
gNB
->
frame_parms
.
first_carrier_offset
,
nb_rb_pusch
);
LOG_I
(
PHY
,
"In %s bwp_start_subcarrier %d, k
0 %d, first_carrier %d, nb_rb_pusch %d
\n
"
,
__FUNCTION__
,
bwp_start_subcarrier
,
k0
,
gNB
->
frame_parms
.
first_carrier_offset
,
nb_rb_pusch
);
LOG_I
(
PHY
,
"In %s rxF addr %p p %d
\n
"
,
__FUNCTION__
,
rxF
,
p
);
LOG_I
(
PHY
,
"In %s ul_ch addr %p nushift %d
\n
"
,
__FUNCTION__
,
ul_ch
,
nushift
);
#endif
//if ((gNB->frame_parms.N_RB_UL&1)==0) {
if
(
pusch_pdu
->
dmrs_config_type
==
pusch_dmrs_type1
&&
gNB
->
prb_interpolation
==
0
){
LOG_D
(
PHY
,
"PUSCH estimation DMRS type 1, Freq-domain interpolation"
);
for
(
pilot_cnt
=
0
;
pilot_cnt
<
6
*
nb_rb_pusch
;
pilot_cnt
++
)
{
// For configuration type 1: k = 4*n + 2*k' + delta,
// where k' is 0 or 1, and delta is in Table 6.4.1.1.3-1 from TS 38.211
pilot_cnt
=
0
;
for
(
int
n
=
0
;
n
<
3
*
nb_rb_pusch
;
n
++
)
{
for
(
int
k_line
=
0
;
k_line
<=
1
;
k_line
++
)
{
pilot_cnt
++
;
re_offset
=
(
k0
+
(
n
<<
2
)
+
(
k_line
<<
1
)
+
delta
)
%
gNB
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
...
...
@@ -258,8 +295,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
}
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
%
gNB
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
nushift
+
re_offset
)];
}
}
// check if PRB crosses DC and improve estimates around DC
...
...
@@ -267,7 +303,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ul_ch
=
(
int16_t
*
)
&
ul_ch_estimates
[
p
*
gNB
->
frame_parms
.
nb_antennas_rx
+
aarx
][
ch_offset
];
uint16_t
idxDC
=
2
*
(
gNB
->
frame_parms
.
ofdm_symbol_size
-
bwp_start_subcarrier
);
uint16_t
idxPil
=
idxDC
/
2
;
re_offset
=
k
;
re_offset
=
k
0
;
pil
=
(
int16_t
*
)
&
pilot
[
0
];
pil
+=
(
idxPil
-
2
);
ul_ch
+=
(
idxDC
-
4
);
...
...
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
View file @
927e2195
...
...
@@ -39,7 +39,7 @@
#include "nr_refsig.h"
#include "PHY/defs_gNB.h"
/
*Table 7.4.1.1.2-1/2 from 38.211 */
/
/ Table 6.4.1.1.3-1/2 from TS 38.211
int
wf1
[
8
][
2
]
=
{{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
}};
int
wt1
[
8
][
2
]
=
{{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
}};
int
wf2
[
12
][
2
]
=
{{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
}};
...
...
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