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
4ecb0401
Commit
4ecb0401
authored
Apr 28, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Second code simplification in UL channel estimation
parent
65f09fec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
94 deletions
+7
-94
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+7
-94
No files found.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
4ecb0401
...
...
@@ -227,101 +227,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
//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"
);
// Treat first 2 pilots specially (left edge)
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
);
#ifdef DEBUG_PUSCH
LOG_I
(
PHY
,
"In %s ch 0 %d
\n
"
,
__FUNCTION__
,
((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
]));
LOG_I
(
PHY
,
"In %s pilot 0 : rxF - > (%d,%d) (%d) ch -> (%d,%d) (%d), pil -> (%d,%d)
\n
"
,
__FUNCTION__
,
rxF
[
0
],
rxF
[
1
],
dBc
(
rxF
[
0
],
rxF
[
1
]),
ch
[
0
],
ch
[
1
],
dBc
(
ch
[
0
],
ch
[
1
]),
pil
[
0
],
pil
[
1
]);
LOG_I
(
PHY
,
"In %s data 0 : rxF - > (%d,%d) (%d)
\n
"
,
__FUNCTION__
,
rxF
[
2
],
rxF
[
3
],
dBc
(
rxF
[
2
],
rxF
[
3
]));
#endif
multadd_real_vector_complex_scalar
(
fl
,
ch
,
ul_ch
,
8
);
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
%
gNB
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
nushift
+
re_offset
)];
//for (int i= 0; i<8; i++)
//printf("ul_ch addr %p %d\n", ul_ch+i, *(ul_ch+i));
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
);
#ifdef DEBUG_PUSCH
LOG_I
(
PHY
,
"In %s pilot 1 : rxF - > (%d,%d) (%d) ch -> (%d,%d) (%d), pil -> (%d,%d)
\n
"
,
__FUNCTION__
,
rxF
[
0
],
rxF
[
1
],
dBc
(
rxF
[
0
],
rxF
[
1
]),
ch
[
0
],
ch
[
1
],
dBc
(
ch
[
0
],
ch
[
1
]),
pil
[
0
],
pil
[
1
]);
LOG_I
(
PHY
,
"In %s data 1 : rxF - > (%d,%d) (%d)
\n
"
,
__FUNCTION__
,
rxF
[
2
],
rxF
[
3
],
dBc
(
rxF
[
2
],
rxF
[
3
]));
#endif
multadd_real_vector_complex_scalar
(
fml
,
ch
,
ul_ch
,
8
);
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
%
gNB
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
nushift
+
re_offset
)];
//printf("ul_ch addr %p\n",ul_ch);
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
);
#ifdef DEBUG_PUSCH
LOG_I
(
PHY
,
"In %s pilot 2 : rxF - > (%d,%d) (%d) ch -> (%d,%d) (%d), pil -> (%d,%d)
\n
"
,
__FUNCTION__
,
rxF
[
0
],
rxF
[
1
],
dBc
(
rxF
[
0
],
rxF
[
1
]),
ch
[
0
],
ch
[
1
],
dBc
(
ch
[
0
],
ch
[
1
]),
pil
[
0
],
pil
[
1
]);
LOG_I
(
PHY
,
"In %s data 2 : rxF - > (%d,%d) (%d)
\n
"
,
__FUNCTION__
,
rxF
[
2
],
rxF
[
3
],
dBc
(
rxF
[
2
],
rxF
[
3
]));
#endif
multadd_real_vector_complex_scalar
(
fmm
,
ch
,
ul_ch
,
8
);
//for (int i= 0; i<16; i++)
//printf("ul_ch addr %p %d\n", ul_ch+i, *(ul_ch+i));
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
%
gNB
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
nushift
+
re_offset
)];
ul_ch
+=
8
;
LOG_D
(
PHY
,
"PUSCH estimation DMRS type 1, Freq-domain interpolation"
);
for
(
pilot_cnt
=
3
;
pilot_cnt
<
(
6
*
nb_rb_pusch
-
3
);
pilot_cnt
++
)
{
for
(
pilot_cnt
=
0
;
pilot_cnt
<
(
6
*
nb_rb_pusch
-
3
);
pilot_cnt
++
)
{
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
);
...
...
@@ -332,7 +241,11 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
//printf("data %4u: rxF -> (%4d,%4d) (%2d)\n",pilot_cnt, rxF[2], rxF[3], dBc(rxF[2], rxF[3]));
#endif
if
(
pilot_cnt
%
2
==
0
)
{
if
(
pilot_cnt
==
0
)
{
multadd_real_vector_complex_scalar
(
fl
,
ch
,
ul_ch
,
8
);
}
else
if
(
pilot_cnt
==
1
)
{
multadd_real_vector_complex_scalar
(
fml
,
ch
,
ul_ch
,
8
);
}
else
if
(
pilot_cnt
%
2
==
0
)
{
multadd_real_vector_complex_scalar
(
fmm
,
ch
,
ul_ch
,
8
);
ul_ch
+=
8
;
}
else
{
...
...
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