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
65f09fec
Commit
65f09fec
authored
3 years ago
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First code simplification in UL channel estimation
parent
99fde7f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
29 deletions
+13
-29
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+13
-29
No files found.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
65f09fec
...
@@ -321,43 +321,27 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -321,43 +321,27 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
nushift
+
re_offset
)];
ul_ch
+=
8
;
ul_ch
+=
8
;
for
(
pilot_cnt
=
3
;
pilot_cnt
<
(
6
*
nb_rb_pusch
-
3
);
pilot_cnt
+=
2
)
{
for
(
pilot_cnt
=
3
;
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
[
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
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PUSCH
#ifdef DEBUG_PUSCH
printf
(
"pilot %u : rxF - > (%d,%d) (%d) ch -> (%d,%d) (%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
dBc
(
rxF
[
0
],
rxF
[
1
]),
ch
[
0
],
ch
[
1
],
dBc
(
ch
[
0
],
ch
[
1
]),
pil
[
0
],
pil
[
1
]);
printf
(
"pilot %4u: pil -> (%6d,%6d), rxF -> (%4d,%4d), ch -> (%4d,%4d)
\n
"
,
printf
(
"data %u : rxF - > (%d,%d) (%d)
\n
"
,
pilot_cnt
,
rxF
[
2
],
rxF
[
3
],
dBc
(
rxF
[
2
],
rxF
[
3
]));
pilot_cnt
,
pil
[
0
],
pil
[
1
],
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
]);
#endif
//printf("data %4u: rxF -> (%4d,%4d) (%2d)\n",pilot_cnt, rxF[2], rxF[3], dBc(rxF[2], rxF[3]));
multadd_real_vector_complex_scalar
(
fm
,
#endif
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
printf
(
"pilot %u : rxF - > (%d,%d) (%d) ch -> (%d,%d) (%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
dBc
(
rxF
[
0
],
rxF
[
1
]),
ch
[
0
],
ch
[
1
],
dBc
(
ch
[
0
],
ch
[
1
]),
pil
[
0
],
pil
[
1
]);
printf
(
"data %u : rxF - > (%d,%d) (%d)
\n
"
,
pilot_cnt
+
1
,
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++)
if
(
pilot_cnt
%
2
==
0
)
{
//printf("ul_ch addr %p %d\n", ul_ch+i, *(ul_ch+i));
multadd_real_vector_complex_scalar
(
fmm
,
ch
,
ul_ch
,
8
);
ul_ch
+=
8
;
}
else
{
multadd_real_vector_complex_scalar
(
fm
,
ch
,
ul_ch
,
8
);
}
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
%
gNB
->
frame_parms
.
ofdm_symbol_size
;
re_offset
=
(
re_offset
+
2
)
%
gNB
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][
soffset
+
(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
soffset
+
symbol_offset
+
nushift
+
re_offset
)];
ul_ch
+=
8
;
}
}
// Treat first 2 pilots specially (right edge)
// Treat first 2 pilots specially (right edge)
...
...
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