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
a2dbd7dc
Commit
a2dbd7dc
authored
Aug 10, 2021
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pucch unitary testing
parent
8065e69a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+1
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
+1
-1
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+8
-5
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+1
-1
No files found.
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
a2dbd7dc
...
...
@@ -695,7 +695,7 @@ uint32_t polar_decoder_int16(int16_t *input,
else
if
(
crclen
==
6
)
crc
=
(
uint64_t
)(
crc6
(
A64_flip
,
8
*
offset
+
len
)
>>
26
)
&
0x3f
;
}
#if
1
#if
0
printf("A %llx B %llx|%llx Cprime %llx|%llx (crc %x,rxcrc %llx %d)\n",
Ar,
B[1],B[0],Cprime[1],Cprime[0],crc,
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
View file @
a2dbd7dc
...
...
@@ -30,7 +30,7 @@
* \warning
*/
#define DEBUG_POLAR_ENCODER
//
#define DEBUG_POLAR_ENCODER
//#define DEBUG_POLAR_ENCODER_DCI
//#define DEBUG_POLAR_MATLAB
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
a2dbd7dc
...
...
@@ -1111,6 +1111,8 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
int
l2
=
pucch_pdu
->
start_symbol_index
;
int
re_offset
[
2
];
re_offset
[
0
]
=
12
*
(
pucch_pdu
->
prb_start
+
pucch_pdu
->
bwp_start
)
+
frame_parms
->
first_carrier_offset
;
int
soffset
=
(
slot
&
3
)
*
frame_parms
->
symbols_per_slot
*
frame_parms
->
ofdm_symbol_size
;
if
(
re_offset
[
0
]
>=
frame_parms
->
ofdm_symbol_size
)
re_offset
[
0
]
-=
frame_parms
->
ofdm_symbol_size
;
if
(
pucch_pdu
->
freq_hop_flag
==
0
)
re_offset
[
1
]
=
re_offset
[
0
];
...
...
@@ -1141,7 +1143,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
for
(
int
aa
=
0
;
aa
<
Prx
;
aa
++
){
for
(
int
symb
=
0
;
symb
<
pucch_pdu
->
nr_of_symbols
;
symb
++
)
{
tmp_rp
=
((
int16_t
*
)
&
rxdataF
[
aa
][(
l2
+
symb
)
*
frame_parms
->
ofdm_symbol_size
]);
tmp_rp
=
((
int16_t
*
)
&
rxdataF
[
aa
][
soffset
+
(
l2
+
symb
)
*
frame_parms
->
ofdm_symbol_size
]);
if
(
re_offset
[
symb
]
+
nb_re_pucch
<
frame_parms
->
ofdm_symbol_size
)
{
memcpy1
((
void
*
)
rp
[
aa
][
symb
],(
void
*
)
&
tmp_rp
[
re_offset
[
symb
]
*
2
],
nb_re_pucch
*
sizeof
(
int32_t
));
...
...
@@ -1649,9 +1651,10 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
LOG_D
(
PHY
,
"metric %d dB
\n
"
,
corr_dB
);
}
int
re_off
=
(
12
*
pucch_pdu
->
prb_start
)
+
(
12
*
pucch_pdu
->
bwp_start
)
+
frame_parms
->
first_carrier_offset
;
// estimate CQI for MAC (from antenna port 0 only)
int
SNRtimes10
=
dB_fixed_times10
(
signal_energy_nodc
(
&
rxdataF
[
0
][
soffset
+
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
],
12
*
pucch_pdu
->
prb_size
))
-
(
10
*
gNB
->
measurements
.
n0_power_tot_dB
);
// estimate CQI for MAC (from antenna port 0 only)
int
SNRtimes10
=
dB_fixed_times10
(
signal_energy_nodc
(
&
rxdataF
[
0
][
soffset
+
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
[
0
]],
12
*
pucch_pdu
->
prb_size
))
-
(
10
*
gNB
->
measurements
.
n0_power_tot_dB
);
int
cqi
,
bit_left
;
if
(
SNRtimes10
<
-
640
)
cqi
=
0
;
else
if
(
SNRtimes10
>
635
)
cqi
=
255
;
...
...
@@ -1664,7 +1667,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
uci_pdu
->
pucch_format
=
0
;
uci_pdu
->
ul_cqi
=
cqi
;
uci_pdu
->
timing_advance
=
0xffff
;
// currently not valid
uci_pdu
->
rssi
=
1280
-
(
10
*
dB_fixed
(
32767
*
32767
)
-
dB_fixed_times10
(
signal_energy_nodc
(
&
rxdataF
[
0
][
soffset
+
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
],
12
*
pucch_pdu
->
prb_size
)));
uci_pdu
->
rssi
=
1280
-
(
10
*
dB_fixed
(
32767
*
32767
)
-
dB_fixed_times10
(
signal_energy_nodc
(
&
rxdataF
[
0
][
soffset
+
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
[
0
]
],
12
*
pucch_pdu
->
prb_size
)));
if
(
pucch_pdu
->
bit_len_harq
>
0
)
{
int
harq_bytes
=
pucch_pdu
->
bit_len_harq
>>
3
;
if
((
pucch_pdu
->
bit_len_harq
&
7
)
>
0
)
harq_bytes
++
;
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
a2dbd7dc
...
...
@@ -578,7 +578,7 @@ int main(int argc, char **argv)
gNB
->
rb_mask_ul
[
s
][
rb2
>>
5
]
|=
(
1
<<
(
rb2
&
31
));
}
}
gNB_I0_measurements
(
gNB
,
0
,
gNB
->
frame_parms
.
symbols_per_slot
);
gNB_I0_measurements
(
gNB
,
nr_slot_tx
,
0
,
gNB
->
frame_parms
.
symbols_per_slot
);
if
(
n_trials
==
1
)
printf
(
"rxlev %d (%d dB), sigma2 %f dB, SNR %f, TX %f
\n
"
,
rxlev
,
dB_fixed
(
rxlev
),
sigma2_dB
,
SNR
,
10
*
log10
((
double
)
txlev
*
UE
->
frame_parms
.
ofdm_symbol_size
/
12
));
if
(
format
==
0
){
...
...
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