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
108fdae1
Commit
108fdae1
authored
Dec 02, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing unnecessary nr_Msg1_transmitted function
parent
878bbc65
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
166 additions
and
232 deletions
+166
-232
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+6
-9
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+0
-1
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+120
-150
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+40
-72
No files found.
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
108fdae1
...
...
@@ -273,8 +273,6 @@ static const char *const nrra_ue_text[] =
{
"UE_IDLE"
,
"GENERATE_PREAMBLE"
,
"WAIT_RAR"
,
"WAIT_MSGB"
,
"WAIT_CONTENTION_RESOLUTION"
,
"RA_SUCCEEDED"
,
"RA_FAILED"
};
typedef
struct
{
/// PRACH format retrieved from prach_ConfigIndex
uint16_t
prach_format
;
/// Preamble Tx Counter
uint8_t
preamble_tx_counter
;
/// Preamble Power Ramping Counter
...
...
@@ -282,9 +280,7 @@ typedef struct {
/// 2-step RA power offset
int
power_offset_2step
;
/// Target received power at gNB. Baseline is range -202..-60 dBm. Depends on delta preamble, power ramping counter and step.
int
ra_PREAMBLE_RECEIVED_TARGET_POWER
;
/// PRACH index for TDD (0 ... 6) depending on TDD configuration and prachConfigIndex
uint8_t
ra_TDD_map_index
;
int
ra_preamble_rx_target_power
;
/// RA Preamble Power Ramping Step in dB
uint32_t
preamble_power_ramping_step
;
uint8_t
preamble_backoff
;
...
...
@@ -329,8 +325,6 @@ typedef struct {
uint16_t
MsgB_rnti
;
/// Temporary CRNTI
uint16_t
t_crnti
;
/// number of attempt for rach
uint8_t
RA_attempt_number
;
/// Random-access procedure flag
bool
RA_active
;
/// Random-access preamble index
...
...
@@ -361,9 +355,9 @@ typedef struct {
uint8_t
*
Msg3_buffer
;
// initial Random Access Preamble power
int
preambleRxTargetPower
;
int
deltaPreamble
;
int
msg3_
deltaPreamble
;
bool
msg3_C_RNTI
;
int
preambleReceivedTargetPower_config
;
/// Random-access Contention Resolution Timer
NR_timer_t
contention_resolution_timer
;
/// Transmitted UE Contention Resolution Identifier
...
...
@@ -373,6 +367,9 @@ typedef struct {
NR_PRACH_RESOURCES_t
prach_resources
;
bool
new_ssb
;
int
num_fd_occasions
;
int
ra_config_index
;
ssb_ro_preambles_t
ssb_ro_config
;
int
association_periods
;
prach_occasion_info_t
sched_ro_info
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
108fdae1
...
...
@@ -336,7 +336,6 @@ NR_UE_L2_STATE_t nr_ue_get_sync_state(module_id_t mod_id);
int16_t
get_prach_tx_power
(
NR_UE_MAC_INST_t
*
mac
);
void
schedule_RA_after_SR_failure
(
NR_UE_MAC_INST_t
*
mac
);
void
nr_Msg1_transmitted
(
NR_UE_MAC_INST_t
*
mac
);
void
nr_Msg3_transmitted
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
CC_id
,
frame_t
frameP
,
slot_t
slotP
,
uint8_t
gNB_id
);
void
trigger_MAC_UE_RA
(
NR_UE_MAC_INST_t
*
mac
,
dci_pdu_rel15_t
*
pdcch_order
);
void
nr_get_Msg3_MsgA_PUSCH_payload
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
*
buf
,
int
TBS_max
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
108fdae1
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
108fdae1
...
...
@@ -2083,10 +2083,7 @@ static void nr_ue_prach_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t
return
;
}
uint16_t
format
=
prach_occasion_info
->
format
;
uint16_t
format0
=
format
&
0xff
;
// single PRACH format
uint16_t
format1
=
(
format
>>
8
)
&
0xff
;
// dual PRACH format
int
format
=
prach_occasion_info
->
format
;
fapi_nr_prach_config_t
*
prach_config
=
&
mac
->
phy_config
.
config_req
.
prach_config
;
pdu
->
prach_config_pdu
=
(
fapi_nr_ul_config_prach_pdu
){
.
phys_cell_id
=
mac
->
physCellId
,
...
...
@@ -2094,7 +2091,7 @@ static void nr_ue_prach_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t
.
prach_slot
=
prach_occasion_info
->
slot
,
.
prach_start_symbol
=
prach_occasion_info
->
start_symbol
,
.
num_ra
=
prach_occasion_info
->
fdm
,
.
num_cs
=
get_NCS
(
ra
->
zeroCorrelationZoneConfig
,
format
0
,
ra
->
restricted_set_config
),
.
num_cs
=
get_NCS
(
ra
->
zeroCorrelationZoneConfig
,
format
,
ra
->
restricted_set_config
),
.
root_seq_id
=
prach_config
->
num_prach_fd_occasions_list
[
prach_occasion_info
->
fdm
].
prach_root_sequence_index
,
.
restricted_set
=
prach_config
->
restricted_set_config
,
.
freq_msg1
=
prach_config
->
num_prach_fd_occasions_list
[
prach_occasion_info
->
fdm
].
k1
};
...
...
@@ -2106,72 +2103,46 @@ static void nr_ue_prach_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t
pdu
->
prach_config_pdu
.
prach_start_symbol
,
pdu
->
prach_config_pdu
.
num_ra
);
if
(
format1
!=
0xff
)
{
switch
(
format0
)
{
// dual PRACH format
case
0xa1
:
pdu
->
prach_config_pdu
.
prach_format
=
11
;
break
;
case
0xa2
:
pdu
->
prach_config_pdu
.
prach_format
=
12
;
break
;
case
0xa3
:
pdu
->
prach_config_pdu
.
prach_format
=
13
;
break
;
default:
AssertFatal
(
1
==
0
,
"Only formats A1/B1 A2/B2 A3/B3 are valid for dual format"
);
}
}
else
{
switch
(
format0
)
{
// single PRACH format
case
0
:
pdu
->
prach_config_pdu
.
prach_format
=
0
;
break
;
case
1
:
pdu
->
prach_config_pdu
.
prach_format
=
1
;
break
;
case
2
:
pdu
->
prach_config_pdu
.
prach_format
=
2
;
break
;
case
3
:
pdu
->
prach_config_pdu
.
prach_format
=
3
;
break
;
case
0xa1
:
pdu
->
prach_config_pdu
.
prach_format
=
4
;
break
;
case
0xa2
:
pdu
->
prach_config_pdu
.
prach_format
=
5
;
break
;
case
0xa3
:
pdu
->
prach_config_pdu
.
prach_format
=
6
;
break
;
case
0xb1
:
pdu
->
prach_config_pdu
.
prach_format
=
7
;
break
;
case
0xb4
:
pdu
->
prach_config_pdu
.
prach_format
=
8
;
break
;
case
0xc0
:
pdu
->
prach_config_pdu
.
prach_format
=
9
;
break
;
case
0xc2
:
pdu
->
prach_config_pdu
.
prach_format
=
10
;
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid PRACH format"
);
}
}
// if format1
switch
(
format
)
{
// single PRACH format
case
0
:
pdu
->
prach_config_pdu
.
prach_format
=
0
;
break
;
case
1
:
pdu
->
prach_config_pdu
.
prach_format
=
1
;
break
;
case
2
:
pdu
->
prach_config_pdu
.
prach_format
=
2
;
break
;
case
3
:
pdu
->
prach_config_pdu
.
prach_format
=
3
;
break
;
case
0xa1
:
pdu
->
prach_config_pdu
.
prach_format
=
4
;
break
;
case
0xa2
:
pdu
->
prach_config_pdu
.
prach_format
=
5
;
break
;
case
0xa3
:
pdu
->
prach_config_pdu
.
prach_format
=
6
;
break
;
case
0xb1
:
pdu
->
prach_config_pdu
.
prach_format
=
7
;
break
;
case
0xb4
:
pdu
->
prach_config_pdu
.
prach_format
=
8
;
break
;
case
0xc0
:
pdu
->
prach_config_pdu
.
prach_format
=
9
;
break
;
case
0xc2
:
pdu
->
prach_config_pdu
.
prach_format
=
10
;
break
;
default:
AssertFatal
(
false
,
"Invalid PRACH format"
);
}
pdu
->
prach_config_pdu
.
ra_PreambleIndex
=
ra
->
ra_PreambleIndex
;
pdu
->
prach_config_pdu
.
prach_tx_power
=
get_prach_tx_power
(
mac
);
unsigned
int
slot_RA
;
// 3GPP TS 38.321 Section 5.1.3 says t_id for RA-RNTI depends on mu as specified in clause 5.3.2 in TS 38.211
// so mu = 0 for prach format < 4.
if
(
pdu
->
prach_config_pdu
.
prach_format
<
4
)
{
unsigned
int
slots_per_sf
=
(
1
<<
mac
->
current_UL_BWP
->
scs
);
slot_RA
=
pdu
->
prach_config_pdu
.
prach_slot
/
slots_per_sf
;
}
else
{
slot_RA
=
pdu
->
prach_config_pdu
.
prach_slot
;
}
mac
->
ra
.
ra_rnti
=
nr_get_ra_rnti
(
pdu
->
prach_config_pdu
.
prach_start_symbol
,
slot_RA
,
pdu
->
prach_config_pdu
.
num_ra
,
0
);
release_ul_config
(
pdu
,
false
);
nr_scheduled_response_t
scheduled_response
=
{.
ul_config
=
mac
->
ul_config_request
+
slotP
,
.
mac
=
mac
,
...
...
@@ -2184,7 +2155,7 @@ static void nr_ue_prach_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t
T_INT
(
pdu
->
prach_config_pdu
.
ra_PreambleIndex
),
T_INT
(
pdu
->
prach_config_pdu
.
prach_tx_power
));
if
(
ra
->
ra_type
==
RA_4_STEP
)
{
nr_Msg1_transmitted
(
mac
)
;
ra
->
ra_state
=
nrRA_WAIT_RAR
;
}
else
if
(
ra
->
ra_type
==
RA_2_STEP
)
{
NR_MsgA_PUSCH_Resource_r16_t
*
msgA_PUSCH_Resource
=
mac
->
current_UL_BWP
->
msgA_ConfigCommon_r16
->
msgA_PUSCH_Config_r16
->
msgA_PUSCH_ResourceGroupA_r16
;
...
...
@@ -2217,9 +2188,6 @@ static void nr_ue_prach_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t
remove_ul_config_last_item
(
pdu
);
release_ul_config
(
pdu
,
false
);
// Compute MsgB RNTI
ra
->
MsgB_rnti
=
nr_get_MsgB_rnti
(
prach_occasion_info
->
start_symbol
,
slot_RA
,
prach_occasion_info
->
fdm
,
0
);
LOG_D
(
NR_MAC
,
"ra->ra_state %s
\n
"
,
nrra_ue_text
[
ra
->
ra_state
]);
ra
->
ra_state
=
nrRA_WAIT_MSGB
;
ra
->
t_crnti
=
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