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
Michael Black
OpenXG-RAN
Commits
e0cdf278
Commit
e0cdf278
authored
Oct 17, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove init_msg1 and sync_frame from prach structure
parent
4940146f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
19 additions
and
38 deletions
+19
-38
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
+0
-2
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+2
-2
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+0
-4
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+2
-15
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+0
-1
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+0
-1
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+1
-1
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+1
-1
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+7
-8
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+3
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+3
-2
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
View file @
e0cdf278
...
...
@@ -110,8 +110,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
//mac_resynch();
//dl_phy_sync_success(ue->Mod_id,frame,0,1);//ue->common_vars.eNb_id);
ue
->
UE_mode
[
0
]
=
PRACH
;
ue
->
prach_resources
[
gNB_id
]
->
sync_frame
=
frame
;
ue
->
prach_resources
[
gNB_id
]
->
init_msg1
=
0
;
}
else
{
ue
->
UE_mode
[
0
]
=
PUSCH
;
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
View file @
e0cdf278
...
...
@@ -73,7 +73,6 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t
int16_t
Ncp
=
0
,
amp
,
*
prach
,
*
prach2
,
*
prachF
,
*
Xu
;
int32_t
Xu_re
,
Xu_im
;
int
prach_start
,
prach_sequence_length
,
i
,
prach_len
,
dftlen
,
mu
,
kbar
,
K
,
n_ra_prb
,
k
,
prachStartSymbol
,
sample_offset_slot
;
//int restricted_Type;
fd_occasion
=
0
;
prach_len
=
0
;
...
...
@@ -96,7 +95,8 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t
K
=
24
;
k
=
12
*
n_ra_prb
-
6
*
fp
->
N_RB_UL
;
prachStartSymbol
=
prach_pdu
->
prach_start_symbol
;
//restricted_Type = 0;
LOG_D
(
PHY
,
"Generate NR PRACH %d.%d
\n
"
,
frame
,
slot
);
compute_nr_prach_seq
(
nrUE_config
->
prach_config
.
prach_sequence_length
,
nrUE_config
->
prach_config
.
num_prach_fd_occasions_list
[
fd_occasion
].
num_root_sequences
,
...
...
openair1/PHY/defs_nr_common.h
View file @
e0cdf278
...
...
@@ -230,10 +230,6 @@ typedef struct {
int
RA_PCMAX
;
/// Corresponding RA-RNTI for UL-grant
uint16_t
ra_RNTI
;
/// Frame of last completed synch
uint16_t
sync_frame
;
/// Flag to indicate that prach is ready to start: it is enabled with an initial delay after the sync
uint8_t
init_msg1
;
}
NR_PRACH_RESOURCES_t
;
typedef
struct
{
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
e0cdf278
...
...
@@ -395,8 +395,6 @@ static void nr_ue_pbch_procedures(uint8_t gNB_id,
if
(
ue
->
UE_mode
[
gNB_id
]
==
NOT_SYNCHED
&&
ue
->
no_timing_correction
==
1
){
if
(
get_softmodem_params
()
->
do_ra
)
{
ue
->
UE_mode
[
gNB_id
]
=
PRACH
;
ue
->
prach_resources
[
gNB_id
]
->
sync_frame
=
frame_rx
;
ue
->
prach_resources
[
gNB_id
]
->
init_msg1
=
0
;
}
else
{
ue
->
UE_mode
[
gNB_id
]
=
PUSCH
;
}
...
...
@@ -1458,19 +1456,8 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH
,
VCD_FUNCTION_IN
);
if
(
ue
->
mac_enabled
==
0
){
prach_resources
->
ra_TDD_map_index
=
0
;
prach_resources
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
=
10
;
prach_resources
->
ra_RNTI
=
0x1234
;
nr_prach
=
1
;
prach_resources
->
init_msg1
=
1
;
}
else
{
nr_prach
=
nr_ue_get_rach
(
prach_resources
,
&
ue
->
prach_vars
[
0
]
->
prach_pdu
,
mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
,
nr_slot_tx
);
LOG_D
(
PHY
,
"In %s:[%d.%d] getting PRACH resources : %d
\n
"
,
__FUNCTION__
,
frame_tx
,
nr_slot_tx
,
nr_prach
);
}
nr_prach
=
nr_ue_get_rach
(
prach_resources
,
&
ue
->
prach_vars
[
0
]
->
prach_pdu
,
mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
,
nr_slot_tx
);
LOG_D
(
PHY
,
"In %s:[%d.%d] getting PRACH resources : %d
\n
"
,
__FUNCTION__
,
frame_tx
,
nr_slot_tx
,
nr_prach
);
if
(
nr_prach
==
GENERATE_PREAMBLE
)
{
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
e0cdf278
...
...
@@ -718,7 +718,6 @@ int main(int argc, char **argv){
printf
(
"raPreamble %d
\n
"
,
preamble_tx
);
UE
->
prach_resources
[
0
]
->
ra_PreambleIndex
=
preamble_tx
;
UE
->
prach_resources
[
0
]
->
init_msg1
=
1
;
// Configure channel
bw
=
N_RB_UL
*
(
180e3
)
*
(
1
<<
frame_parms
->
numerology_index
);
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
e0cdf278
...
...
@@ -632,7 +632,6 @@ int nr_rrc_mac_config_req_ue(
build_ssb_to_ro_map
(
mac
);
//->scc, mac->phy_config.config_req.cell_config.frame_duplex_type);
if
(
!
get_softmodem_params
()
->
emulate_l1
)
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
mac
->
common_configuration_complete
=
1
;
}
if
(
scell_group_config
!=
NULL
){
mac
->
cg
=
scell_group_config
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
e0cdf278
...
...
@@ -355,7 +355,7 @@ typedef struct {
NR_CSI_ReportConfig_t
*
csirc
;
long
physCellId
;
//// MAC config
int
common_configuration_complet
e
;
int
first_sync_fram
e
;
NR_DRX_Config_t
*
drx_Config
;
NR_SchedulingRequestConfig_t
*
schedulingRequestConfig
;
NR_BSR_Config_t
*
bsr_Config
;
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
e0cdf278
...
...
@@ -52,12 +52,12 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) {
//init mac here
nr_ue_mac_inst
=
(
NR_UE_MAC_INST_t
*
)
calloc
(
sizeof
(
NR_UE_MAC_INST_t
),
NB_NR_UE_MAC_INST
);
nr_ue_mac_inst
->
first_sync_frame
=
-
1
;
for
(
int
j
=
0
;
j
<
NB_NR_UE_MAC_INST
;
j
++
)
{
nr_ue_init_mac
(
j
);
}
if
(
rrc_inst
&&
rrc_inst
->
scell_group_config
)
{
nr_rrc_mac_config_req_ue
(
0
,
0
,
0
,
NULL
,
NULL
,
NULL
,
rrc_inst
->
scell_group_config
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
e0cdf278
...
...
@@ -677,26 +677,25 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
=
ra
->
rach_ConfigDedicated
;
// Delay init RA procedure to allow the convergence of the IIR filter on PRACH noise measurements at gNB side
if
(
!
prach_resources
->
init_msg1
)
{
if
((
mac
->
common_configuration_complete
>
0
||
get_softmodem_params
()
->
do_ra
||
get_softmodem_params
()
->
nsa
)
&&
((
MAX_FRAME_NUMBER
+
frame
-
prach_resources
->
sync_frame
)
%
MAX_FRAME_NUMBER
)
>
150
)
{
prach_resources
->
init_msg1
=
1
;
if
(
ra
->
ra_state
==
RA_UE_IDLE
)
{
if
((
mac
->
first_sync_frame
>
-
1
||
get_softmodem_params
()
->
do_ra
||
get_softmodem_params
()
->
nsa
)
&&
((
MAX_FRAME_NUMBER
+
frame
-
mac
->
first_
sync_frame
)
%
MAX_FRAME_NUMBER
)
>
150
)
{
ra
->
ra_state
=
GENERATE_PREAMBLE
;
}
else
{
LOG_D
(
NR_MAC
,
"PRACH Condition not met:
frame %d, prach_resources->sync_frame %d
\n
"
,
frame
,
prach_resources
->
sync_frame
);
LOG_D
(
NR_MAC
,
"PRACH Condition not met:
ra state %d, frame %d, prach_resources->sync_frame %d
\n
"
,
ra
->
ra_state
,
frame
,
mac
->
first_
sync_frame
);
return
0
;
}
}
LOG_D
(
NR_MAC
,
"In %s: [UE %d][%d.%d]:
init_msg1 %d,
ra_state %d, RA_active %d
\n
"
,
LOG_D
(
NR_MAC
,
"In %s: [UE %d][%d.%d]: ra_state %d, RA_active %d
\n
"
,
__FUNCTION__
,
mod_id
,
frame
,
nr_slot_tx
,
prach_resources
->
init_msg1
,
ra
->
ra_state
,
ra
->
RA_active
);
if
(
prach_resources
->
init_msg1
&&
ra
->
ra_state
!=
RA_SUCCEEDED
)
{
if
(
ra
->
ra_state
>
RA_UE_IDLE
&&
ra
->
ra_state
<
RA_SUCCEEDED
)
{
if
(
ra
->
RA_active
==
0
)
{
/* RA not active - checking if RRC is ready to initiate the RA procedure */
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
e0cdf278
...
...
@@ -374,7 +374,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
else
ssb_sc_offset_norm
=
ssb_subcarrier_offset
;
if
(
mac
->
common_configuration_complete
==
0
)
if
(
mac
->
first_sync_frame
==
-
1
)
nr_ue_sib1_scheduler
(
module_id
,
cc_id
,
ssb_start_symbol
,
...
...
@@ -394,6 +394,8 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
mac
->
dl_config_request
.
sfn
=
frame
;
mac
->
dl_config_request
.
slot
=
ssb_start_symbol
/
14
;
if
(
mac
->
first_sync_frame
==
-
1
)
mac
->
first_sync_frame
=
frame
;
return
0
;
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
e0cdf278
...
...
@@ -2699,7 +2699,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
(
int
)
slotP
,
&
prach_occasion_info_p
);
if
(
is_nr_prach_slot
&&
ra
->
ra_state
==
RA_UE_ID
LE
)
{
if
(
is_nr_prach_slot
&&
ra
->
ra_state
==
GENERATE_PREAMB
LE
)
{
AssertFatal
(
NULL
!=
prach_occasion_info_p
,
"PRACH Occasion Info not returned in a valid NR Prach Slot
\n
"
);
ra
->
generate_nr_prach
=
GENERATE_PREAMBLE
;
...
...
@@ -2733,7 +2733,8 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
prach_config_pdu
->
restricted_set
=
prach_config
->
restricted_set_config
;
prach_config_pdu
->
freq_msg1
=
prach_config
->
num_prach_fd_occasions_list
[
prach_occasion_info_p
->
fdm
].
k1
;
LOG_D
(
NR_MAC
,
"Selected RO Frame %u, Slot %u, Symbol %u, Fdm %u
\n
"
,
frameP
,
prach_config_pdu
->
prach_slot
,
prach_config_pdu
->
prach_start_symbol
,
prach_config_pdu
->
num_ra
);
LOG_D
(
NR_MAC
,
"PRACH scheduler: Selected RO Frame %u, Slot %u, Symbol %u, Fdm %u
\n
"
,
frameP
,
prach_config_pdu
->
prach_slot
,
prach_config_pdu
->
prach_start_symbol
,
prach_config_pdu
->
num_ra
);
// Search which SSB is mapped in the RO (among all the SSBs mapped to this RO)
for
(
prach_config_pdu
->
ssb_nb_in_ro
=
0
;
prach_config_pdu
->
ssb_nb_in_ro
<
prach_occasion_info_p
->
nb_mapped_ssb
;
prach_config_pdu
->
ssb_nb_in_ro
++
)
{
...
...
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