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
Michael Black
OpenXG-RAN
Commits
bf370cc5
Commit
bf370cc5
authored
Nov 05, 2022
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed correlation computation in pucch_rx.c
parent
96622f6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
11 deletions
+33
-11
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+33
-11
No files found.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
bf370cc5
...
...
@@ -53,7 +53,7 @@
#include "T.h"
#define DEBUG_NR_PUCCH_RX 1
//
#define DEBUG_NR_PUCCH_RX 1
NR_gNB_PUCCH_t
*
new_gNB_pucch
(
void
){
NR_gNB_PUCCH_t
*
pucch
;
...
...
@@ -1515,31 +1515,50 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
#endif
prod_re
[
aa
]
=
simde_mm256_hadds_epi16
(
prod_re
[
aa
],
prod_re
[
aa
]);
// 0+1
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"0.prod_re[%d] => (%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)
\n
"
,
aa
,
((
int16_t
*
)
&
prod_re
[
aa
])[
0
],((
int16_t
*
)
&
prod_re
[
aa
])[
1
],((
int16_t
*
)
&
prod_re
[
aa
])[
2
],((
int16_t
*
)
&
prod_re
[
aa
])[
3
],
((
int16_t
*
)
&
prod_re
[
aa
])[
4
],((
int16_t
*
)
&
prod_re
[
aa
])[
5
],((
int16_t
*
)
&
prod_re
[
aa
])[
6
],((
int16_t
*
)
&
prod_re
[
aa
])[
7
],
((
int16_t
*
)
&
prod_re
[
aa
])[
8
],((
int16_t
*
)
&
prod_re
[
aa
])[
9
],((
int16_t
*
)
&
prod_re
[
aa
])[
10
],((
int16_t
*
)
&
prod_re
[
aa
])[
11
],
((
int16_t
*
)
&
prod_re
[
aa
])[
12
],((
int16_t
*
)
&
prod_re
[
aa
])[
13
],((
int16_t
*
)
&
prod_re
[
aa
])[
14
],((
int16_t
*
)
&
prod_re
[
aa
])[
15
]);
#endif
prod_im
[
aa
]
=
simde_mm256_hadds_epi16
(
prod_im
[
aa
],
prod_im
[
aa
]);
prod_re
[
aa
]
=
simde_mm256_hadds_epi16
(
prod_re
[
aa
],
prod_re
[
aa
]);
// 0+1+2+3
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"1.prod_re[%d] => (%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)
\n
"
,
aa
,
((
int16_t
*
)
&
prod_re
[
aa
])[
0
],((
int16_t
*
)
&
prod_re
[
aa
])[
1
],((
int16_t
*
)
&
prod_re
[
aa
])[
2
],((
int16_t
*
)
&
prod_re
[
aa
])[
3
],
((
int16_t
*
)
&
prod_re
[
aa
])[
4
],((
int16_t
*
)
&
prod_re
[
aa
])[
5
],((
int16_t
*
)
&
prod_re
[
aa
])[
6
],((
int16_t
*
)
&
prod_re
[
aa
])[
7
],
((
int16_t
*
)
&
prod_re
[
aa
])[
8
],((
int16_t
*
)
&
prod_re
[
aa
])[
9
],((
int16_t
*
)
&
prod_re
[
aa
])[
10
],((
int16_t
*
)
&
prod_re
[
aa
])[
11
],
((
int16_t
*
)
&
prod_re
[
aa
])[
12
],((
int16_t
*
)
&
prod_re
[
aa
])[
13
],((
int16_t
*
)
&
prod_re
[
aa
])[
14
],((
int16_t
*
)
&
prod_re
[
aa
])[
15
]);
#endif
prod_im
[
aa
]
=
simde_mm256_hadds_epi16
(
prod_im
[
aa
],
prod_im
[
aa
]);
prod_re
[
aa
]
=
simde_mm256_hadds_epi16
(
prod_re
[
aa
],
prod_re
[
aa
]);
// 0+1+2+3+4+5+6+7
prod_im
[
aa
]
=
simde_mm256_hadds_epi16
(
prod_im
[
aa
],
prod_im
[
aa
]);
prod_re
[
aa
]
=
simde_mm256_hadds_epi16
(
prod_re
[
aa
],
prod_re
[
aa
]);
// 0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"2.prod_re[%d] => (%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)
\n
"
,
aa
,
((
int16_t
*
)
&
prod_re
[
aa
])[
0
],((
int16_t
*
)
&
prod_re
[
aa
])[
1
],((
int16_t
*
)
&
prod_re
[
aa
])[
2
],((
int16_t
*
)
&
prod_re
[
aa
])[
3
],
((
int16_t
*
)
&
prod_re
[
aa
])[
4
],((
int16_t
*
)
&
prod_re
[
aa
])[
5
],((
int16_t
*
)
&
prod_re
[
aa
])[
6
],((
int16_t
*
)
&
prod_re
[
aa
])[
7
],
((
int16_t
*
)
&
prod_re
[
aa
])[
8
],((
int16_t
*
)
&
prod_re
[
aa
])[
9
],((
int16_t
*
)
&
prod_re
[
aa
])[
10
],((
int16_t
*
)
&
prod_re
[
aa
])[
11
],
((
int16_t
*
)
&
prod_re
[
aa
])[
12
],((
int16_t
*
)
&
prod_re
[
aa
])[
13
],((
int16_t
*
)
&
prod_re
[
aa
])[
14
],((
int16_t
*
)
&
prod_re
[
aa
])[
15
]);
#endif
prod_im
[
aa
]
=
simde_mm256_hadds_epi16
(
prod_im
[
aa
],
prod_im
[
aa
]);
}
int64_t
corr_re
=
0
,
corr_im
=
0
;
for
(
int
aa
=
0
;
aa
<
Prx
;
aa
++
)
{
corr_re
=
(
corr32_re
[
symb
][
group
][
aa
]
+
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
]
+
((
int16_t
*
)(
&
prod_re
[
aa
]))[
8
]);
corr_im
=
(
corr32_im
[
symb
][
group
][
aa
]
+
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
]
+
((
int16_t
*
)(
&
prod_im
[
aa
]))[
8
]);
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"pucch2 cw %d group %d aa %d: (%d,%d)+(%d,%d) = (%d,%d)
\n
"
,
cw
,
group
,
aa
,
corr32_re
[
symb
][
group
][
aa
],
corr32_im
[
symb
][
group
][
aa
],
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
],
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
],
corr32_re
[
symb
][
group
][
aa
]
+
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
],
corr32_im
[
symb
][
group
][
aa
]
+
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
]
);
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
]
+
((
int16_t
*
)(
&
prod_re
[
aa
]))[
8
]
,
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
]
+
((
int16_t
*
)(
&
prod_im
[
aa
]))[
8
]
,
corr_re
,
corr_im
);
#endif
corr_re
=
(
corr32_re
[
symb
][
group
][
aa
]
+
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
]);
corr_im
=
(
corr32_im
[
symb
][
group
][
aa
]
+
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
]);
corr_tmp
+=
corr_re
*
corr_re
+
corr_im
*
corr_im
;
}
// aa loop
}
// group loop
...
...
@@ -1547,11 +1566,14 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
if
(
corr_tmp
>
corr
)
{
corr
=
corr_tmp
;
cw_ML
=
cw
;
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"slot %d PUCCH2 cw_ML %d, corr %llu
\n
"
,
slot
,
cw_ML
,
corr
);
#endif
}
}
// cw loop
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"slot %d PUCCH2 cw_ML %d, metric %d
dB
\n
"
,
slot
,
cw_ML
,
corr_dB
);
printf
(
"slot %d PUCCH2 cw_ML %d, metric %d
\n
"
,
slot
,
cw_ML
,
corr_dB
);
#endif
decodedPayload
[
0
]
=
(
uint64_t
)
cw_ML
;
}
...
...
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