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
dea9271b
Commit
dea9271b
authored
Mar 22, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_UE_fix_T300_expiry' into integration_2024_w12
parents
00e549aa
ee3dcc5c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
51 additions
and
46 deletions
+51
-46
executables/nr-ue.c
executables/nr-ue.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+32
-27
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+1
-1
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+4
-4
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+0
-1
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+6
-6
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+0
-2
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+5
-2
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+1
-1
No files found.
executables/nr-ue.c
View file @
dea9271b
...
...
@@ -440,7 +440,7 @@ static void UE_synch(void *arg) {
uint64_t
dl_carrier
,
ul_carrier
;
nr_get_carrier_frequencies
(
UE
,
&
dl_carrier
,
&
ul_carrier
);
nr_initial_sync_t
ret
=
nr_initial_sync
(
&
syncD
->
proc
,
UE
,
2
,
get_softmodem_params
()
->
sa
);
if
(
!
ret
.
cell_not
detected
)
{
if
(
ret
.
cell_
detected
)
{
syncD
->
rx_offset
=
ret
.
rx_offset
;
freq_offset
=
UE
->
common_vars
.
freq_offset
;
// frequency offset computed with pss in initial sync
hw_slot_offset
=
...
...
@@ -538,7 +538,7 @@ void processSlotTX(void *arg)
{
nr_rxtx_thread_data_t
*
rxtxD
=
(
nr_rxtx_thread_data_t
*
)
arg
;
const
UE_nr_rxtx_proc_t
*
proc
=
&
rxtxD
->
proc
;
PHY_VARS_NR_UE
*
UE
=
rxtxD
->
UE
;
PHY_VARS_NR_UE
*
UE
=
rxtxD
->
UE
;
nr_phy_data_tx_t
phy_data
=
{
0
};
if
(
UE
->
if_inst
)
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
dea9271b
...
...
@@ -100,13 +100,12 @@ void free_list(NR_UE_SSB *node) {
free
(
node
);
}
int
nr_pbch_detection
(
const
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
ue
,
int
pbch_initial_symbol
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
static
bool
nr_pbch_detection
(
const
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
ue
,
int
pbch_initial_symbol
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
{
NR_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
int
ret
=-
1
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
NR_UE_SSB
*
best_ssb
=
NULL
;
NR_UE_SSB
*
current_ssb
;
...
...
@@ -138,8 +137,9 @@ int nr_pbch_detection(const UE_nr_rxtx_proc_t *proc,
}
}
NR_UE_SSB
*
temp_ptr
=
best_ssb
;
while
(
ret
!=
0
&&
temp_ptr
!=
NULL
)
{
NR_UE_SSB
*
temp_ptr
=
best_ssb
;
bool
ret
=
false
;
while
(
!
ret
&&
temp_ptr
!=
NULL
)
{
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
// computing channel estimation for selected best ssb
...
...
@@ -153,11 +153,18 @@ int nr_pbch_detection(const UE_nr_rxtx_proc_t *proc,
stop_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
fapiPbch_t
result
=
{
0
};
ret
=
nr_rx_pbch
(
ue
,
proc
,
estimateSz
,
dl_ch_estimates
,
frame_parms
,
temp_ptr
->
i_ssb
,
&
result
,
rxdataF
);
if
(
DUMP_PBCH_CH_ESTIMATES
&&
(
ret
==
0
))
{
int
pbch_res
=
nr_rx_pbch
(
ue
,
proc
,
estimateSz
,
dl_ch_estimates
,
frame_parms
,
temp_ptr
->
i_ssb
,
&
result
,
rxdataF
);
ret
=
pbch_res
==
0
;
if
(
DUMP_PBCH_CH_ESTIMATES
&&
ret
)
{
write_output
(
"pbch_ch_estimates.m"
,
"pbch_ch_estimates"
,
dl_ch_estimates
,
frame_parms
->
nb_antennas_rx
*
estimateSz
,
1
,
1
);
write_output
(
"pbch_ch_estimates_time.m"
,
"pbch_ch_estimates_time"
,
dl_ch_estimates_time
,
frame_parms
->
nb_antennas_rx
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
write_output
(
"pbch_ch_estimates_time.m"
,
"pbch_ch_estimates_time"
,
dl_ch_estimates_time
,
frame_parms
->
nb_antennas_rx
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
}
temp_ptr
=
temp_ptr
->
next_ssb
;
...
...
@@ -165,14 +172,10 @@ int nr_pbch_detection(const UE_nr_rxtx_proc_t *proc,
free_list
(
best_ssb
);
if
(
ret
==
0
)
if
(
ret
)
{
frame_parms
->
nb_antenna_ports_gNB
=
1
;
// pbch_tx_ant;
// set initial transmission mode to 1 or 2 depending on number of detected TX antennas
// frame_parms->mode1_flag = (pbch_tx_ant==1);
// openair_daq_vars.dlsch_transmission_mode = (pbch_tx_ant>1) ? 2 : 1;
LOG_I
(
PHY
,
"[UE%d] Initial sync: pbch decoded sucessfully, ssb index %d
\n
"
,
ue
->
Mod_id
,
frame_parms
->
ssb_index
);
LOG_I
(
PHY
,
"[UE%d] Initial sync: pbch decoded sucessfully, ssb index %d
\n
"
,
ue
->
Mod_id
,
frame_parms
->
ssb_index
);
}
return
ret
;
}
...
...
@@ -262,7 +265,7 @@ nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, i
int
freq_offset_sss
=
0
;
bool
ret_sss
=
rx_sss_nr
(
ue
,
proc
,
&
metric_tdd_ncp
,
&
phase_tdd_ncp
,
&
freq_offset_sss
,
rxdataF
);
ret
.
cell_
notdetected
=
!
ret_sss
;
// rx_sss_nr returns true if success
ret
.
cell_
detected
=
ret_sss
;
// rx_sss_nr returns true if success
// digital compensation of FFO for SSB symbols
if
(
ue
->
UE_fo_compensation
)
{
double
s_time
=
1
/
(
1.0e3
*
fp
->
samples_per_subframe
);
// sampling time
...
...
@@ -282,12 +285,12 @@ nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, i
ue
->
common_vars
.
freq_offset
+=
freq_offset_sss
;
}
if
(
ret
.
cell_
notdetected
==
0
)
{
// we got sss channel
if
(
ret
.
cell_
detected
)
{
// we got sss channel
nr_gold_pbch
(
ue
);
ret
.
cell_
not
detected
=
nr_pbch_detection
(
proc
,
ue
,
1
,
rxdataF
);
// start pbch detection at first symbol after pss
ret
.
cell_detected
=
nr_pbch_detection
(
proc
,
ue
,
1
,
rxdataF
);
// start pbch detection at first symbol after pss
}
if
(
ret
.
cell_
notdetected
==
0
)
{
if
(
ret
.
cell_
detected
)
{
// sync at symbol ue->symbol_offset
// computing the offset wrt the beginning of the frame
int
mu
=
fp
->
numerology_index
;
...
...
@@ -347,7 +350,7 @@ nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, i
fp
->
Nid_cell
,
metric_tdd_ncp
,
phase_tdd_ncp
,
!
ret
.
cell_not
detected
,
ret
.
cell_
detected
,
ret
.
rx_offset
);
#endif
...
...
@@ -356,11 +359,11 @@ nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, i
LOG_I
(
PHY
,
"TDD Normal prefix: SSS error condition: sync_pos %d
\n
"
,
sync_pos
);
#endif
}
if
(
ret
.
cell_
notdetected
==
0
)
if
(
ret
.
cell_
detected
)
break
;
}
}
else
{
ret
.
cell_
notdetected
=
tru
e
;
ret
.
cell_
detected
=
fals
e
;
}
/* Consider this is a false detection if the offset is > 1000 Hz
...
...
@@ -371,7 +374,7 @@ nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, i
LOG_E(HW, "Ignore MIB with high freq offset [%d Hz] estimation \n",ue->common_vars.freq_offset);
}*/
if
(
ret
.
cell_
notdetected
==
0
)
{
// PBCH found so indicate sync to higher layers and configure frame parameters
if
(
ret
.
cell_
detected
)
{
// PBCH found so indicate sync to higher layers and configure frame parameters
//#ifdef DEBUG_INITIAL_SYNCH
...
...
@@ -406,7 +409,7 @@ nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, i
}
// gain control
if
(
ret
.
cell_notdetected
!=
0
)
{
// we are not synched, so we cannot use rssi measurement (which is based on channel estimates)
if
(
!
ret
.
cell_detected
)
{
// we are not synched, so we cannot use rssi measurement (which is based on channel estimates)
int
rx_power
=
0
;
// do a measurement on the best guess of the PSS
...
...
@@ -429,6 +432,8 @@ nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, i
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated power: %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
measurements
.
rx_power_avg_dB
[
0
]);
#endif
}
else
{
LOG_A
(
PHY
,
"Initial sync successful
\n
"
);
}
// exit_fun("debug exit");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC
,
VCD_FUNCTION_OUT
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
dea9271b
...
...
@@ -319,7 +319,7 @@ int dump_ue_stats(PHY_VARS_NR_UE *phy_vars_ue,
@param sa current running mode
*/
typedef
struct
{
bool
cell_
not
detected
;
bool
cell_detected
;
int
rx_offset
;
}
nr_initial_sync_t
;
nr_initial_sync_t
nr_initial_sync
(
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
phy_vars_ue
,
int
n_frames
,
int
sa
);
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
dea9271b
...
...
@@ -766,10 +766,10 @@ int main(int argc, char **argv)
}
if
(
UE
->
is_synchronized
==
0
)
{
UE_nr_rxtx_proc_t
proc
=
{
0
};
nr_initial_sync_t
ret
=
nr_initial_sync
(
&
proc
,
UE
,
1
,
0
);
printf
(
"nr_initial_sync1 returns %d
\n
"
,
ret
.
cell_notdetected
);
if
(
ret
.
cell_not
detected
)
n_errors
++
;
nr_initial_sync_t
ret
=
nr_initial_sync
(
&
proc
,
UE
,
1
,
0
);
printf
(
"nr_initial_sync1 returns %s
\n
"
,
ret
.
cell_detected
?
"cell detected"
:
"cell not detected"
);
if
(
!
ret
.
cell_
detected
)
n_errors
++
;
}
else
{
UE_nr_rxtx_proc_t
proc
=
{
0
};
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
dea9271b
...
...
@@ -1358,7 +1358,6 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id,
NR_UE_MAC_reset_cause_t
cause
)
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
switch
(
cause
)
{
case
GO_TO_IDLE
:
reset_ra
(
&
mac
->
ra
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
dea9271b
...
...
@@ -86,26 +86,26 @@ void init_RA(NR_UE_MAC_INST_t *mac,
if
(
rach_ConfigDedicated
)
{
if
(
rach_ConfigDedicated
->
cfra
){
LOG_I
(
MAC
,
"Initialization of 2-step contention-free random access procedure
\n
"
);
LOG_I
(
NR_
MAC
,
"Initialization of 2-step contention-free random access procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_2STEP
;
ra
->
cfra
=
1
;
}
else
if
(
rach_ConfigDedicated
->
ext1
){
if
(
rach_ConfigDedicated
->
ext1
->
cfra_TwoStep_r16
){
LOG_I
(
MAC
,
"Setting RA type to 2-step...
\n
"
);
LOG_I
(
NR_
MAC
,
"Setting RA type to 2-step...
\n
"
);
prach_resources
->
RA_TYPE
=
RA_2STEP
;
ra
->
cfra
=
1
;
}
else
{
LOG_E
(
MAC
,
"Config not handled
\n
"
);
LOG_E
(
NR_
MAC
,
"Config not handled
\n
"
);
}
}
else
{
LOG_E
(
MAC
,
"Config not handled
\n
"
);
LOG_E
(
NR_
MAC
,
"Config not handled
\n
"
);
}
}
else
if
(
nr_rach_ConfigCommon
){
LOG_I
(
MAC
,
"Initialization of 4-step contention-based random access procedure
\n
"
);
LOG_I
(
NR_
MAC
,
"Initialization of 4-step contention-based random access procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_4STEP
;
ra
->
cfra
=
0
;
}
else
{
LOG_E
(
MAC
,
"Config not handled
\n
"
);
LOG_E
(
NR_
MAC
,
"Config not handled
\n
"
);
}
switch
(
rach_ConfigGeneric
->
powerRampingStep
){
// in dB
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
dea9271b
...
...
@@ -41,10 +41,8 @@
#include <asn_application.h>
#include "RRC/NR/nr_rrc_defs.h"
#include "RRC/NR/nr_rrc_config.h"
/*
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
* output into the chosen string buffer.
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
dea9271b
...
...
@@ -616,7 +616,7 @@ static void nr_rrc_handle_msg3_indication(NR_UE_RRC_INST_t *rrc, rnti_t rnti)
{
NR_UE_Timers_Constants_t
*
tac
=
&
rrc
->
timers_and_constants
;
switch
(
rrc
->
ra_trigger
)
{
case
INITIAL_ACCESS_FROM_RRC_IDLE
:
case
RRC_CONNECTION_SETUP
:
// After SIB1 is received, prepare RRCConnectionRequest
rrc
->
rnti
=
rnti
;
// start timer T300
...
...
@@ -744,7 +744,7 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(NR_UE_RRC_INST_t *rrc,
LOG_A
(
NR_RRC
,
"SIB1 decoded
\n
"
);
nr_timer_start
(
&
SI_info
->
sib1_timer
);
if
(
rrc
->
nrRrcState
==
RRC_STATE_IDLE_NR
)
{
rrc
->
ra_trigger
=
INITIAL_ACCESS_FROM_RRC_IDLE
;
rrc
->
ra_trigger
=
RRC_CONNECTION_SETUP
;
// preparing RRC setup request payload in advance
nr_rrc_ue_prepare_RRCSetupRequest
(
rrc
);
}
...
...
@@ -2221,6 +2221,9 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
void
handle_t300_expiry
(
NR_UE_RRC_INST_t
*
rrc
)
{
rrc
->
ra_trigger
=
RRC_CONNECTION_SETUP
;
nr_rrc_ue_prepare_RRCSetupRequest
(
rrc
);
// reset MAC, release the MAC configuration
NR_UE_MAC_reset_cause_t
cause
=
T300_EXPIRY
;
nr_rrc_mac_config_req_reset
(
rrc
->
ue_id
,
cause
);
...
...
openair2/RRC/NR_UE/rrc_defs.h
View file @
dea9271b
...
...
@@ -105,7 +105,7 @@ typedef enum requested_SI_List_e {
// 3GPP TS 38.300 Section 9.2.6
typedef
enum
RA_trigger_e
{
RA_NOT_RUNNING
,
INITIAL_ACCESS_FROM_RRC_IDLE
,
RRC_CONNECTION_SETUP
,
RRC_CONNECTION_REESTABLISHMENT
,
DURING_HANDOVER
,
NON_SYNCHRONISED
,
...
...
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