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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
d78861db
Commit
d78861db
authored
Aug 23, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use the same buffer and size for msg4 retransmission
parent
7ab05b66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
+18
-15
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+16
-15
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+2
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
d78861db
...
...
@@ -1251,18 +1251,19 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
harq
->
feedback_slot
=
pucch
->
ul_slot
;
harq
->
feedback_frame
=
pucch
->
frame
;
// Bytes to be transmitted
uint8_t
*
buf
=
(
uint8_t
*
)
harq
->
tb
;
uint16_t
mac_pdu_length
=
nr_write_ce_dlsch_pdu
(
module_idP
,
nr_mac
->
sched_ctrlCommon
,
buf
,
255
,
ra
->
cont_res_id
);
LOG_D
(
NR_MAC
,
"Encoded contention resolution mac_pdu_length %d
\n
"
,
mac_pdu_length
);
uint16_t
mac_sdu_length
=
mac_rrc_nr_data_req
(
module_idP
,
CC_id
,
frameP
,
CCCH
,
ra
->
rnti
,
1
,
&
buf
[
mac_pdu_length
+
2
]);
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
R
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
F
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
LCID
=
DL_SCH_LCID_CCCH
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
L
=
mac_sdu_length
;
mac_pdu_length
=
mac_pdu_length
+
mac_sdu_length
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
LOG_D
(
NR_MAC
,
"Encoded RRCSetup Piggyback (%d + %d bytes), mac_pdu_length %d
\n
"
,
mac_sdu_length
,
(
int
)
sizeof
(
NR_MAC_SUBHEADER_SHORT
),
mac_pdu_length
);
// Bytes to be transmitted
if
(
harq
->
round
==
0
)
{
uint16_t
mac_pdu_length
=
nr_write_ce_dlsch_pdu
(
module_idP
,
nr_mac
->
sched_ctrlCommon
,
buf
,
255
,
ra
->
cont_res_id
);
LOG_D
(
NR_MAC
,
"Encoded contention resolution mac_pdu_length %d
\n
"
,
mac_pdu_length
);
uint16_t
mac_sdu_length
=
mac_rrc_nr_data_req
(
module_idP
,
CC_id
,
frameP
,
CCCH
,
ra
->
rnti
,
1
,
&
buf
[
mac_pdu_length
+
2
]);
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
R
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
F
=
0
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
LCID
=
DL_SCH_LCID_CCCH
;
((
NR_MAC_SUBHEADER_SHORT
*
)
&
buf
[
mac_pdu_length
])
->
L
=
mac_sdu_length
;
ra
->
mac_pdu_length
=
mac_pdu_length
+
mac_sdu_length
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
LOG_D
(
NR_MAC
,
"Encoded RRCSetup Piggyback (%d + %d bytes), mac_pdu_length %d
\n
"
,
mac_sdu_length
,
(
int
)
sizeof
(
NR_MAC_SUBHEADER_SHORT
),
ra
->
mac_pdu_length
);
}
// Calculate number of symbols
int
startSymbolIndex
,
nrOfSymbols
;
...
...
@@ -1323,7 +1324,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
harq
->
tb_size
=
nr_compute_tbs
(
nr_get_Qm_dl
(
mcsIndex
,
mcsTableIdx
),
nr_get_code_rate_dl
(
mcsIndex
,
mcsTableIdx
),
rbSize
,
nrOfSymbols
,
N_PRB_DMRS
*
N_DMRS_SLOT
,
0
,
tb_scaling
,
1
)
>>
3
;
}
while
(
rbStart
+
rbSize
<
BWPSize
&&
!
vrb_map
[
rbStart
+
rbSize
]
&&
harq
->
tb_size
<
mac_pdu_length
);
}
while
(
rbStart
+
rbSize
<
BWPSize
&&
!
vrb_map
[
rbStart
+
rbSize
]
&&
harq
->
tb_size
<
ra
->
mac_pdu_length
);
for
(
int
i
=
0
;
(
i
<
rbSize
)
&&
(
rbStart
<=
(
BWPSize
-
rbSize
));
i
++
)
{
if
(
vrb_map
[
rbStart
+
i
])
{
...
...
@@ -1474,11 +1475,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
bwpid
);
// Add padding header and zero rest out if there is space left
if
(
mac_pdu_length
<
harq
->
tb_size
)
{
NR_MAC_SUBHEADER_FIXED
*
padding
=
(
NR_MAC_SUBHEADER_FIXED
*
)
&
buf
[
mac_pdu_length
];
if
(
ra
->
mac_pdu_length
<
harq
->
tb_size
)
{
NR_MAC_SUBHEADER_FIXED
*
padding
=
(
NR_MAC_SUBHEADER_FIXED
*
)
&
buf
[
ra
->
mac_pdu_length
];
padding
->
R
=
0
;
padding
->
LCID
=
DL_SCH_LCID_PADDING
;
for
(
int
k
=
mac_pdu_length
+
1
;
k
<
harq
->
tb_size
;
k
++
)
{
for
(
int
k
=
ra
->
mac_pdu_length
+
1
;
k
<
harq
->
tb_size
;
k
++
)
{
buf
[
k
]
=
0
;
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
d78861db
...
...
@@ -156,6 +156,8 @@ typedef struct {
int
msg4_TBsize
;
/// MCS used for Msg4
int
msg4_mcs
;
/// MAC PDU length for Msg4
int
mac_pdu_length
;
/// RA search space
NR_SearchSpace_t
*
ra_ss
;
// Beam index
...
...
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