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
alex037yang
OpenXG-RAN
Commits
ffa5911d
Commit
ffa5911d
authored
Feb 08, 2020
by
cig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RA fixes
parent
903a1ec6
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
286 additions
and
350 deletions
+286
-350
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+92
-94
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+0
-6
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+6
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+2
-0
openair2/LAYER2/NR_MAC_UE/rar_tools_nrUE.c
openair2/LAYER2/NR_MAC_UE/rar_tools_nrUE.c
+54
-62
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+110
-173
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+8
-0
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+1
-5
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+11
-8
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+1
-1
No files found.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
ffa5911d
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
View file @
ffa5911d
...
@@ -70,12 +70,6 @@
...
@@ -70,12 +70,6 @@
// F: lenght of L is 0:8 or 1:16 bits wide
// F: lenght of L is 0:8 or 1:16 bits wide
// R: Reserved bit, set to zero.
// R: Reserved bit, set to zero.
typedef
enum
{
RA_IDLE
=
0
,
WAIT_RAR
=
1
,
WAIT_CONTENTION_RESOLUTION
=
2
}
RA_state_t
;
typedef
struct
{
typedef
struct
{
uint8_t
LCID
:
6
;
// octet 1 [5:0]
uint8_t
LCID
:
6
;
// octet 1 [5:0]
uint8_t
F
:
1
;
// octet 1 [6]
uint8_t
F
:
1
;
// octet 1 [6]
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
ffa5911d
...
@@ -74,6 +74,12 @@ typedef enum {
...
@@ -74,6 +74,12 @@ typedef enum {
SFN_C_IMPOSSIBLE
SFN_C_IMPOSSIBLE
}
SFN_C_TYPE
;
}
SFN_C_TYPE
;
typedef
enum
{
RA_IDLE
=
0
,
WAIT_RAR
=
1
,
WAIT_CONTENTION_RESOLUTION
=
2
}
RA_state_t
;
/*!\brief Top level UE MAC structure */
/*!\brief Top level UE MAC structure */
typedef
struct
{
typedef
struct
{
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
ffa5911d
...
@@ -215,5 +215,7 @@ uint16_t nr_ue_process_rar(const module_id_t mod_id,
...
@@ -215,5 +215,7 @@ uint16_t nr_ue_process_rar(const module_id_t mod_id,
const
uint8_t
preamble_index
,
const
uint8_t
preamble_index
,
uint8_t
*
selected_rar_buffer
);
uint8_t
*
selected_rar_buffer
);
void
nr_process_rar
(
nr_downlink_indication_t
*
dl_info
);
#endif
#endif
/** @}*/
/** @}*/
openair2/LAYER2/NR_MAC_UE/rar_tools_nrUE.c
View file @
ffa5911d
...
@@ -54,23 +54,20 @@ uint16_t nr_ue_process_rar(const module_id_t mod_id,
...
@@ -54,23 +54,20 @@ uint16_t nr_ue_process_rar(const module_id_t mod_id,
uint8_t
*
const
dlsch_buffer
,
uint8_t
*
const
dlsch_buffer
,
rnti_t
*
const
t_crnti
,
rnti_t
*
const
t_crnti
,
const
uint8_t
preamble_index
,
const
uint8_t
preamble_index
,
uint8_t
*
selected_rar_buffer
/*output argument for storing the selected RAR header and RAR payload*/
){
uint8_t
*
selected_rar_buffer
){
NR_UE_MAC_INST_t
*
nrUE_mac_inst
=
get_mac_inst
(
mod_id
);
NR_UE_MAC_INST_t
*
nrUE_mac_inst
=
get_mac_inst
(
mod_id
);
uint16_t
ret
=
0
;
// return value
NR_RA_HEADER_RAPID
*
rarh
=
(
NR_RA_HEADER_RAPID
*
)
dlsch_buffer
;
NR_RA_HEADER_RAPID
*
rarh
=
(
NR_RA_HEADER_RAPID
*
)
dlsch_buffer
;
uint16_t
ret
=
0
;
// TODO TBR
// NR_RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
// NR_RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
uint8_t
*
rar
=
(
uint8_t
*
)
(
dlsch_buffer
+
1
);
uint8_t
*
rar
=
(
uint8_t
*
)
(
dlsch_buffer
+
1
);
// get the last RAR payload for working with CMW500
// get the last RAR payload for working with CMW500
uint8_t
n_rarpy
=
0
;
// number of RAR payloads
uint8_t
n_rarpy
=
0
;
// number of RAR payloads
uint8_t
n_rarh
=
0
;
// number of MAC RAR subheaders
uint8_t
n_rarh
=
0
;
// number of MAC RAR subheaders
uint8_t
best_rx_rapid
=
-
1
;
// the closest RAPID receive from all RARs
uint8_t
best_rx_rapid
=
-
1
;
// the closest RAPID receive from all RARs
AssertFatal
(
CC_id
==
0
,
"RAR reception on secondary CCs is not supported yet
\n
"
);
while
(
1
)
{
while
(
1
)
{
n_rarh
++
;
n_rarh
++
;
if
(
rarh
->
T
==
1
)
{
if
(
rarh
->
T
==
1
)
{
...
@@ -102,11 +99,6 @@ uint16_t nr_ue_process_rar(const module_id_t mod_id,
...
@@ -102,11 +99,6 @@ uint16_t nr_ue_process_rar(const module_id_t mod_id,
LOG_D
(
MAC
,
"number of RAR subheader %d; number of RAR pyloads %d
\n
"
,
LOG_D
(
MAC
,
"number of RAR subheader %d; number of RAR pyloads %d
\n
"
,
n_rarh
,
n_rarpy
);
n_rarh
,
n_rarpy
);
if
(
CC_id
>
0
)
{
LOG_W
(
MAC
,
"Should not have received RAR on secondary CCs!
\n
"
);
return
(
0xffff
);
}
LOG_I
(
MAC
,
LOG_I
(
MAC
,
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d
\n
"
,
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d
\n
"
,
mod_id
,
frameP
,
*
(
uint8_t
*
)
rarh
,
rar
[
0
],
rar
[
1
],
rar
[
2
],
mod_id
,
frameP
,
*
(
uint8_t
*
)
rarh
,
rar
[
0
],
rar
[
1
],
rar
[
2
],
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
ffa5911d
...
@@ -380,7 +380,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -380,7 +380,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
}
// Phytest scheduling
// Phytest scheduling
if
(
phy_test
&&
slot_txP
==
1
){
// TBR check phy_test
if
(
phy_test
&&
slot_txP
==
1
){
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame_txP
,
slot_txP
,
NULL
);
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame_txP
,
slot_txP
,
NULL
);
// This schedules Random-Access for NR starting in subframeP
// This schedules Random-Access for NR starting in subframeP
nr_schedule_RA
(
module_idP
,
frame_txP
,
slot_txP
);
nr_schedule_RA
(
module_idP
,
frame_txP
,
slot_txP
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
ffa5911d
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
ffa5911d
...
@@ -75,6 +75,14 @@
...
@@ -75,6 +75,14 @@
/*!\brief Maximum number of random access process */
/*!\brief Maximum number of random access process */
#define NR_NB_RA_PROC_MAX 4
#define NR_NB_RA_PROC_MAX 4
typedef
enum
{
RA_IDLE
=
0
,
Msg2
=
1
,
WAIT_Msg3
=
2
,
Msg4
=
3
,
WAIT_Msg4_ACK
=
4
}
RA_state_t
;
/*! \brief gNB template for the Random access information */
/*! \brief gNB template for the Random access information */
typedef
struct
{
typedef
struct
{
/// Flag to indicate this process is active
/// Flag to indicate this process is active
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
ffa5911d
...
@@ -64,11 +64,7 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
...
@@ -64,11 +64,7 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
NFAPI_SFNSF2SF
(
UL_info
->
rach_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL_info
->
rach_ind
.
sfn_sf
),
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
preamble
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
preamble
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
timing_advance
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
timing_advance
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
rnti
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
rnti
);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) // TBR
,
0
#endif
);
}
}
}
}
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
ffa5911d
...
@@ -93,12 +93,15 @@ int8_t handle_dlsch (module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_n
...
@@ -93,12 +93,15 @@ int8_t handle_dlsch (module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_n
*/
*/
}
}
int8_t
handle_rar
(
module_id_t
module_id
,
int
cc_id
,
uint8_t
gNB_index
,
fapi_nr_dci_indication_t
*
dci_ind
,
uint8_t
*
pduP
,
uint32_t
pdu_len
,
frame_t
frame
,
int
slot
,
NR_UL_TIME_ALIGNMENT_t
*
ul_time_alignment
){
int8_t
handle_rar
(
nr_downlink_indication_t
*
dl_info
,
uint8_t
*
pduP
,
if
(
IS_SOFTMODEM_NOS1
||
IS_SOFTMODEM_RFSIM
)
uint32_t
pdu_len
,
//nr_process_rar(ue,proc, gNB_index, mode); TBR
NR_UL_TIME_ALIGNMENT_t
*
ul_time_alignment
){
// TBR not used params
LOG_D
(
MAC
,
"handling RAR at MAC layer
\n
"
);
nr_process_rar
(
dl_info
);
return
0
;
return
0
;
}
}
int
nr_ue_ul_indication
(
nr_uplink_indication_t
*
ul_info
){
int
nr_ue_ul_indication
(
nr_uplink_indication_t
*
ul_info
){
...
@@ -260,10 +263,10 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
...
@@ -260,10 +263,10 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
break
;
break
;
case
FAPI_NR_RX_PDU_TYPE_RAR
:
case
FAPI_NR_RX_PDU_TYPE_RAR
:
/*ret_mask |= (handle_rar(dl_info->module_id, dl_info->cc_id, dl_info->gNB_index, dl_info->dci_ind
,
ret_mask
|=
(
handle_rar
(
dl_info
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
pdsch_pdu
.
pdu
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
pdsch_pdu
.
pdu
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
pdsch_pdu
.
pdu_length
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
pdsch_pdu
.
pdu_length
,
dl_info->frame, dl_info->slot,ul_time_alignment)) << FAPI_NR_RX_PDU_TYPE_RAR;*/
//TODO TBR
ul_time_alignment
))
<<
FAPI_NR_RX_PDU_TYPE_RAR
;
break
;
break
;
default:
default:
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
ffa5911d
...
@@ -199,7 +199,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc) {
...
@@ -199,7 +199,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc) {
rrc
->
carrier
.
pdsch_AntennaPorts
,
rrc
->
carrier
.
pdsch_AntennaPorts
,
(
NR_ServingCellConfigCommon_t
*
)
rrc
->
carrier
.
servingcellconfigcommon
,
(
NR_ServingCellConfigCommon_t
*
)
rrc
->
carrier
.
servingcellconfigcommon
,
0
,
0
,
0
,
0
,
// TBR hardcoded rnti
(
NR_CellGroupConfig_t
*
)
NULL
(
NR_CellGroupConfig_t
*
)
NULL
);
);
...
...
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