Commit 681706b6 authored by rmagueta's avatar rmagueta

Define RA_trigger

parent f93413e1
...@@ -160,6 +160,19 @@ typedef struct Type0_PDCCH_CSS_config_s { ...@@ -160,6 +160,19 @@ typedef struct Type0_PDCCH_CSS_config_s {
uint32_t cset_start_rb; uint32_t cset_start_rb;
} NR_Type0_PDCCH_CSS_config_t; } NR_Type0_PDCCH_CSS_config_t;
// 3GPP TS 38.300 Section 9.2.6
typedef enum RA_trigger_e {
RA_NOT_RUNNING,
INITIAL_ACCESS_FROM_RRC_IDLE,
RRC_CONNECTION_REESTABLISHMENT,
DURING_HANDOVER,
NON_SYNCHRONISED,
TRANSITION_FROM_RRC_INACTIVE,
TO_ESTABLISH_TA,
REQUEST_FOR_OTHER_SI,
BEAM_FAILURE_RECOVERY,
} RA_trigger_t;
uint16_t config_bandwidth(int mu, int nb_rb, int nr_band); uint16_t config_bandwidth(int mu, int nb_rb, int nr_band);
void get_frame_type(uint16_t nr_bandP, uint8_t scs_index, lte_frame_type_t *current_type); void get_frame_type(uint16_t nr_bandP, uint8_t scs_index, lte_frame_type_t *current_type);
......
...@@ -272,8 +272,9 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, ...@@ -272,8 +272,9 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
} }
// PRACH configuration // PRACH configuration
uint8_t nb_preambles = 64; uint8_t nb_preambles = 64;
mac->ra_trigger = RA_NOT_RUNNING;
if(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles != NULL) if(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles != NULL)
nb_preambles = *scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles; nb_preambles = *scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles;
......
...@@ -185,6 +185,8 @@ typedef struct { ...@@ -185,6 +185,8 @@ typedef struct {
/* Random Access parameters */ /* Random Access parameters */
/// state of RA procedure /// state of RA procedure
RA_state_t ra_state; RA_state_t ra_state;
/// trigger of RA procedure
RA_trigger_t ra_trigger;
/// RA rx frame offset: compensate RA rx offset introduced by OAI gNB. /// RA rx frame offset: compensate RA rx offset introduced by OAI gNB.
uint8_t RA_offset; uint8_t RA_offset;
/// RA-rnti /// RA-rnti
......
...@@ -413,8 +413,6 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){ ...@@ -413,8 +413,6 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
NR_UE_rrc_inst[nr_ue].requested_SI_List.size= 4; NR_UE_rrc_inst[nr_ue].requested_SI_List.size= 4;
NR_UE_rrc_inst[nr_ue].requested_SI_List.bits_unused= 0; NR_UE_rrc_inst[nr_ue].requested_SI_List.bits_unused= 0;
NR_UE_rrc_inst[nr_ue].do_ra = RA_NOT_RUNNING;
// init RRC lists // init RRC lists
RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].RLC_Bearer_Config_list, NR_maxLC_ID); RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].RLC_Bearer_Config_list, NR_maxLC_ID);
RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].SchedulingRequest_list, NR_maxNrofSR_ConfigPerCellGroup); RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].SchedulingRequest_list, NR_maxNrofSR_ConfigPerCellGroup);
...@@ -1531,13 +1529,14 @@ int8_t check_requested_SI_List(module_id_t module_id, BIT_STRING_t requested_SI_ ...@@ -1531,13 +1529,14 @@ int8_t check_requested_SI_List(module_id_t module_id, BIT_STRING_t requested_SI_
if(do_ra) { if(do_ra) {
NR_UE_rrc_inst[module_id].do_ra = REQUEST_FOR_OTHER_SI; NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
mac->ra_trigger = REQUEST_FOR_OTHER_SI;
get_softmodem_params()->do_ra = 1; get_softmodem_params()->do_ra = 1;
if(sib1.si_SchedulingInfo->si_RequestConfig) { if(sib1.si_SchedulingInfo->si_RequestConfig) {
LOG_I(RRC, "Trigger contention-free RA procedure (do_ra = %i)\n", NR_UE_rrc_inst[module_id].do_ra); LOG_I(RRC, "Trigger contention-free RA procedure (ra_trigger = %i)\n", mac->ra_trigger);
} else { } else {
LOG_I(RRC, "Trigger contention-based RA procedure (do_ra = %i)\n", NR_UE_rrc_inst[module_id].do_ra); LOG_I(RRC, "Trigger contention-based RA procedure (ra_trigger = %i)\n", mac->ra_trigger);
} }
} }
......
...@@ -89,18 +89,6 @@ typedef enum requested_SI_List_e { ...@@ -89,18 +89,6 @@ typedef enum requested_SI_List_e {
SIB9 = 0x128 SIB9 = 0x128
} requested_SI_List_t; } requested_SI_List_t;
typedef enum trigger_RA_List_e {
RA_NOT_RUNNING,
INITIAL_ACCESS_FROM_RRC_IDLE,
RRC_CONNECTION_REESTABLISHMENT,
DURING_HANDOVER,
NON_SYNCHRONISED,
TRANSITION_FROM_RRC_INACTIVE,
TO_ESTABLISH_TA,
REQUEST_FOR_OTHER_SI,
BEAM_FAILURE_RECOVERY,
} trigger_RA_List_t;
typedef struct NR_UE_RRC_INST_s { typedef struct NR_UE_RRC_INST_s {
NR_MeasConfig_t *meas_config; NR_MeasConfig_t *meas_config;
...@@ -123,11 +111,10 @@ typedef struct NR_UE_RRC_INST_s { ...@@ -123,11 +111,10 @@ typedef struct NR_UE_RRC_INST_s {
NR_SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE]; NR_SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
uint8_t MBMS_flag; uint8_t MBMS_flag;
OAI_NR_UECapability_t *UECap; OAI_NR_UECapability_t *UECap;
uint8_t *UECapability; uint8_t *UECapability;
uint8_t UECapability_size; uint8_t UECapability_size;
trigger_RA_List_t do_ra;
BIT_STRING_t requested_SI_List; BIT_STRING_t requested_SI_List;
NR_SystemInformation_t *si[NB_CNX_UE]; NR_SystemInformation_t *si[NB_CNX_UE];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment