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
95971514
Commit
95971514
authored
Oct 22, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Random Access Resource selection for 4- and 2-step RA
parent
60920ed1
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
378 additions
and
300 deletions
+378
-300
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+7
-9
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+0
-12
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+367
-272
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+0
-1
openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp
openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp
+3
-1
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+1
-5
No files found.
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
95971514
...
@@ -333,6 +333,8 @@ typedef struct {
...
@@ -333,6 +333,8 @@ typedef struct {
uint8_t
ssb_nb_in_ro
;
uint8_t
ssb_nb_in_ro
;
int
zeroCorrelationZoneConfig
;
int
zeroCorrelationZoneConfig
;
int
restricted_set_config
;
int
restricted_set_config
;
// selected SSB for RACH
int
ra_ssb
;
/// Random-access window counter
/// Random-access window counter
int16_t
RA_window_cnt
;
int16_t
RA_window_cnt
;
/// Flag to monitor if matching RAPID was received in RAR
/// Flag to monitor if matching RAPID was received in RAR
...
@@ -341,25 +343,21 @@ typedef struct {
...
@@ -341,25 +343,21 @@ typedef struct {
uint8_t
RA_BI_found
;
uint8_t
RA_BI_found
;
/// Random-access backoff counter
/// Random-access backoff counter
int16_t
RA_backoff_indicator
;
int16_t
RA_backoff_indicator
;
/// Flag to indicate whether preambles Group A
was us
ed
/// Flag to indicate whether preambles Group A
is select
ed
uint8_t
RA_used
GroupA
;
bool
RA_
GroupA
;
/// RA backoff counter
/// RA backoff counter
int16_t
RA_backoff_cnt
;
int16_t
RA_backoff_cnt
;
/// RA max number of preamble transmissions
/// RA max number of preamble transmissions
int
preambleTransMax
;
int
preambleTransMax
;
/// Nb of preambles per SSB
long
cb_preambles_per_ssb
;
int
starting_preamble_nb
;
/// Received TPC command (in dB) from RAR
/// Received TPC command (in dB) from RAR
int8_t
Msg3_TPC
;
int8_t
Msg3_TPC
;
/// Flag to indicate whether it is the first Msg3 to be transmitted
bool
first_Msg3
;
/// RA Msg3 size in bytes
/// RA Msg3 size in bytes
uint8_t
Msg3_size
;
uint8_t
Msg3_size
;
/// Msg3 buffer
/// Msg3 buffer
uint8_t
*
Msg3_buffer
;
uint8_t
*
Msg3_buffer
;
// initial Random Access Preamble power
int
preambleRxTargetPower
;
int
deltaPreamble
;
bool
msg3_C_RNTI
;
bool
msg3_C_RNTI
;
/// Random-access Contention Resolution Timer
/// Random-access Contention Resolution Timer
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
95971514
...
@@ -321,18 +321,6 @@ void nr_get_RA_window(NR_UE_MAC_INST_t *mac);
...
@@ -321,18 +321,6 @@ void nr_get_RA_window(NR_UE_MAC_INST_t *mac);
@returns indication to generate PRACH to phy */
@returns indication to generate PRACH to phy */
void
nr_ue_manage_ra_procedure
(
NR_UE_MAC_INST_t
*
mac
,
int
CC_id
,
frame_t
frame
,
uint8_t
gNB_id
,
int
nr_slot_tx
);
void
nr_ue_manage_ra_procedure
(
NR_UE_MAC_INST_t
*
mac
,
int
CC_id
,
frame_t
frame
,
uint8_t
gNB_id
,
int
nr_slot_tx
);
/* \brief Function implementing the routine for the selection of Random Access resources (5.1.2 TS 38.321).
@param mac pointer to MAC instance
@param CC_id Component Carrier Index
@param gNB_index gNB index
@param rach_ConfigDedicated
@returns void */
void
nr_get_prach_resources
(
NR_UE_MAC_INST_t
*
mac
,
int
CC_id
,
uint8_t
gNB_id
,
NR_PRACH_RESOURCES_t
*
prach_resources
,
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
);
void
prepare_msg4_msgb_feedback
(
NR_UE_MAC_INST_t
*
mac
,
int
pid
,
int
ack_nack
);
void
prepare_msg4_msgb_feedback
(
NR_UE_MAC_INST_t
*
mac
,
int
pid
,
int
ack_nack
);
void
configure_initial_pucch
(
PUCCH_sched_t
*
pucch
,
int
res_ind
);
void
configure_initial_pucch
(
PUCCH_sched_t
*
pucch
,
int
res_ind
);
void
release_PUCCH_SRS
(
NR_UE_MAC_INST_t
*
mac
);
void
release_PUCCH_SRS
(
NR_UE_MAC_INST_t
*
mac
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
95971514
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
95971514
...
@@ -2706,7 +2706,6 @@ static void nr_ue_prach_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t
...
@@ -2706,7 +2706,6 @@ static void nr_ue_prach_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t
}
}
}
// if format1
}
// if format1
nr_get_prach_resources
(
mac
,
0
,
0
,
&
ra
->
prach_resources
,
ra
->
rach_ConfigDedicated
);
pdu
->
prach_config_pdu
.
ra_PreambleIndex
=
ra
->
ra_PreambleIndex
;
pdu
->
prach_config_pdu
.
ra_PreambleIndex
=
ra
->
ra_PreambleIndex
;
pdu
->
prach_config_pdu
.
prach_tx_power
=
get_prach_tx_power
(
mac
);
pdu
->
prach_config_pdu
.
prach_tx_power
=
get_prach_tx_power
(
mac
);
unsigned
int
slot_RA
;
unsigned
int
slot_RA
;
...
...
openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp
View file @
95971514
...
@@ -88,6 +88,7 @@ TEST(test_init_ra, four_step_cbra)
...
@@ -88,6 +88,7 @@ TEST(test_init_ra, four_step_cbra)
NR_UE_DL_BWP_t
dl_bwp
;
NR_UE_DL_BWP_t
dl_bwp
;
mac
.
current_UL_BWP
=
&
current_bwp
;
mac
.
current_UL_BWP
=
&
current_bwp
;
mac
.
current_DL_BWP
=
&
dl_bwp
;
mac
.
current_DL_BWP
=
&
dl_bwp
;
mac
.
mib_ssb
=
0
;
long
scs
=
1
;
long
scs
=
1
;
current_bwp
.
scs
=
scs
;
current_bwp
.
scs
=
scs
;
current_bwp
.
bwp_id
=
0
;
current_bwp
.
bwp_id
=
0
;
...
@@ -122,6 +123,7 @@ TEST(test_init_ra, four_step_cfra)
...
@@ -122,6 +123,7 @@ TEST(test_init_ra, four_step_cfra)
NR_UE_DL_BWP_t
dl_bwp
;
NR_UE_DL_BWP_t
dl_bwp
;
mac
.
current_UL_BWP
=
&
current_bwp
;
mac
.
current_UL_BWP
=
&
current_bwp
;
mac
.
current_DL_BWP
=
&
dl_bwp
;
mac
.
current_DL_BWP
=
&
dl_bwp
;
mac
.
mib_ssb
=
0
;
long
scs
=
1
;
long
scs
=
1
;
current_bwp
.
scs
=
scs
;
current_bwp
.
scs
=
scs
;
current_bwp
.
bwp_id
=
0
;
current_bwp
.
bwp_id
=
0
;
...
@@ -138,7 +140,7 @@ TEST(test_init_ra, four_step_cfra)
...
@@ -138,7 +140,7 @@ TEST(test_init_ra, four_step_cfra)
int
frame
=
151
;
int
frame
=
151
;
NR_RACH_ConfigDedicated_t
rach_ConfigDedicated
=
{
0
};
NR_RACH_ConfigDedicated_t
rach_ConfigDedicated
=
{
0
};
struct
NR_CFRA
cfra
;
NR_CFRA_t
cfra
;
rach_ConfigDedicated
.
cfra
=
&
cfra
;
rach_ConfigDedicated
.
cfra
=
&
cfra
;
ra
->
rach_ConfigDedicated
=
&
rach_ConfigDedicated
;
ra
->
rach_ConfigDedicated
=
&
rach_ConfigDedicated
;
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
95971514
...
@@ -3819,11 +3819,7 @@ NR_ReconfigurationWithSync_t *get_reconfiguration_with_sync(rnti_t rnti, uid_t u
...
@@ -3819,11 +3819,7 @@ NR_ReconfigurationWithSync_t *get_reconfiguration_with_sync(rnti_t rnti, uid_t u
uplink
->
ra_Prioritization
=
NULL
;
uplink
->
ra_Prioritization
=
NULL
;
uplink
->
cfra
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA
));
uplink
->
cfra
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA
));
uplink
->
cfra
->
ext1
=
NULL
;
uplink
->
cfra
->
ext1
=
NULL
;
uplink
->
cfra
->
occasions
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA__occasions
));
uplink
->
cfra
->
occasions
=
NULL
;
memcpy
(
&
uplink
->
cfra
->
occasions
->
rach_ConfigGeneric
,
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
,
sizeof
(
NR_RACH_ConfigGeneric_t
));
asn1cCallocOne
(
uplink
->
cfra
->
occasions
->
ssb_perRACH_Occasion
,
NR_CFRA__occasions__ssb_perRACH_Occasion_one
);
uplink
->
cfra
->
resources
.
present
=
NR_CFRA__resources_PR_ssb
;
uplink
->
cfra
->
resources
.
present
=
NR_CFRA__resources_PR_ssb
;
uplink
->
cfra
->
resources
.
choice
.
ssb
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA__resources__ssb
));
uplink
->
cfra
->
resources
.
choice
.
ssb
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA__resources__ssb
));
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ra_ssb_OccasionMaskIndex
=
0
;
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ra_ssb_OccasionMaskIndex
=
0
;
...
...
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