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
010d39c9
Commit
010d39c9
authored
May 03, 2021
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_scheduling_request' into integration_2021_wk18_a
parents
4525e102
2319b4e7
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
315 additions
and
135 deletions
+315
-135
ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf
ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf
+1
-0
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
+1
-0
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-7
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-7
openair2/GNB_APP/MACRLC_nr_paramdef.h
openair2/GNB_APP/MACRLC_nr_paramdef.h
+3
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+0
-8
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+190
-66
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+43
-13
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+6
-0
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+11
-9
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+2
-1
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+0
-4
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+2
-1
openair2/RRC/NR/nr_rrc_proto.h
openair2/RRC/NR/nr_rrc_proto.h
+4
-2
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+5
-3
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+42
-11
No files found.
ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf
View file @
010d39c9
...
...
@@ -230,6 +230,7 @@ MACRLCs = (
num_cc
=
1
;
tr_s_preference
=
"local_L1"
;
tr_n_preference
=
"local_RRC"
;
ulsch_max_slots_inactivity
=
1
;
}
);
...
...
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
010d39c9
...
...
@@ -211,6 +211,7 @@ MACRLCs = (
num_cc
=
1
;
tr_s_preference
=
"local_L1"
;
tr_n_preference
=
"local_RRC"
;
ulsch_max_slots_inactivity
=
1
;
}
);
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
010d39c9
...
...
@@ -733,13 +733,7 @@ int main(int argc, char **argv)
prepare_scd
(
scd
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
,
0
);
/* RRC parameter validation for secondaryCellGroup */
fix_scd
(
scd
);
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
010d39c9
...
...
@@ -676,13 +676,7 @@ int main(int argc, char **argv)
prepare_scd
(
scd
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
,
0
);
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
...
...
openair2/GNB_APP/MACRLC_nr_paramdef.h
View file @
010d39c9
...
...
@@ -55,7 +55,7 @@
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTC "remote_s_portc"
#define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd"
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd"
#define CONFIG_STRING_MACRLC_ULSCH_MAX_SLOTS_INACTIVITY "ulsch_max_slots_inactivity"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* MacRLC configuration parameters */
...
...
@@ -79,6 +79,7 @@
{CONFIG_STRING_MACRLC_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_ULSCH_MAX_SLOTS_INACTIVITY, "Maximum number of slots before a UE is scheduled ULSCH due to inactivity", 0, uptr:NULL, defintval:200, TYPE_UINT, 0}, \
}
#define MACRLC_CC_IDX 0
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
...
...
@@ -97,5 +98,6 @@
#define MACRLC_REMOTE_S_PORTC_IDX 14
#define MACRLC_LOCAL_S_PORTD_IDX 15
#define MACRLC_REMOTE_S_PORTD_IDX 16
#define MACRLC_ULSCH_MAX_SLOTS_INACTIVITY 17
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif
openair2/GNB_APP/gnb_config.c
View file @
010d39c9
...
...
@@ -53,7 +53,7 @@
//#include "L1_paramdef.h"
#include "L1_nr_paramdef.h"
#include "MACRLC_paramdef.h"
#include "MACRLC_
nr_
paramdef.h"
#include "common/config/config_userapi.h"
//#include "RRC_config_tools.h"
#include "gnb_paramdef.h"
...
...
@@ -698,6 +698,7 @@ void RCconfig_nr_macrlc() {
}
else
{
// other midhaul
AssertFatal
(
1
==
0
,
"MACRLC %d: %s unknown southbound midhaul
\n
"
,
j
,
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_S_PREFERENCE_IDX
].
strptr
));
}
RC
.
nrmac
[
j
]
->
ulsch_max_slots_inactivity
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_ULSCH_MAX_SLOTS_INACTIVITY
].
uptr
);
}
// for (j=0;j<RC.nb_nr_macrlc_inst;j++)
}
else
{
// MacRLC_ParamList.numelt > 0
AssertFatal
(
0
,
"No "
CONFIG_STRING_MACRLC_LIST
" configuration found"
);
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
010d39c9
...
...
@@ -372,14 +372,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
AssertFatal
(
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
vrb_map_UL
,
"could not allocate memory for RC.nrmac[]->common_channels[0].vrb_map_UL
\n
"
);
for
(
int
i
=
0
;
i
<
MAX_NUM_BWP
;
++
i
)
{
RC
.
nrmac
[
Mod_idP
]
->
pucch_index_used
[
i
]
=
calloc
(
n
,
sizeof
(
*
RC
.
nrmac
[
Mod_idP
]
->
pucch_index_used
));
AssertFatal
(
RC
.
nrmac
[
Mod_idP
]
->
pucch_index_used
[
i
],
"could not allocate memory for RC.nrmac[]->pucch_index_used[%d]
\n
"
,
i
);
}
LOG_I
(
MAC
,
"Configuring common parameters from NR ServingCellConfig
\n
"
);
config_common
(
Mod_idP
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
010d39c9
...
...
@@ -402,7 +402,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
// This schedule SR
// TODO
nr_sr_reporting
(
module_idP
,
frame
,
slot
);
// Schedule CSI measurement reporting: check in slot 0 for the whole frame
if
(
slot
==
0
)
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
010d39c9
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
010d39c9
...
...
@@ -745,6 +745,34 @@ long get_K2(const NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu) {
return
3
;
}
bool
nr_UE_is_to_be_scheduled
(
module_id_t
mod_id
,
int
CC_id
,
int
UE_id
,
frame_t
frame
,
sub_frame_t
slot
)
{
const
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
;
const
uint8_t
slots_per_frame
[
5
]
=
{
10
,
20
,
40
,
80
,
160
};
const
int
n
=
slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
];
const
int
now
=
frame
*
n
+
slot
;
const
struct
gNB_MAC_INST_s
*
nrmac
=
RC
.
nrmac
[
mod_id
];
const
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
nrmac
->
UE_info
.
UE_sched_ctrl
[
UE_id
];
const
int
last_ul_sched
=
sched_ctrl
->
last_ul_frame
*
n
+
sched_ctrl
->
last_ul_slot
;
const
int
diff
=
(
now
-
last_ul_sched
+
1024
*
n
)
%
(
1024
*
n
);
/* UE is to be scheduled if
* (1) we think the UE has more bytes awaiting than what we scheduled
* (2) there is a scheduling request
* (3) or we did not schedule it in more than 10 frames */
const
bool
has_data
=
sched_ctrl
->
estimated_ul_buffer
>
sched_ctrl
->
sched_ul_bytes
;
const
bool
high_inactivity
=
diff
>=
nrmac
->
ulsch_max_slots_inactivity
;
LOG_D
(
MAC
,
"%4d.%2d UL inactivity %d slots has_data %d SR %d
\n
"
,
frame
,
slot
,
diff
,
has_data
,
sched_ctrl
->
SR
);
return
has_data
||
sched_ctrl
->
SR
||
high_inactivity
;
}
int
next_list_entry_looped
(
NR_list_t
*
list
,
int
UE_id
)
{
if
(
UE_id
<
0
)
...
...
@@ -874,7 +902,6 @@ void update_ul_ue_R_Qm(NR_sched_pusch_t *sched_pusch, const NR_pusch_semi_static
float
ul_thr_ue
[
MAX_MOBILES_PER_GNB
];
uint32_t
ul_pf_tbs
[
3
][
28
];
// pre-computed, approximate TBS values for PF coefficient
int
bsr0ue
=
-
1
;
void
pf_ul
(
module_id_t
module_id
,
frame_t
frame
,
sub_frame_t
slot
,
...
...
@@ -894,12 +921,6 @@ void pf_ul(module_id_t module_id,
int
ue_array
[
MAX_MOBILES_PER_GNB
];
NR_list_t
UE_sched
=
{
.
head
=
-
1
,
.
next
=
ue_array
,
.
tail
=
-
1
,
.
len
=
MAX_MOBILES_PER_GNB
};
/* Hack: currently, we do not have SR, and need to schedule UEs continuously.
* To keep the wasted resources low, we switch UEs to be scheduled in a
* round-robin fashion below, and only schedule a UE with BSR=0 if it is the
* selected one */
bsr0ue
=
next_list_entry_looped
(
UE_list
,
bsr0ue
);
/* Loop UE_list to calculate throughput and coeff */
for
(
int
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
...
...
@@ -931,11 +952,16 @@ void pf_ul(module_id_t module_id,
continue
;
}
/* Check BSR and schedule UE if it is zero to avoid starvation, since we do
* not have SR (yet) */
if
(
sched_ctrl
->
estimated_ul_buffer
-
sched_ctrl
->
sched_ul_bytes
<=
0
)
{
if
(
UE_id
!=
bsr0ue
)
continue
;
const
int
B
=
max
(
0
,
sched_ctrl
->
estimated_ul_buffer
-
sched_ctrl
->
sched_ul_bytes
);
/* preprocessor computed sched_frame/sched_slot */
const
bool
do_sched
=
nr_UE_is_to_be_scheduled
(
module_id
,
0
,
UE_id
,
sched_pusch
->
frame
,
sched_pusch
->
slot
);
if
(
B
==
0
&&
!
do_sched
)
continue
;
/* Schedule UE on SR or UL inactivity and no data (otherwise, will be scheduled
* based on data to transmit) */
if
(
B
==
0
&&
do_sched
)
{
/* if no data, pre-allocate 5RB */
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_id
);
if
(
!
freeCCE
)
{
...
...
@@ -1106,7 +1132,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
int
K2
=
get_K2
(
sched_ctrl
->
active_ubwp
,
tda
,
mu
);
const
int
sched_frame
=
frame
+
(
slot
+
K2
>=
nr_slots_per_frame
[
mu
]);
const
int
sched_slot
=
(
slot
+
K2
)
%
nr_slots_per_frame
[
mu
];
if
(
!
is_xlsch_in_slot
(
nr_mac
->
ulsch_slot_bitmap
[
slot
/
64
],
sched_slot
))
if
(
!
is_xlsch_in_slot
(
nr_mac
->
ulsch_slot_bitmap
[
s
ched_s
lot
/
64
],
sched_slot
))
return
false
;
sched_ctrl
->
sched_pusch
.
slot
=
sched_slot
;
...
...
@@ -1218,6 +1244,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
for
(
int
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
UE_info
->
mac_stats
[
UE_id
].
ulsch_current_bytes
=
0
;
/* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in
* every TTI are pre-populated by the preprocessor and used below */
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
...
...
@@ -1225,6 +1252,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
continue
;
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
sched_ctrl
->
SR
=
false
;
int8_t
harq_id
=
sched_pusch
->
ul_harq_pid
;
if
(
harq_id
<
0
)
{
...
...
@@ -1281,6 +1309,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
cur_harq
->
ndi
);
}
UE_info
->
mac_stats
[
UE_id
].
ulsch_current_bytes
=
sched_pusch
->
tb_size
;
sched_ctrl
->
last_ul_frame
=
sched_pusch
->
frame
;
sched_ctrl
->
last_ul_slot
=
sched_pusch
->
slot
;
LOG_D
(
MAC
,
"%4d.%2d RNTI %04x UL sched %4d.%2d start %2d RBS %3d startSymbol %2d nb_symbol %2d MCS %2d TBS %4d HARQ PID %2d round %d NDI %d est %6d sched %6d est BSR %6d
\n
"
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
010d39c9
...
...
@@ -414,4 +414,10 @@ bool nr_find_nb_rb(uint16_t Qm,
uint32_t
*
tbs
,
uint16_t
*
nb_rb
);
void
nr_sr_reporting
(
int
Mod_idP
,
frame_t
frameP
,
sub_frame_t
slotP
);
void
periodicity__SRR
(
NR_SchedulingRequestResourceConfig_t
*
SchedulingReqRecconf
,
int
*
period
,
int
*
offset
);
#endif
/*__LAYER2_NR_MAC_PROTO_H__*/
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
010d39c9
...
...
@@ -522,11 +522,9 @@ typedef struct {
int
cce_index
;
uint8_t
aggregation_level
;
/// PUCCH scheduling information. Array of three, we assume for the moment:
/// HARQ in the first field, SR in second, CSI in third (as fixed by RRC
/// conf., i.e. if actually present). The order is important for
/// nr_acknack_scheduling()!
NR_sched_pucch_t
sched_pucch
[
3
];
/// PUCCH scheduling information. Array of two: HARQ+SR in the first field,
/// CSI in second. This order is important for nr_acknack_scheduling()!
NR_sched_pucch_t
sched_pucch
[
2
];
/// PUSCH semi-static configuration: is not cleared across TTIs
NR_pusch_semi_static_t
pusch_semi_static
;
...
...
@@ -547,6 +545,9 @@ typedef struct {
NR_pdsch_semi_static_t
pdsch_semi_static
;
/// Sched PDSCH: scheduling decisions, copied into HARQ and cleared every TTI
NR_sched_pdsch_t
sched_pdsch
;
/// For UL synchronization: store last UL scheduling grant
frame_t
last_ul_frame
;
sub_frame_t
last_ul_slot
;
/// total amount of data awaiting for this UE
uint32_t
num_total_bytes
;
...
...
@@ -563,6 +564,8 @@ typedef struct {
int
pucch_snrx10
;
struct
CSI_Report
CSI_report
[
MAX_CSI_REPORTS
];
bool
SR
;
/// information about every HARQ process
NR_UE_harq_t
harq_processes
[
NR_MAX_NB_HARQ_PROCESSES
];
/// HARQ processes that are free
...
...
@@ -705,10 +708,6 @@ typedef struct gNB_MAC_INST_s {
int
cce_list
[
MAX_NUM_BWP
][
MAX_NUM_CORESET
][
MAX_NUM_CCE
];
/// list of allocated beams per period
int16_t
*
tdd_beam_association
;
/// PUCCH: keep track of the resources has already been used by saving the
/// highest index not yet been used in a given slot. Dynamically allocated
/// so we can have it for every slot as a function of the numerology
int
*
pucch_index_used
[
MAX_NUM_BWP
];
/// bitmap of DLSCH slots, can hold up to 160 slots
uint64_t
dlsch_slot_bitmap
[
3
];
...
...
@@ -722,6 +721,9 @@ typedef struct gNB_MAC_INST_s {
/// points to the right UL slot
int
*
preferred_ul_tda
[
MAX_NUM_BWP
];
/// maximum number of slots before a UE will be scheduled ULSCH automatically
uint32_t
ulsch_max_slots_inactivity
;
/// DL preprocessor for differentiated scheduling
nr_pp_impl_dl
pre_processor_dl
;
/// UL preprocessor for differentiated scheduling
...
...
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
010d39c9
...
...
@@ -73,7 +73,8 @@ void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChann
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelGroup
=
calloc
(
1
,
sizeof
(
*
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelGroup
));
*
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelGroup
=
1
;
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
schedulingRequestID
=
NULL
;
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
schedulingRequestID
=
calloc
(
1
,
sizeof
(
*
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
schedulingRequestID
));
*
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
schedulingRequestID
=
0
;
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelSR_Mask
=
false
;
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelSR_DelayTimerApplied
=
false
;
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
bitRateQueryProhibitTimer
=
NULL
;
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
010d39c9
...
...
@@ -105,10 +105,6 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
}
UL_info
->
uci_ind
.
num_ucis
=
0
;
// mark corresponding PUCCH resources as free
// NOTE: we just assume it is BWP ID 1, to be revised for multiple BWPs
RC
.
nrmac
[
mod_id
]
->
pucch_index_used
[
1
][
slot
]
=
0
;
}
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
010d39c9
...
...
@@ -1287,7 +1287,8 @@ uint16_t do_RRCReconfiguration(
// 1,
// 1,
// carrier->pdsch_AntennaPorts,
// carrier->initial_csi_index[gnb_rrc_inst->Nb_ue]);
// carrier->initial_csi_index[ue_context_p->local_uid + 1],
// ue_context_pP->local_uid);
/******************** Meas Config ********************/
// measConfig
...
...
openair2/RRC/NR/nr_rrc_proto.h
View file @
010d39c9
...
...
@@ -85,14 +85,16 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
int
scg_id
,
int
servCellIndex
,
int
n_physical_antenna_ports
,
int
initial_csi_index
);
int
initial_csi_index
,
int
uid
);
void
fill_default_reconfig
(
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
,
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
NR_RRCReconfiguration_IEs_t
*
reconfig
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
int
n_physical_antenna_ports
,
int
initial_csi_index
);
int
initial_csi_index
,
int
uid
);
void
fill_default_rbconfig
(
NR_RadioBearerConfig_t
*
rbconfig
,
int
eps_bearer_id
,
int
rb_id
,
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
010d39c9
...
...
@@ -152,7 +152,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
ue_context_p
->
ue_context
.
reconfig
->
criticalExtensions
.
present
=
NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration
;
NR_RRCReconfiguration_IEs_t
*
reconfig_ies
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_IEs_t
));
ue_context_p
->
ue_context
.
reconfig
->
criticalExtensions
.
choice
.
rrcReconfiguration
=
reconfig_ies
;
carrier
->
initial_csi_index
[
rrc
->
Nb_ue
]
=
0
;
carrier
->
initial_csi_index
[
ue_context_p
->
local_uid
+
1
]
=
0
;
ue_context_p
->
ue_context
.
rb_config
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_t
));
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
==
1
||
get_softmodem_params
()
->
sa
==
1
){
fill_default_rbconfig
(
ue_context_p
->
ue_context
.
rb_config
,
...
...
@@ -245,14 +245,16 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
reconfig_ies
,
ue_context_p
->
ue_context
.
secondaryCellGroup
,
carrier
->
pdsch_AntennaPorts
,
carrier
->
initial_csi_index
[
rrc
->
Nb_ue
]);
carrier
->
initial_csi_index
[
ue_context_p
->
local_uid
+
1
],
ue_context_p
->
local_uid
);
}
else
{
fill_default_reconfig
(
carrier
->
servingcellconfigcommon
,
NULL
,
reconfig_ies
,
ue_context_p
->
ue_context
.
secondaryCellGroup
,
carrier
->
pdsch_AntennaPorts
,
carrier
->
initial_csi_index
[
rrc
->
Nb_ue
]);
carrier
->
initial_csi_index
[
ue_context_p
->
local_uid
+
1
],
ue_context_p
->
local_uid
);
}
ue_context_p
->
ue_id_rnti
=
ue_context_p
->
ue_context
.
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
NR_CG_Config_t
*
CG_Config
=
calloc
(
1
,
sizeof
(
*
CG_Config
));
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
010d39c9
...
...
@@ -149,7 +149,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
int
scg_id
,
int
servCellIndex
,
int
n_physical_antenna_ports
,
int
initial_csi_index
)
{
int
initial_csi_index
,
int
uid
)
{
AssertFatal
(
servingcellconfigcommon
!=
NULL
,
"servingcellconfigcommon is null
\n
"
);
AssertFatal
(
secondaryCellGroup
!=
NULL
,
"secondaryCellGroup is null
\n
"
);
...
...
@@ -184,7 +185,17 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
rlc_BearerToAddModList
->
list
,
RLC_BearerConfig
);
secondaryCellGroup
->
mac_CellGroupConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
));
secondaryCellGroup
->
mac_CellGroupConfig
->
drx_Config
=
NULL
;
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
=
NULL
;
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
));
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
));
NR_SchedulingRequestToAddMod_t
*
SchedulingRequestConf
=
calloc
(
1
,
sizeof
(
*
SchedulingRequestConf
));
SchedulingRequestConf
->
schedulingRequestId
=
0
;
//Could be changed
SchedulingRequestConf
->
sr_ProhibitTimer
=
calloc
(
1
,
sizeof
(
*
SchedulingRequestConf
->
sr_ProhibitTimer
));
*
SchedulingRequestConf
->
sr_ProhibitTimer
=
NR_SchedulingRequestToAddMod__sr_ProhibitTimer_ms16
;
SchedulingRequestConf
->
sr_TransMax
=
NR_SchedulingRequestToAddMod__sr_TransMax_n32
;
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
->
list
,
SchedulingRequestConf
);
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToReleaseList
=
NULL
;
secondaryCellGroup
->
mac_CellGroupConfig
->
bsr_Config
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
bsr_Config
));
secondaryCellGroup
->
mac_CellGroupConfig
->
bsr_Config
->
periodicBSR_Timer
=
NR_BSR_Config__periodicBSR_Timer_sf10
;
secondaryCellGroup
->
mac_CellGroupConfig
->
bsr_Config
->
retxBSR_Timer
=
NR_BSR_Config__retxBSR_Timer_sf160
;
...
...
@@ -251,7 +262,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
if
((
bitmap
>>
(
63
-
i
))
&
0x01
){
ssbElem
[
n_ssb
]
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA_SSB_Resource
));
ssbElem
[
n_ssb
]
->
ssb
=
i
;
ssbElem
[
n_ssb
]
->
ra_PreambleIndex
=
63
;
ssbElem
[
n_ssb
]
->
ra_PreambleIndex
=
63
-
(
uid
%
64
)
;
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
,
ssbElem
[
n_ssb
]);
n_ssb
++
;
}
...
...
@@ -263,8 +274,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
));
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
present
=
NR_SetupRelease_RLF_TimersAndConstants_PR_setup
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
));
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
t310
=
NR_RLF_TimersAndConstants__t310_ms
2
000
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
n310
=
NR_RLF_TimersAndConstants__n310_n
1
0
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
t310
=
NR_RLF_TimersAndConstants__t310_ms
4
000
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
n310
=
NR_RLF_TimersAndConstants__n310_n
2
0
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
n311
=
NR_RLF_TimersAndConstants__n311_n1
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
));
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
->
t311
=
NR_RLF_TimersAndConstants__ext1__t311_ms30000
;
...
...
@@ -975,7 +986,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_PUCCH_Resource_t
*
pucchres2
=
calloc
(
1
,
sizeof
(
*
pucchres2
));
NR_PUCCH_Resource_t
*
pucchres3
=
calloc
(
1
,
sizeof
(
*
pucchres3
));
pucchres0
->
pucch_ResourceId
=
1
;
pucchres0
->
startingPRB
=
8
;
pucchres0
->
startingPRB
=
(
8
+
uid
)
%
curr_bwp
;
pucchres0
->
intraSlotFrequencyHopping
=
NULL
;
pucchres0
->
secondHopPRB
=
NULL
;
pucchres0
->
format
.
present
=
NR_PUCCH_Resource__format_PR_format0
;
...
...
@@ -986,7 +997,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceToAddModList
->
list
,
pucchres0
);
pucchres1
->
pucch_ResourceId
=
2
;
pucchres1
->
startingPRB
=
8
;
pucchres1
->
startingPRB
=
(
8
+
uid
)
%
curr_bwp
;
pucchres1
->
intraSlotFrequencyHopping
=
NULL
;
pucchres1
->
secondHopPRB
=
NULL
;
pucchres1
->
format
.
present
=
NR_PUCCH_Resource__format_PR_format0
;
...
...
@@ -1029,7 +1040,19 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
pucchfmt2
->
nrofSlots
=
NULL
;
pucchfmt2
->
pi2BPSK
=
NULL
;
pucchfmt2
->
simultaneousHARQ_ACK_CSI
=
NULL
;
pucch_Config
->
schedulingRequestResourceToAddModList
=
NULL
;
// for scheduling requestresource
pucch_Config
->
schedulingRequestResourceToAddModList
=
calloc
(
1
,
sizeof
(
*
pucch_Config
->
schedulingRequestResourceToAddModList
));
NR_SchedulingRequestResourceConfig_t
*
schedulingRequestResourceConfig
=
calloc
(
1
,
sizeof
(
*
schedulingRequestResourceConfig
));
schedulingRequestResourceConfig
->
schedulingRequestResourceId
=
1
;
schedulingRequestResourceConfig
->
schedulingRequestID
=
0
;
schedulingRequestResourceConfig
->
periodicityAndOffset
=
calloc
(
1
,
sizeof
(
*
schedulingRequestResourceConfig
->
periodicityAndOffset
));
schedulingRequestResourceConfig
->
periodicityAndOffset
->
present
=
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10
;
schedulingRequestResourceConfig
->
periodicityAndOffset
->
choice
.
sl10
=
7
;
schedulingRequestResourceConfig
->
resource
=
calloc
(
1
,
sizeof
(
*
schedulingRequestResourceConfig
->
resource
));
*
schedulingRequestResourceConfig
->
resource
=
1
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
,
schedulingRequestResourceConfig
);
pucch_Config
->
schedulingRequestResourceToReleaseList
=
NULL
;
pucch_Config
->
multi_CSI_PUCCH_ResourceList
=
NULL
;
pucch_Config
->
dl_DataToUL_ACK
=
calloc
(
1
,
sizeof
(
*
pucch_Config
->
dl_DataToUL_ACK
));
...
...
@@ -1177,7 +1200,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csirep1
->
reportConfigType
.
present
=
NR_CSI_ReportConfig__reportConfigType_PR_periodic
;
csirep1
->
reportConfigType
.
choice
.
periodic
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportConfigType
.
choice
.
periodic
));
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
=
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
;
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
49
;
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
9
+
(
10
*
uid
)
%
320
;
NR_PUCCH_CSI_Resource_t
*
pucchcsires1
=
calloc
(
1
,
sizeof
(
*
pucchcsires1
));
pucchcsires1
->
uplinkBandwidthPartId
=
1
;
pucchcsires1
->
pucch_Resource
=
3
;
...
...
@@ -1241,14 +1264,22 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
NR_RRCReconfiguration_IEs_t
*
reconfig
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
int
n_physical_antenna_ports
,
int
initial_csi_index
)
{
int
initial_csi_index
,
int
uid
)
{
AssertFatal
(
servingcellconfigcommon
!=
NULL
,
"servingcellconfigcommon is null
\n
"
);
AssertFatal
(
reconfig
!=
NULL
,
"reconfig is null
\n
"
);
AssertFatal
(
secondaryCellGroup
!=
NULL
,
"secondaryCellGroup is null
\n
"
);
// radioBearerConfig
reconfig
->
radioBearerConfig
=
NULL
;
// secondaryCellGroup
fill_default_secondaryCellGroup
(
servingcellconfigcommon
,
servingcellconfigdedicated
,
secondaryCellGroup
,
1
,
1
,
n_physical_antenna_ports
,
initial_csi_index
);
fill_default_secondaryCellGroup
(
servingcellconfigcommon
,
servingcellconfigdedicated
,
secondaryCellGroup
,
1
,
1
,
n_physical_antenna_ports
,
initial_csi_index
,
uid
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
(
const
void
*
)
secondaryCellGroup
);
char
scg_buffer
[
1024
];
...
...
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