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
zzha zzha
OpenXG-RAN
Commits
6e4787a5
Commit
6e4787a5
authored
Jan 29, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_reworking_timers' into integration_2024_w04
parents
2f0c302e
65a8f073
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
378 additions
and
329 deletions
+378
-329
common/utils/nr/nr_common.c
common/utils/nr/nr_common.c
+41
-0
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+43
-0
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+59
-89
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+25
-46
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+4
-4
openair2/RRC/NR_UE/rrc_timers_and_constants.c
openair2/RRC/NR_UE/rrc_timers_and_constants.c
+206
-190
No files found.
common/utils/nr/nr_common.c
View file @
6e4787a5
...
@@ -865,3 +865,44 @@ void nr_est_delay(int ofdm_symbol_size, const c16_t *ls_est, c16_t *ch_estimates
...
@@ -865,3 +865,44 @@ void nr_est_delay(int ofdm_symbol_size, const c16_t *ls_est, c16_t *ch_estimates
delay
->
delay_max_val
=
max_val
;
delay
->
delay_max_val
=
max_val
;
delay
->
est_delay
=
max_pos
-
sync_pos
;
delay
->
est_delay
=
max_pos
-
sync_pos
;
}
}
void
nr_timer_start
(
NR_timer_t
*
timer
)
{
timer
->
active
=
true
;
timer
->
counter
=
0
;
}
void
nr_timer_stop
(
NR_timer_t
*
timer
)
{
timer
->
active
=
false
;
timer
->
counter
=
0
;
}
bool
is_nr_timer_active
(
NR_timer_t
timer
)
{
return
timer
.
active
;
}
bool
nr_timer_tick
(
NR_timer_t
*
timer
)
{
bool
expired
=
false
;
if
(
timer
->
active
)
{
timer
->
counter
+=
timer
->
step
;
expired
=
nr_timer_expired
(
*
timer
);
if
(
expired
)
timer
->
active
=
false
;
}
return
expired
;
}
bool
nr_timer_expired
(
NR_timer_t
timer
)
{
return
(
timer
.
counter
>=
timer
.
target
);
}
void
nr_timer_setup
(
NR_timer_t
*
timer
,
const
uint32_t
target
,
const
uint32_t
step
)
{
timer
->
target
=
target
;
timer
->
step
=
step
;
nr_timer_stop
(
timer
);
}
common/utils/nr/nr_common.h
View file @
6e4787a5
...
@@ -116,6 +116,49 @@ typedef struct {
...
@@ -116,6 +116,49 @@ typedef struct {
int
delay_max_val
;
int
delay_max_val
;
}
delay_t
;
}
delay_t
;
typedef
struct
{
bool
active
;
uint32_t
counter
;
uint32_t
target
;
uint32_t
step
;
}
NR_timer_t
;
/**
* @brief To start a timer
* @param timer Timer to be started
*/
void
nr_timer_start
(
NR_timer_t
*
timer
);
/**
* @brief To stop a timer
* @param timer Timer to stopped
*/
void
nr_timer_stop
(
NR_timer_t
*
timer
);
/**
* @brief If active, it increases timer counter by an amout of units equal to step. It stops timer if expired
* @param timer Timer to be handled
* @return Indication if the timer is expired or not
*/
bool
nr_timer_tick
(
NR_timer_t
*
timer
);
/**
* @brief To setup a timer
* @param timer Timer to setup
* @param target Target value for timer (when reached, timer is considered expired)
* @param step Amount of units to add to timer counter every tick
*/
void
nr_timer_setup
(
NR_timer_t
*
timer
,
const
uint32_t
target
,
const
uint32_t
step
);
/**
* @brief To check if a timer is expired
* @param timer Timer to be checked
* @return Indication if the timer is expired or not
*/
bool
nr_timer_expired
(
NR_timer_t
timer
);
/**
* @brief To check if a timer is active
* @param timer Timer to be checked
* @return Indication if the timer is active or not
*/
bool
is_nr_timer_active
(
NR_timer_t
timer
);
extern
const
nr_bandentry_t
nr_bandtable
[];
extern
const
nr_bandentry_t
nr_bandtable
[];
static
inline
int
get_num_dmrs
(
uint16_t
dmrs_mask
)
{
static
inline
int
get_num_dmrs
(
uint16_t
dmrs_mask
)
{
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
6e4787a5
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_defs.h
View file @
6e4787a5
...
@@ -114,74 +114,53 @@ typedef enum RA_trigger_e {
...
@@ -114,74 +114,53 @@ typedef enum RA_trigger_e {
typedef
struct
UE_RRC_SI_INFO_NR_s
{
typedef
struct
UE_RRC_SI_INFO_NR_s
{
uint32_t
default_otherSI_map
;
uint32_t
default_otherSI_map
;
NR_SIB1_t
*
sib1
;
NR_SIB1_t
*
sib1
;
in
t
sib1_timer
;
NR_timer_
t
sib1_timer
;
NR_SIB2_t
*
sib2
;
NR_SIB2_t
*
sib2
;
in
t
sib2_timer
;
NR_timer_
t
sib2_timer
;
NR_SIB3_t
*
sib3
;
NR_SIB3_t
*
sib3
;
in
t
sib3_timer
;
NR_timer_
t
sib3_timer
;
NR_SIB4_t
*
sib4
;
NR_SIB4_t
*
sib4
;
in
t
sib4_timer
;
NR_timer_
t
sib4_timer
;
NR_SIB5_t
*
sib5
;
NR_SIB5_t
*
sib5
;
in
t
sib5_timer
;
NR_timer_
t
sib5_timer
;
NR_SIB6_t
*
sib6
;
NR_SIB6_t
*
sib6
;
in
t
sib6_timer
;
NR_timer_
t
sib6_timer
;
NR_SIB7_t
*
sib7
;
NR_SIB7_t
*
sib7
;
in
t
sib7_timer
;
NR_timer_
t
sib7_timer
;
NR_SIB8_t
*
sib8
;
NR_SIB8_t
*
sib8
;
in
t
sib8_timer
;
NR_timer_
t
sib8_timer
;
NR_SIB9_t
*
sib9
;
NR_SIB9_t
*
sib9
;
in
t
sib9_timer
;
NR_timer_
t
sib9_timer
;
NR_SIB10_r16_t
*
sib10
;
NR_SIB10_r16_t
*
sib10
;
in
t
sib10_timer
;
NR_timer_
t
sib10_timer
;
NR_SIB11_r16_t
*
sib11
;
NR_SIB11_r16_t
*
sib11
;
in
t
sib11_timer
;
NR_timer_
t
sib11_timer
;
NR_SIB12_r16_t
*
sib12
;
NR_SIB12_r16_t
*
sib12
;
in
t
sib12_timer
;
NR_timer_
t
sib12_timer
;
NR_SIB13_r16_t
*
sib13
;
NR_SIB13_r16_t
*
sib13
;
in
t
sib13_timer
;
NR_timer_
t
sib13_timer
;
NR_SIB14_r16_t
*
sib14
;
NR_SIB14_r16_t
*
sib14
;
in
t
sib14_timer
;
NR_timer_
t
sib14_timer
;
}
__attribute__
((
__packed__
))
NR_UE_RRC_SI_INFO
;
}
NR_UE_RRC_SI_INFO
;
typedef
struct
NR_UE_Timers_Constants_s
{
typedef
struct
NR_UE_Timers_Constants_s
{
// timers status
bool
T300_active
;
bool
T301_active
;
bool
T302_active
;
bool
T304_active
;
bool
T310_active
;
bool
T311_active
;
bool
T319_active
;
bool
T320_active
;
bool
T325_active
;
bool
T390_active
;
// timers
// timers
uint32_t
T300_cnt
;
NR_timer_t
T300
;
uint32_t
T301_cnt
;
NR_timer_t
T301
;
uint32_t
T302_cnt
;
NR_timer_t
T302
;
uint32_t
T304_cnt
;
NR_timer_t
T304
;
uint32_t
T310_cnt
;
NR_timer_t
T310
;
uint32_t
T311_cnt
;
NR_timer_t
T311
;
uint32_t
T319_cnt
;
NR_timer_t
T319
;
uint32_t
T320_cnt
;
NR_timer_t
T320
;
uint32_t
T325_cnt
;
NR_timer_t
T325
;
uint32_t
T390_cnt
;
NR_timer_t
T390
;
// counters
// counters
uint32_t
N310_cnt
;
uint32_t
N310_cnt
;
uint32_t
N311_cnt
;
uint32_t
N311_cnt
;
// constants (limits configured by the network)
// constants (limits configured by the network)
uint32_t
N310_k
;
uint32_t
N310_k
;
uint32_t
N311_k
;
uint32_t
N311_k
;
uint32_t
T300_k
;
uint32_t
T301_k
;
uint32_t
T302_k
;
uint32_t
T304_k
;
uint32_t
T310_k
;
uint32_t
T311_k
;
uint32_t
T319_k
;
uint32_t
T320_k
;
uint32_t
T325_k
;
uint32_t
T390_k
;
}
NR_UE_Timers_Constants_t
;
}
NR_UE_Timers_Constants_t
;
typedef
enum
{
typedef
enum
{
...
...
openair2/RRC/NR_UE/rrc_proto.h
View file @
6e4787a5
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#ifndef _RRC_PROTO_H_
#ifndef _RRC_PROTO_H_
#define _RRC_PROTO_H_
#define _RRC_PROTO_H_
#include "oai_asn1.h"
#include "rrc_defs.h"
#include "rrc_defs.h"
#include "NR_RRCReconfiguration.h"
#include "NR_RRCReconfiguration.h"
#include "NR_MeasConfig.h"
#include "NR_MeasConfig.h"
...
@@ -108,6 +108,7 @@ extern void start_oai_nrue_threads(void);
...
@@ -108,6 +108,7 @@ extern void start_oai_nrue_threads(void);
int
get_from_lte_ue_fd
();
int
get_from_lte_ue_fd
();
void
nr_rrc_SI_timers
(
NR_UE_RRC_SI_INFO
*
SInfo
);
void
nr_rrc_SI_timers
(
NR_UE_RRC_SI_INFO
*
SInfo
);
void
init_SI_timers
(
NR_UE_RRC_SI_INFO
*
SInfo
);
void
nr_ue_rrc_timer_trigger
(
int
module_id
,
int
frame
,
int
gnb_id
);
void
nr_ue_rrc_timer_trigger
(
int
module_id
,
int
frame
,
int
gnb_id
);
void
handle_t300_expiry
(
NR_UE_RRC_INST_t
*
rrc
);
void
handle_t300_expiry
(
NR_UE_RRC_INST_t
*
rrc
);
...
@@ -115,9 +116,8 @@ void handle_t300_expiry(NR_UE_RRC_INST_t *rrc);
...
@@ -115,9 +116,8 @@ void handle_t300_expiry(NR_UE_RRC_INST_t *rrc);
void
reset_rlf_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
void
reset_rlf_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
void
set_default_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
void
set_default_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
void
nr_rrc_set_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_SIB1_t
*
sib1
);
void
nr_rrc_set_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_SIB1_t
*
sib1
);
void
nr_rrc_set_T304
(
NR_UE_Timers_Constants_t
*
tac
,
NR_ReconfigurationWithSync_t
*
reconfigurationWithSync
);
int
nr_rrc_get_T304
(
long
t304
);
void
handle_rlf_sync
(
NR_UE_Timers_Constants_t
*
tac
,
void
handle_rlf_sync
(
NR_UE_Timers_Constants_t
*
tac
,
nr_sync_msg_t
sync_msg
);
nr_sync_msg_t
sync_msg
);
void
nr_rrc_handle_SetupRelease_RLF_TimersAndConstants
(
NR_UE_RRC_INST_t
*
rrc
,
void
nr_rrc_handle_SetupRelease_RLF_TimersAndConstants
(
NR_UE_RRC_INST_t
*
rrc
,
struct
NR_SetupRelease_RLF_TimersAndConstants
*
rlf_TimersAndConstants
);
struct
NR_SetupRelease_RLF_TimersAndConstants
*
rlf_TimersAndConstants
);
...
...
openair2/RRC/NR_UE/rrc_timers_and_constants.c
View file @
6e4787a5
This diff is collapsed.
Click to expand it.
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