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
f768b90f
Commit
f768b90f
authored
Jun 02, 2021
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing how we set slot_tx in the NR UE.
Also fixed unpacking ul_tti_inds.
parent
2949d300
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
18 deletions
+14
-18
executables/nr-ue.c
executables/nr-ue.c
+10
-15
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+4
-3
No files found.
executables/nr-ue.c
View file @
f768b90f
...
...
@@ -206,39 +206,34 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
mac
->
ra
.
generate_nr_prach
=
0
;
frame_t
frame
=
NFAPI_SFNSLOT2SFN
(
sfn_slot
);
int
slot
=
NFAPI_SFNSLOT2SLOT
(
sfn_slot
);
#if 0
int slots_per_frame = 2048;
int slots_per_subframe = 2;
int slot_ahead = 6;
ul_info.frame_tx = frame; //Melissa, hack. (slot > slots_per_frame - 1 - (slots_per_subframe*slot_ahead)) ? frame & 1023 : frame;
ul_info.slot_tx = slot; // Melissa hack. slot + slots_per_subframe*slot_ahead % slots_per_frame;
#endif
nr_uplink_indication_t
ul_info
;
int
slots_per_frame
=
20
;
//30 kHZ subcarrier spacing
int
slot_ahead
=
6
;
// Melissa lets make this dynamic
ul_info
.
frame_rx
=
frame
;
ul_info
.
slot_rx
=
slot
;
ul_info
.
frame_tx
=
frame
;
ul_info
.
slot_tx
=
slot
;
if
(
is_nr_UL_slot
(
mac
->
scc
,
slot
))
{
LOG_I
(
NR_MAC
,
"Slot %d. calling nr_ue_ul_ind() from %s
\n
"
,
slot
,
__FUNCTION__
);
ul_info
.
slot_tx
=
(
slot
+
slot_ahead
)
%
slots_per_
frame
;
ul_info
.
frame_tx
=
(
ul_info
.
slot_rx
+
slot_ahead
>=
slots_per_frame
)
?
ul_info
.
frame_rx
+
1
:
ul_info
.
frame_rx
;
if
(
is_nr_UL_slot
(
mac
->
scc
,
ul_info
.
slot_tx
))
{
LOG_I
(
NR_MAC
,
"Slot %d. calling nr_ue_ul_ind() from %s
\n
"
,
ul_info
.
slot_tx
,
__FUNCTION__
);
nr_ue_ul_indication
(
&
ul_info
);
}
int
CC_id
=
0
;
uint8_t
gNB_id
=
0
;
uint8_t
nr_prach
=
nr_ue_get_rach
(
&
prach_resources
,
&
prach_pdu
,
mod_id
,
CC_id
,
frame
,
gNB_id
,
slot
);
uint8_t
nr_prach
=
nr_ue_get_rach
(
&
prach_resources
,
&
prach_pdu
,
mod_id
,
CC_id
,
ul_info
.
frame_tx
,
gNB_id
,
ul_info
.
slot_tx
);
if
(
nr_prach
==
1
)
{
nfapi_nr_rach_indication_t
*
ind
=
CALLOC
(
1
,
sizeof
(
*
ind
));
L1_nsa_prach_procedures
(
ind
,
frame
,
slot
);
L1_nsa_prach_procedures
(
ind
,
ul_info
.
frame_tx
,
ul_info
.
slot_tx
);
free
(
ind
);
/* Fill rach indication here and send to proxy. Basically take pieces from
L1_nr_prach_procedures() and send it to the proxy. prach from ue->gNb->gnb sends rach->ue receives rach
The UE is basically filling the rach and proxy will receive and think that it came from the gNB. The
received rach in the proxy will trigger gNB to send back the RAR. RAR will go to proxy then goes to UE
and the UE will get the DCI for RAR and the payload. have to handle receving the RAR once we get it. */
LOG_I
(
NR_PHY
,
"Calling nr_Msg1_transmitted for slot %d
\n
"
,
slot
);
nr_Msg1_transmitted
(
mod_id
,
CC_id
,
frame
,
gNB_id
);
//This is called when phy layer has sent the prach
LOG_I
(
NR_PHY
,
"Calling nr_Msg1_transmitted for slot %d
\n
"
,
ul_info
.
slot_tx
);
nr_Msg1_transmitted
(
mod_id
,
CC_id
,
ul_info
.
frame_tx
,
gNB_id
);
//This is called when phy layer has sent the prach
}
else
if
(
nr_prach
==
2
)
{
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
f768b90f
...
...
@@ -217,6 +217,7 @@ void *nrue_standalone_pnf_task(void *context)
{
nfapi_p7_message_header_t
header
;
nfapi_nr_dl_tti_request_t
dl_tti_request
;
nfapi_nr_ul_tti_request_t
ul_tti_request
;
if
(
nfapi_p7_message_header_unpack
((
void
*
)
buffer
,
len
,
&
header
,
sizeof
(
header
),
NULL
)
<
0
)
{
LOG_E
(
NR_PHY
,
"Header unpack failed for nrue_standalone pnf
\n
"
);
...
...
@@ -227,7 +228,7 @@ void *nrue_standalone_pnf_task(void *context)
switch
(
header
.
message_id
)
{
case
NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST
:
LOG_
D
(
NR_PHY
,
"Received an NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST message.
\n
"
);
LOG_
I
(
NR_PHY
,
"Received an NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST message.
\n
"
);
if
(
nfapi_nr_p7_message_unpack
((
void
*
)
buffer
,
len
,
&
dl_tti_request
,
sizeof
(
nfapi_nr_dl_tti_request_t
),
NULL
)
<
0
)
{
...
...
@@ -244,8 +245,8 @@ void *nrue_standalone_pnf_task(void *context)
break
;
case
NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST
:
LOG_I
(
NR_PHY
,
"Received an NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST message.
\n
"
);
if
(
nfapi_nr_p7_message_unpack
((
void
*
)
buffer
,
len
,
&
d
l_tti_request
,
sizeof
(
d
l_tti_request
),
NULL
)
<
0
)
if
(
nfapi_nr_p7_message_unpack
((
void
*
)
buffer
,
len
,
&
u
l_tti_request
,
sizeof
(
u
l_tti_request
),
NULL
)
<
0
)
{
LOG_E
(
NR_PHY
,
"Message dl_tti_request failed to unpack
\n
"
);
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