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
ceaacbd6
Commit
ceaacbd6
authored
Nov 17, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/pucch2-hotfix' into integration_2022_wk46
parents
99a7a7a7
821e3ad5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
11 deletions
+39
-11
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+32
-10
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+7
-1
No files found.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
ceaacbd6
...
...
@@ -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
LOG_I
(
PHY
,
"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
;
}
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
ceaacbd6
...
...
@@ -104,6 +104,7 @@ int main(int argc, char **argv)
int
nr_slot_tx
=
0
;
int
nr_frame_tx
=
0
;
uint64_t
actual_payload
=
0
,
payload_received
;
bool
random_payload
=
true
;
int
nr_bit
=
1
;
// maximum value possible is 2
uint8_t
m0
=
0
;
// higher layer paramater initial cyclic shift
uint8_t
nrofSymbols
=
1
;
//number of OFDM symbols can be 1-2 for format 1
...
...
@@ -317,6 +318,7 @@ int main(int argc, char **argv)
break
;
case
'B'
:
actual_payload
=
atoi
(
optarg
);
random_payload
=
false
;
break
;
case
'T'
:
//nacktoack_flag=(uint8_t)atoi(optarg);
...
...
@@ -379,6 +381,10 @@ int main(int argc, char **argv)
int
do_DTX
=
0
;
if
((
format
<
2
)
&&
(
actual_payload
==
4
))
do_DTX
=
1
;
if
(
random_payload
)
{
srand
(
time
(
NULL
));
// Initialization, should only be called once.
actual_payload
=
rand
();
// Returns a pseudo-random integer between 0 and RAND_MAX.
}
actual_payload
&=
((
1
<<
nr_bit
)
-
1
);
printf
(
"Transmitted payload is %ld, do_DTX = %d
\n
"
,
actual_payload
,
do_DTX
);
...
...
@@ -647,7 +653,7 @@ int main(int argc, char **argv)
if
(
nr_bit
==
1
&&
do_DTX
==
0
)
ack_nack_errors
+=
(
actual_payload
^
(
!
harq_list
[
0
].
harq_value
));
else
if
(
do_DTX
==
0
)
ack_nack_errors
+=
(((
actual_payload
&
1
)
^
(
!
harq_list
[
0
].
harq_value
))
+
((
actual_payload
>>
1
)
^
(
!
harq_list
[
1
].
harq_value
)));
ack_nack_errors
+=
(((
actual_payload
&
1
)
^
(
!
harq_list
[
1
].
harq_value
))
+
((
actual_payload
>>
1
)
^
(
!
harq_list
[
0
].
harq_value
)));
else
if
((
!
confidence_lvl
&&
!
harq_list
[
0
].
harq_value
)
||
(
!
confidence_lvl
&&
nr_bit
==
2
&&
!
harq_list
[
1
].
harq_value
))
ack_nack_errors
++
;
...
...
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