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
promise
OpenXG-RAN
Commits
72d76c75
Commit
72d76c75
authored
Apr 01, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dft-based pucch0 receiver
parent
0a2e0332
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
26 deletions
+98
-26
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+70
-18
openair1/PHY/TOOLS/lte_dfts.c
openair1/PHY/TOOLS/lte_dfts.c
+4
-0
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+2
-0
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+22
-8
No files found.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
72d76c75
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/lte_dfts.c
View file @
72d76c75
...
@@ -2437,6 +2437,10 @@ static inline void idft16(int16_t *x,int16_t *y)
...
@@ -2437,6 +2437,10 @@ static inline void idft16(int16_t *x,int16_t *y)
#endif
#endif
}
}
void
idft16f
(
int16_t
*
x
,
int16_t
*
y
)
{
idft16
(
x
,
y
);
}
#if defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
#ifdef __AVX2__
// Does two 16-point IDFTS (x[0 .. 15] is 128 LSBs of input vector, x[16..31] is in 128 MSBs)
// Does two 16-point IDFTS (x[0 .. 15] is 128 LSBs of input vector, x[16..31] is in 128 MSBs)
...
...
openair1/PHY/TOOLS/tools_defs.h
View file @
72d76c75
...
@@ -171,6 +171,8 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
...
@@ -171,6 +171,8 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
);
);
*/
*/
void
idft16f
(
int16_t
*
x
,
int16_t
*
y
);
void
idft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
72d76c75
...
@@ -454,8 +454,6 @@ int main(int argc, char **argv)
...
@@ -454,8 +454,6 @@ int main(int argc, char **argv)
for
(
SNR
=
snr0
;
SNR
<=
snr1
;
SNR
=
SNR
+
1
){
for
(
SNR
=
snr0
;
SNR
<=
snr1
;
SNR
=
SNR
+
1
){
ack_nack_errors
=
0
;
ack_nack_errors
=
0
;
n_errors
=
0
;
n_errors
=
0
;
sigma2_dB
=
20
*
log10
((
double
)
amp
/
32767
)
-
SNR
;
sigma2
=
pow
(
10
,
sigma2_dB
/
10
);
for
(
trial
=
0
;
trial
<
n_trials
;
trial
++
)
{
for
(
trial
=
0
;
trial
<
n_trials
;
trial
++
)
{
bzero
(
txdata
[
0
],
frame_length_complex_samples
*
sizeof
(
int
));
bzero
(
txdata
[
0
],
frame_length_complex_samples
*
sizeof
(
int
));
if
(
format
==
0
){
if
(
format
==
0
){
...
@@ -464,7 +462,11 @@ int main(int argc, char **argv)
...
@@ -464,7 +462,11 @@ int main(int argc, char **argv)
else
{
else
{
nr_generate_pucch1
(
UE
,
txdata
,
frame_parms
,
UE
->
pucch_config_dedicated
,
actual_payload
,
amp
,
nr_tti_tx
,
m0
,
nrofSymbols
,
startingSymbolIndex
,
startingPRB
,
startingPRB_intraSlotHopping
,
0
,
nr_bit
);
nr_generate_pucch1
(
UE
,
txdata
,
frame_parms
,
UE
->
pucch_config_dedicated
,
actual_payload
,
amp
,
nr_tti_tx
,
m0
,
nrofSymbols
,
startingSymbolIndex
,
startingPRB
,
startingPRB_intraSlotHopping
,
0
,
nr_bit
);
}
}
for
(
i
=
0
;
i
<
frame_length_complex_samples
;
i
++
)
{
int
tx_lev
=
signal_energy
(
sigma2_dB
=
20
*
log10
((
double
)
amp
/
32767
)
-
SNR
;
sigma2
=
pow
(
10
,
sigma2_dB
/
10
);
for
(
i
=
(
nr_tti_tx
*
frame_parms
->
samples_per_slot
;
i
<
(
nr_tti_tx
+
1
)
*
frame_parms
->
samples_per_slot
;
i
++
)
{
r_re
[
aa
][
i
]
=
((
double
)(((
int16_t
*
)
txdata
[
0
])[(
i
<<
1
)])
/
32767
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
));
r_re
[
aa
][
i
]
=
((
double
)(((
int16_t
*
)
txdata
[
0
])[(
i
<<
1
)])
/
32767
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
));
r_im
[
aa
][
i
]
=
((
double
)(((
int16_t
*
)
txdata
[
0
])[(
i
<<
1
)
+
1
])
/
32767
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
));
r_im
[
aa
][
i
]
=
((
double
)(((
int16_t
*
)
txdata
[
0
])[(
i
<<
1
)
+
1
])
/
32767
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
));
r_re
[
aa
][
i
]
=
r_re
[
0
][
i
]
/
(
sqrt
(
sigma2
/
2
)
+
1
);
r_re
[
aa
][
i
]
=
r_re
[
0
][
i
]
/
(
sqrt
(
sigma2
/
2
)
+
1
);
...
@@ -481,13 +483,26 @@ int main(int argc, char **argv)
...
@@ -481,13 +483,26 @@ int main(int argc, char **argv)
((
int16_t
*
)
txdata
[
aa
])[(
i
<<
1
)
+
1
]
=
(
int16_t
)
round
(
r_im
[
aa
][
i
]
*
32767
);
((
int16_t
*
)
txdata
[
aa
])[(
i
<<
1
)
+
1
]
=
(
int16_t
)
round
(
r_im
[
aa
][
i
]
*
32767
);
}
}
if
(
format
==
0
){
if
(
format
==
0
){
nr_decode_pucch0
(
txdata
,
PUCCH_GroupHopping
,
n_id
,
&
(
payload_received
),
frame_parms
,
amp
,
nr_tti_tx
,
m0
,
nrofSymbols
,
startingSymbolIndex
,
startingPRB
,
nr_bit
);
nfapi_nr_uci_pucch_pdu_format_0_1_t
uci_pdu
;
nfapi_nr_pucch_pdu_t
pucch_pdu
;
pucch_pdu
.
group_hop_flag
=
PUCCH_GroupHopping
&
1
;
pucch_pdu
.
sequence_hop_flag
=
(
PUCCH_GroupHopping
>>
1
)
&
1
;
pucch_pdu
.
bit_len_harq
=
nr_bit
;
pucch_pdu
.
sr_flag
=
0
;
pucch_pdu
.
nr_of_symbols
=
nrofSymbols
;
pucch_pdu
.
hopping_id
=
n_id
;
pucch_pdu
.
initial_cyclic_shift
=
0
;
pucch_pdu
.
start_symbol_index
=
startingSymbolIndex
;
pucch_pdu
.
prb_start
=
startingPRB
;
nr_decode_pucch0
(
txdata
,
frame_parms
,
nr_tti_tx
,
&
uci_pdu
,
&
pucch_pdu
);
if
(
nr_bit
==
1
)
if
(
nr_bit
==
1
)
ack_nack_errors
+=
(
((
actual_payload
^
payload_received
)
&
2
)
>>
1
);
ack_nack_errors
+=
(
actual_payload
^
uci_pdu
.
harq
->
harq_list
[
0
].
harq_value
);
else
else
ack_nack_errors
+=
(((
actual_payload
^
payload_received
)
&
2
)
>>
1
)
+
(((
actual_payload
^
payload_received
)
&
4
)
>>
2
);
ack_nack_errors
+=
((
actual_payload
^
uci_pdu
.
harq
->
harq_list
[
0
].
harq_value
)
+
((
actual_payload
>>
1
)
^
uci_pdu
.
harq
->
harq_list
[
1
].
harq_value
));
free
(
uci_pdu
.
harq
->
harq_list
);
}
}
else
{
else
{
nr_decode_pucch1
(
txdata
,
PUCCH_GroupHopping
,
n_id
,
&
(
payload_received
),
frame_parms
,
amp
,
nr_tti_tx
,
m0
,
nrofSymbols
,
startingSymbolIndex
,
startingPRB
,
startingPRB_intraSlotHopping
,
timeDomainOCC
,
nr_bit
);
nr_decode_pucch1
(
txdata
,
PUCCH_GroupHopping
,
n_id
,
&
(
payload_received
),
frame_parms
,
amp
,
nr_tti_tx
,
m0
,
nrofSymbols
,
startingSymbolIndex
,
startingPRB
,
startingPRB_intraSlotHopping
,
timeDomainOCC
,
nr_bit
);
if
(
nr_bit
==
1
)
if
(
nr_bit
==
1
)
ack_nack_errors
+=
((
actual_payload
^
payload_received
)
&
1
);
ack_nack_errors
+=
((
actual_payload
^
payload_received
)
&
1
);
...
@@ -496,8 +511,7 @@ int main(int argc, char **argv)
...
@@ -496,8 +511,7 @@ int main(int argc, char **argv)
}
}
n_errors
=
((
actual_payload
^
payload_received
)
&
1
)
+
(((
actual_payload
^
payload_received
)
&
2
)
>>
1
)
+
(((
actual_payload
^
payload_received
)
&
4
)
>>
2
)
+
n_errors
;
n_errors
=
((
actual_payload
^
payload_received
)
&
1
)
+
(((
actual_payload
^
payload_received
)
&
2
)
>>
1
)
+
(((
actual_payload
^
payload_received
)
&
4
)
>>
2
)
+
n_errors
;
}
}
printf
(
"Decoded payload is %ld
\n
"
,
payload_received
);
printf
(
"SNR=%f, n_trials=%d, n_bit_errors=%d
\n
"
,
SNR
,
n_trials
,
ack_nack_errors
);
printf
(
"SNR=%f, n_trials=%d, n_bit_errors=%d
\n
"
,
SNR
,
n_trials
,
n_errors
);
if
((
float
)
ack_nack_errors
/
(
float
)(
nr_bit
*
n_trials
)
<=
target_error_rate
){
if
((
float
)
ack_nack_errors
/
(
float
)(
nr_bit
*
n_trials
)
<=
target_error_rate
){
printf
(
"PUCCH test OK
\n
"
);
printf
(
"PUCCH test OK
\n
"
);
break
;
break
;
...
...
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