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
ZhouShuya
OpenXG-RAN
Commits
2b9d0f95
Commit
2b9d0f95
authored
Feb 08, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix develop merge conflicts in the RA-Msg3
parent
5b7ae122
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
26 deletions
+35
-26
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+3
-3
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+32
-23
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
2b9d0f95
...
...
@@ -515,7 +515,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
uint16_t
sdu_lengths
[
NB_RB_MAX
]
=
{
0
};
int
num_sdus
,
offset
=
0
,
preambleTransMax
;
int
num_sdus
,
offset
=
0
;
// Delay init RA procedure to allow the convergence of the IIR filter on PRACH noise measurements at gNB side
if
(
!
prach_resources
->
init_msg1
)
{
...
...
@@ -590,9 +590,9 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
LOG_D
(
MAC
,
"(%i): %i
\n
"
,
k
,
prach_resources
->
Msg3
[
k
]);
}
// Msg3 was initialized with TBS_max bytes because the
mac->
RA_Msg3_size will only be known after
// Msg3 was initialized with TBS_max bytes because the RA_Msg3_size will only be known after
// receiving Msg2 (which contains the Msg3 resource reserve).
// Msg3 will be transmitted with
mac->
RA_Msg3_size bytes, removing unnecessary 0s.
// Msg3 will be transmitted with RA_Msg3_size bytes, removing unnecessary 0s.
mac
->
ulsch_pdu
.
Pdu_size
=
TBS_max
;
memcpy
(
mac
->
ulsch_pdu
.
payload
,
prach_resources
->
Msg3
,
TBS_max
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
2b9d0f95
...
...
@@ -889,32 +889,41 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
uint16_t
TBS_bytes
=
ulcfg_pdu
->
pusch_config_pdu
.
pusch_data
.
tb_size
;
if
(
IS_SOFTMODEM_NOS1
){
// Getting IP traffic to be transmitted
data_existing
=
nr_ue_get_sdu
(
mod_id
,
cc_id
,
frame_tx
,
slot_tx
,
0
,
ulsch_input_buffer
,
TBS_bytes
,
&
access_mode
);
}
if
(
ra
->
ra_state
==
WAIT_RAR
){
memcpy
(
ulsch_input_buffer
,
mac
->
ulsch_pdu
.
payload
,
TBS_bytes
);
printf
(
"
\n
"
);
LOG_I
(
MAC
,
"[RAPROC] Msg3 to be transmitted:
\n
"
);
for
(
int
k
=
0
;
k
<
TBS_bytes
;
k
++
)
{
LOG_I
(
MAC
,
"(%i): 0x%x
\n
"
,
k
,
mac
->
ulsch_pdu
.
payload
[
k
]);
}
printf
(
"
\n
"
);
}
else
{
if
(
IS_SOFTMODEM_NOS1
){
// Getting IP traffic to be transmitted
data_existing
=
nr_ue_get_sdu
(
mod_id
,
cc_id
,
frame_tx
,
slot_tx
,
0
,
ulsch_input_buffer
,
TBS_bytes
,
&
access_mode
);
}
//Random traffic to be transmitted if there is no IP traffic available for this Tx opportunity
if
(
!
IS_SOFTMODEM_NOS1
||
!
data_existing
)
{
//Use zeros for the header bytes in noS1 mode, in order to make sure that the LCID is not valid
//and block this traffic from being forwarded to the upper layers at the gNB
LOG_D
(
PHY
,
"In %s: Random data to be transmitted: TBS_bytes %d
\n
"
,
__FUNCTION__
,
TBS_bytes
);
//Random traffic to be transmitted if there is no IP traffic available for this Tx opportunity
if
(
!
IS_SOFTMODEM_NOS1
||
!
data_existing
)
{
//Use zeros for the header bytes in noS1 mode, in order to make sure that the LCID is not valid
//and block this traffic from being forwarded to the upper layers at the gNB
LOG_D
(
PHY
,
"In %s: Random data to be transmitted: TBS_bytes %d
\n
"
,
__FUNCTION__
,
TBS_bytes
);
//Give the first byte a dummy value (a value not corresponding to any valid LCID based on 38.321, Table 6.2.1-2)
//in order to distinguish the PHY random packets at the MAC layer of the gNB receiver from the normal packets that should
//have a valid LCID (nr_process_mac_pdu function)
ulsch_input_buffer
[
0
]
=
0x31
;
//Give the first byte a dummy value (a value not corresponding to any valid LCID based on 38.321, Table 6.2.1-2)
//in order to distinguish the PHY random packets at the MAC layer of the gNB receiver from the normal packets that should
//have a valid LCID (nr_process_mac_pdu function)
ulsch_input_buffer
[
0
]
=
0x31
;
for
(
int
i
=
1
;
i
<
TBS_bytes
;
i
++
)
{
ulsch_input_buffer
[
i
]
=
(
unsigned
char
)
rand
();
//printf(" input encoder a[%d]=0x%02x\n",i,harq_process_ul_ue->a[i]);
for
(
int
i
=
1
;
i
<
TBS_bytes
;
i
++
)
{
ulsch_input_buffer
[
i
]
=
(
unsigned
char
)
rand
();
}
}
}
...
...
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