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
d4344395
Commit
d4344395
authored
Jun 07, 2021
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using ul_config->prach_pdu in get_rach()
Also, changed freq_index hardcode to 0. Logging ra_rnti in gNB and NR UE
parent
2dc4addf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
23 deletions
+31
-23
executables/nr-ue.c
executables/nr-ue.c
+27
-22
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+2
-0
No files found.
executables/nr-ue.c
View file @
d4344395
...
...
@@ -159,7 +159,7 @@ static void L1_nsa_prach_procedures(frame_t frame, int slot)
rach_ind
.
pdu_list
[
pdu_index
].
phy_cell_id
=
0
;
rach_ind
.
pdu_list
[
pdu_index
].
symbol_index
=
0
;
rach_ind
.
pdu_list
[
pdu_index
].
slot_index
=
slot
;
rach_ind
.
pdu_list
[
pdu_index
].
freq_index
=
1
;
rach_ind
.
pdu_list
[
pdu_index
].
freq_index
=
0
;
rach_ind
.
pdu_list
[
pdu_index
].
avg_rssi
=
128
;
rach_ind
.
pdu_list
[
pdu_index
].
avg_snr
=
0xff
;
// invalid for now
...
...
@@ -218,27 +218,32 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
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
,
ul_info
.
frame_tx
,
gNB_id
,
ul_info
.
slot_tx
);
if
(
nr_prach
==
1
)
{
L1_nsa_prach_procedures
(
ul_info
.
frame_tx
,
ul_info
.
slot_tx
);
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
)
{
LOG_I
(
NR_PHY
,
"In %s: [UE %d] RA completed, setting UE mode to PUSCH
\n
"
,
__FUNCTION__
,
mod_id
);
//UE->UE_mode[0] = PUSCH;
}
else
if
(
nr_prach
==
3
)
{
LOG_I
(
NR_PHY
,
"In %s: [UE %d] RA failed, setting UE mode to PRACH
\n
"
,
__FUNCTION__
,
mod_id
);
//UE->UE_mode[0] = PRACH;
fapi_nr_ul_config_request_t
*
ul_config
=
get_ul_config_request
(
mac
,
ul_info
.
slot_tx
);
if
(
!
ul_config
)
{
LOG_E
(
NR_MAC
,
"mac->ul_config is null!
\n
"
);
return
;
}
int
CC_id
=
0
;
uint8_t
gNB_id
=
0
;
prach_pdu
=
ul_config
->
ul_config_list
[
ul_config
->
number_pdus
].
prach_config_pdu
;
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
)
{
L1_nsa_prach_procedures
(
ul_info
.
frame_tx
,
ul_info
.
slot_tx
);
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
)
{
LOG_I
(
NR_PHY
,
"In %s: [UE %d] RA completed, setting UE mode to PUSCH
\n
"
,
__FUNCTION__
,
mod_id
);
//UE->UE_mode[0] = PUSCH;
}
else
if
(
nr_prach
==
3
)
{
LOG_I
(
NR_PHY
,
"In %s: [UE %d] RA failed, setting UE mode to PRACH
\n
"
,
__FUNCTION__
,
mod_id
);
//UE->UE_mode[0] = PRACH;
}
}
}
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
d4344395
...
...
@@ -392,8 +392,9 @@ uint16_t set_ra_rnti(NR_UE_MAC_INST_t *mac, fapi_nr_ul_config_prach_pdu *prach_p
uint8_t
s_id
=
prach_pdu
->
prach_start_symbol
;
ra
->
ra_rnti
=
1
+
s_id
+
14
*
t_id
+
1120
*
f_id
+
8960
*
ul_carrier_id
;
//gNB: ra_rnti = 1 + symbol + (slotP * 14) + (freq_index * 14 * 80) + (ul_carrier_id * 14 * 80 * 8);
LOG_
D
(
MAC
,
"Computed ra_RNTI is %x
\n
"
,
ra
->
ra_rnti
);
LOG_
I
(
MAC
,
"Computed ra_RNTI is %x, sid %d, fid %d, tid %d
\n
"
,
ra
->
ra_rnti
,
s_id
,
f_id
,
t_id
);
return
ra
->
ra_rnti
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
d4344395
...
...
@@ -511,6 +511,8 @@ void nr_initiate_ra_proc(module_id_t module_idP,
ra_rnti
=
1
+
symbol
+
(
9
/*slotP*/
*
14
)
+
(
freq_index
*
14
*
80
)
+
(
ul_carrier_id
*
14
*
80
*
8
);
else
ra_rnti
=
1
+
symbol
+
(
slotP
*
14
)
+
(
freq_index
*
14
*
80
)
+
(
ul_carrier_id
*
14
*
80
*
8
);
LOG_I
(
NR_MAC
,
"Melissa ra_rnti %x, symbol %d, slot %d, freq_idx %d, ul_carrier_id %d
\n
"
,
ra_rnti
,
symbol
,
slotP
,
freq_index
,
ul_carrier_id
);
// This should be handled differently when we use the initialBWP for RA
ra
->
bwp_id
=
1
;
...
...
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