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
spbro
OpenXG-RAN
Commits
87a1ff5b
Commit
87a1ff5b
authored
May 24, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix_reverse_n_bits' into integration_2024_w21c
parents
92491310
c626e55f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
32 deletions
+11
-32
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+0
-12
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+0
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+11
-18
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
87a1ff5b
...
...
@@ -38,18 +38,6 @@
#define reserved 0xffff
void
reverse_n_bits
(
uint8_t
*
value
,
uint16_t
bitlen
)
{
uint16_t
j
;
uint8_t
i
;
for
(
j
=
bitlen
-
1
,
i
=
0
;
j
>
i
;
j
--
,
i
++
)
{
if
(((
*
value
>>
j
)
&
1
)
!=
((
*
value
>>
i
)
&
1
))
{
*
value
^=
(
1
<<
j
);
*
value
^=
(
1
<<
i
);
}
}
}
//38.321 Table 6.1.3.1-1
const
uint32_t
NR_SHORT_BSR_TABLE
[
NR_SHORT_BSR_TABLE_SIZE
]
=
{
0
,
10
,
14
,
20
,
28
,
38
,
53
,
74
,
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
87a1ff5b
...
...
@@ -261,8 +261,6 @@ void csi_period_offset(NR_CSI_ReportConfig_t *csirep,
struct
NR_CSI_ResourcePeriodicityAndOffset
*
periodicityAndOffset
,
int
*
period
,
int
*
offset
);
void
reverse_n_bits
(
uint8_t
*
value
,
uint16_t
bitlen
);
bool
set_dl_ptrs_values
(
NR_PTRS_DownlinkConfig_t
*
ptrs_config
,
uint16_t
rbSize
,
uint8_t
mcsIndex
,
uint8_t
mcsTable
,
uint8_t
*
K_ptrs
,
uint8_t
*
L_ptrs
,
uint8_t
*
portIndex
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
87a1ff5b
...
...
@@ -2450,8 +2450,7 @@ bool get_downlink_ack(NR_UE_MAC_INST_t *mac, frame_t frame, int slot, PUCCH_sche
pucch
->
pucch_resource
=
acknack_resource
;
LOG_D
(
MAC
,
"frame %d slot %d pucch acknack payload %d
\n
"
,
frame
,
slot
,
o_ACK
);
}
reverse_n_bits
(
&
o_ACK
,
number_harq_feedback
);
pucch
->
ack_payload
=
o_ACK
;
pucch
->
ack_payload
=
reverse_bits
(
o_ACK
,
number_harq_feedback
);
pucch
->
n_harq
=
number_harq_feedback
;
return
(
number_harq_feedback
>
0
);
...
...
@@ -2720,26 +2719,22 @@ uint8_t get_ssb_rsrp_payload(NR_UE_MAC_INST_t *mac,
if
(
ssbri_bits
>
0
)
{
ssbi
=
ssb_rsrp
[
0
][
0
];
reverse_n_bits
(
&
ssbi
,
ssbri_bits
);
temp_payload
=
ssbi
;
temp_payload
=
reverse_bits
(
ssbi
,
ssbri_bits
);
bits
+=
ssbri_bits
;
}
uint8_t
rsrp_idx
=
get_rsrp_index
(
ssb_rsrp
[
1
][
0
]);
reverse_n_bits
(
&
rsrp_idx
,
7
);
temp_payload
|=
(
rsrp_idx
<<
bits
);
temp_payload
|=
(
reverse_bits
(
rsrp_idx
,
7
)
<<
bits
);
bits
+=
7
;
// 7 bits for highest RSRP
// from the second SSB, differential report
for
(
int
i
=
1
;
i
<
nb_meas
;
i
++
){
ssbi
=
ssb_rsrp
[
0
][
i
];
reverse_n_bits
(
&
ssbi
,
ssbri_bits
);
temp_payload
=
ssbi
;
temp_payload
=
reverse_bits
(
ssbi
,
ssbri_bits
);
bits
+=
ssbri_bits
;
rsrp_idx
=
get_rsrp_diff_index
(
ssb_rsrp
[
1
][
0
],
ssb_rsrp
[
1
][
i
]);
reverse_n_bits
(
&
rsrp_idx
,
4
);
temp_payload
|=
(
rsrp_idx
<<
bits
);
temp_payload
|=
(
reverse_bits
(
rsrp_idx
,
4
)
<<
bits
);
bits
+=
4
;
// 7 bits for highest RSRP
}
break
;
// resorce found
...
...
@@ -2756,7 +2751,7 @@ uint8_t get_csirs_RI_PMI_CQI_payload(NR_UE_MAC_INST_t *mac,
NR_CSI_MeasConfig_t
*
csi_MeasConfig
)
{
int
n_bits
=
0
;
uint
32
_t
temp_payload
=
0
;
uint
64
_t
temp_payload
=
0
;
for
(
int
csi_resourceidx
=
0
;
csi_resourceidx
<
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
count
;
csi_resourceidx
++
)
{
...
...
@@ -2796,17 +2791,15 @@ uint8_t get_csirs_RI_PMI_CQI_payload(NR_UE_MAC_INST_t *mac,
(
mac
->
csirs_measurements
.
cqi
<<
cri_bitlen
)
|
0
;
reverse_n_bits
((
uint8_t
*
)
&
temp_payload
,
n_bits
);
temp_payload
=
reverse_bits
(
temp_payload
,
n_bits
);
LOG_D
(
NR_MAC
,
"cri_bitlen = %d
\n
"
,
cri_bitlen
);
LOG_D
(
NR_MAC
,
"ri_bitlen = %d
\n
"
,
ri_bitlen
);
LOG_D
(
NR_MAC
,
"pmi_x1_bitlen = %d
\n
"
,
pmi_x1_bitlen
);
LOG_D
(
NR_MAC
,
"pmi_x2_bitlen = %d
\n
"
,
pmi_x2_bitlen
);
LOG_D
(
NR_MAC
,
"cqi_bitlen = %d
\n
"
,
cqi_bitlen
);
LOG_D
(
NR_MAC
,
"csi_part1_payload = 0x%x
\n
"
,
temp_payload
);
LOG_D
(
NR_MAC
,
"csi_part1_payload = 0x%lx
\n
"
,
temp_payload
);
LOG_D
(
NR_MAC
,
"n_bits = %d
\n
"
,
n_bits
);
LOG_D
(
NR_MAC
,
"csi_part1_payload = 0x%x
\n
"
,
temp_payload
);
break
;
}
...
...
@@ -2824,7 +2817,7 @@ uint8_t get_csirs_RSRP_payload(NR_UE_MAC_INST_t *mac,
NR_CSI_MeasConfig_t
*
csi_MeasConfig
)
{
int
n_bits
=
0
;
uint
32
_t
temp_payload
=
0
;
uint
64
_t
temp_payload
=
0
;
for
(
int
csi_resourceidx
=
0
;
csi_resourceidx
<
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
count
;
csi_resourceidx
++
)
{
...
...
@@ -2858,14 +2851,14 @@ uint8_t get_csirs_RSRP_payload(NR_UE_MAC_INST_t *mac,
temp_payload
=
mac
->
csirs_measurements
.
rsrp_dBm
+
157
;
}
reverse_n_bits
((
uint8_t
*
)
&
temp_payload
,
n_bits
);
temp_payload
=
reverse_bits
(
temp_payload
,
n_bits
);
LOG_D
(
NR_MAC
,
"cri_ssbri_bitlen = %d
\n
"
,
cri_ssbri_bitlen
);
LOG_D
(
NR_MAC
,
"rsrp_bitlen = %d
\n
"
,
rsrp_bitlen
);
LOG_D
(
NR_MAC
,
"diff_rsrp_bitlen = %d
\n
"
,
diff_rsrp_bitlen
);
LOG_D
(
NR_MAC
,
"n_bits = %d
\n
"
,
n_bits
);
LOG_D
(
NR_MAC
,
"csi_part1_payload = 0x%x
\n
"
,
temp_payload
);
LOG_D
(
NR_MAC
,
"csi_part1_payload = 0x%
l
x
\n
"
,
temp_payload
);
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