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
常顺宇
OpenXG-RAN
Commits
461990a1
Commit
461990a1
authored
Sep 11, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in pucch2 indication
parent
ae0c02b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+17
-10
No files found.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
461990a1
...
...
@@ -394,7 +394,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
// first bit of bitmap for sr presence and second bit for acknack presence
uci_pdu
->
pduBitmap
=
pucch_pdu
->
sr_flag
|
((
pucch_pdu
->
bit_len_harq
>
0
)
<<
1
);
uci_pdu
->
pucch_format
=
0
;
// format 0
uci_pdu
->
ul_cqi
=
cqi
;
// currently not valid
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
(
&
rxdataF
[
0
][
pucch_pdu
->
start_symbol_index
*
frame_parms
->
ofdm_symbol_size
+
re_offset
],
12
)));
if
(
pucch_pdu
->
bit_len_harq
==
0
)
{
...
...
@@ -1494,7 +1494,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
}
// cw loop
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
LOG_
D
(
PHY
,
"cw_ML %d, metric %d dB
\n
"
,
cw_ML
,
corr_dB
);
LOG_
I
(
PHY
,
"cw_ML %d, metric %d dB
\n
"
,
cw_ML
,
corr_dB
);
decodedPayload
[
0
]
=
(
uint64_t
)
cw_ML
;
}
else
{
// polar coded case
...
...
@@ -1629,21 +1629,29 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
corr_dB
=
dB_fixed64
(
corr
);
LOG_D
(
PHY
,
"metric %d dB
\n
"
,
corr_dB
);
}
re_offset
=
(
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
(
&
rxdataF
[
0
][(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
],
12
*
pucch_pdu
->
prb_size
))
-
(
10
*
gNB
->
measurements
.
n0_power_tot_dB
);
int
cqi
;
if
(
SNRtimes10
<
-
640
)
cqi
=
0
;
else
if
(
SNRtimes10
>
635
)
cqi
=
255
;
else
cqi
=
(
640
+
SNRtimes10
)
/
5
;
uci_pdu
->
harq
.
harq_bit_len
=
pucch_pdu
->
bit_len_harq
;
uci_pdu
->
pduBitmap
=
0
;
uci_pdu
->
rnti
=
pucch_pdu
->
rnti
;
uci_pdu
->
handle
=
pucch_pdu
->
handle
;
uci_pdu
->
pucch_format
=
0
;
uci_pdu
->
ul_cqi
=
corr_dB
;
// need to fill these field!
uci_pdu
->
timing_advance
=
31
;
uci_pdu
->
rssi
=
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
(
&
rxdataF
[
0
][(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
],
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
++
;
uci_pdu
->
pduBitmap
|=
1
;
uci_pdu
->
harq
.
harq_payload
=
(
uint8_t
*
)
malloc
(
harq_bytes
);
uci_pdu
->
harq
.
harq_crc
=
decoderState
>
0
?
1
:
0
;
uci_pdu
->
harq
.
harq_crc
=
decoderState
;
int
i
=
0
;
for
(;
i
<
harq_bytes
-
1
;
i
++
)
{
uci_pdu
->
harq
.
harq_payload
[
i
]
=
decodedPayload
[
0
]
&
255
;
...
...
@@ -1666,19 +1674,18 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
int
csi_part1_bytes
=
pucch_pdu
->
bit_len_csi_part1
>>
3
;
if
((
pucch_pdu
->
bit_len_csi_part1
&
7
)
>
0
)
csi_part1_bytes
++
;
uci_pdu
->
csi_part1
.
csi_part1_payload
=
(
uint8_t
*
)
malloc
(
csi_part1_bytes
);
uci_pdu
->
csi_part1
.
csi_part1_crc
=
decoderState
>
0
?
1
:
0
;
uci_pdu
->
csi_part1
.
csi_part1_crc
=
decoderState
;
int
i
=
0
;
for
(;
i
<
csi_part1_bytes
-
1
;
i
++
)
{
uci_pdu
->
csi_part1
.
csi_part1_payload
[
i
]
=
decodedPayload
[
0
]
&
255
;
decodedPayload
[
0
]
>>=
8
;
}
uci_pdu
->
csi_part1
.
csi_part1_payload
[
i
]
=
decodedPayload
[
0
]
&
((
1
<<
(
pucch_pdu
->
bit_len_csi_part1
&
7
))
-
1
);
decodedPayload
[
0
]
>>=
pucch_pdu
->
bit_len_csi_part1
;
decodedPayload
[
0
]
>>=
pucch_pdu
->
bit_len_csi_part1
;
}
if
(
pucch_pdu
->
bit_len_csi_part2
>
0
)
{
uci_pdu
->
pduBitmap
|=
8
;
}
}
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