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
9ff46300
Commit
9ff46300
authored
Jun 17, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_RRC_MAC_CellGroup' into integration_2022_wk24
parents
2399da33
9e27394e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
215 additions
and
89 deletions
+215
-89
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+17
-22
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+19
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+127
-52
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+5
-3
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+4
-0
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+3
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+40
-12
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
9ff46300
...
...
@@ -588,10 +588,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
if
(
CellGroup
)
{
const
NR_ServingCellConfig_t
*
servingCellConfig
=
NULL
;
if
(
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
)
servingCellConfig
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
;
if
(
add_ue
==
1
&&
get_softmodem_params
()
->
phy_test
)
{
NR_UE_info_t
*
UE
=
add_new_nr_ue
(
RC
.
nrmac
[
Mod_idP
],
rnti
,
CellGroup
);
if
(
UE
)
{
...
...
@@ -646,31 +642,30 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
ra
->
msg3_dcch_dtch
=
false
;
LOG_I
(
NR_MAC
,
"Added new RA process for UE RNTI %04x with initial CellGroup
\n
"
,
rnti
);
}
else
{
// CellGroup has been updated
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
,
rnti
);
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
,
rnti
);
if
(
!
UE
)
{
LOG_E
(
NR_MAC
,
"Can't find UE %04x
\n
"
,
rnti
);
return
-
1
;
}
UE
->
CellGroup
=
CellGroup
;
LOG_I
(
NR_MAC
,
"Modified rnti %04x with CellGroup
\n
"
,
rnti
);
process_CellGroup
(
CellGroup
,
&
UE
->
UE_sched_ctrl
);
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
const
NR_PDSCH_ServingCellConfig_t
*
pdsch
=
servingCellConfig
?
servingCellConfig
->
pdsch_ServingCellConfig
->
choice
.
setup
:
NULL
;
if
(
get_softmodem_params
()
->
sa
)
{
// add all available DL HARQ processes for this UE in SA
create_dl_harq_list
(
sched_ctrl
,
pdsch
);
/* copy CellGroup by calling asn1c encode
this is a temporary hack to avoid the gNB having
a pointer to RRC CellGroup structure
(otherwise it would be applied to early)
TODO remove once we have a proper implementation */
UE
->
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
(
void
*
)
CellGroup
,
UE
->
cg_buf
,
32768
);
if
(
UE
->
enc_rval
.
encoded
==
-
1
)
{
LOG_E
(
NR_MAC
,
"ASN1 message CellGroupConfig encoding failed (%s, %lu)!
\n
"
,
UE
->
enc_rval
.
failed_type
->
name
,
UE
->
enc_rval
.
encoded
);
exit
(
1
);
}
sched_ctrl
->
maxL
=
2
;
if
(
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
)
{
compute_csi_bitlen
(
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE
);
}
process_CellGroup
(
CellGroup
,
&
UE
->
UE_sched_ctrl
);
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG
,
VCD_FUNCTION_OUT
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
9ff46300
...
...
@@ -1952,6 +1952,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// If the UE used MSG3 to transfer a DCCH or DTCH message, then contention resolution is successful upon transmission of PDCCH
LOG_A
(
NR_MAC
,
"(ue rnti 0x%04x) CBRA procedure succeeded!
\n
"
,
ra
->
rnti
);
nr_clear_ra_proc
(
module_idP
,
CC_id
,
frameP
,
ra
);
UE
->
Msg3_dcch_dtch
=
true
;
UE
->
Msg4_ACKed
=
true
;
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
...
...
@@ -1960,6 +1961,24 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
add_tail_nr_list
(
&
sched_ctrl
->
available_dl_harq
,
current_harq_pid
);
harq
->
round
=
0
;
harq
->
ndi
^=
1
;
// Pause scheduling according to:
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
const
NR_COMMON_channels_t
*
common_channels
=
&
RC
.
nrmac
[
module_idP
]
->
common_channels
[
0
];
const
NR_SIB1_t
*
sib1
=
common_channels
->
sib1
?
common_channels
->
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
const
NR_ServingCellConfig_t
*
servingCellConfig
=
UE
->
CellGroup
?
UE
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
:
NULL
;
NR_BWP_t
*
genericParameters
=
get_dl_bwp_genericParameters
(
sched_ctrl
->
active_bwp
,
common_channels
->
ServingCellConfigCommon
,
sib1
);
uint32_t
delay_ms
=
servingCellConfig
&&
servingCellConfig
->
downlinkBWP_ToAddModList
?
NR_RRC_SETUP_DELAY_MS
+
NR_RRC_BWP_SWITCHING_DELAY_MS
:
NR_RRC_SETUP_DELAY_MS
;
sched_ctrl
->
rrc_processing_timer
=
(
delay_ms
<<
genericParameters
->
subcarrierSpacing
);
LOG_I
(
NR_MAC
,
"(%d.%d) Activating RRC processing timer for UE %04x with %d ms
\n
"
,
frameP
,
slotP
,
UE
->
rnti
,
delay_ms
);
// Reset uplink failure flags/counters/timers at MAC so gNB will resume again scheduling resources for this UE
UE
->
UE_sched_ctrl
.
pusch_consecutive_dtx_cnt
=
0
;
UE
->
UE_sched_ctrl
.
ul_failure
=
0
;
}
else
{
ra
->
state
=
WAIT_Msg4_ACK
;
LOG_D
(
NR_MAC
,
"[gNB %d][RAPROC] Frame %d, Subframe %d: RA state %d
\n
"
,
module_idP
,
frameP
,
slotP
,
ra
->
state
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
9ff46300
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
9ff46300
...
...
@@ -710,10 +710,12 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
return
;
}
else
{
// The UE identified by C-RNTI still exists at the gNB
// Reset uplink failure flags/counters/timers at MAC and at RRC so gNB will resume again scheduling resources for this UE
UE_C
->
UE_sched_ctrl
.
pusch_consecutive_dtx_cnt
=
0
;
UE_C
->
UE_sched_ctrl
.
ul_failure
=
0
;
// Reset uplink failure flags/counters/timers at RRC
nr_mac_gNB_rrc_ul_failure_reset
(
gnb_mod_idP
,
frameP
,
slotP
,
ra
->
crnti
);
// Reset HARQ processes
reset_dl_harq_list
(
&
UE_C
->
UE_sched_ctrl
);
reset_ul_harq_list
(
&
UE_C
->
UE_sched_ctrl
);
}
}
LOG_I
(
NR_MAC
,
"Scheduling RA-Msg4 for TC_RNTI 0x%04x (state %d, frame %d, slot %d)
\n
"
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
9ff46300
...
...
@@ -472,6 +472,10 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
void
create_dl_harq_list
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
const
NR_PDSCH_ServingCellConfig_t
*
pdsch
);
void
reset_dl_harq_list
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
void
reset_ul_harq_list
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
void
handle_nr_ul_harq
(
const
int
CC_idP
,
module_id_t
mod_id
,
frame_t
frame
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
9ff46300
...
...
@@ -710,10 +710,13 @@ typedef struct {
NR_UE_sched_ctrl_t
UE_sched_ctrl
;
NR_mac_stats_t
mac_stats
;
NR_CellGroupConfig_t
*
CellGroup
;
char
cg_buf
[
32768
];
/* arbitrary size */
asn_enc_rval_t
enc_rval
;
/// CCE indexing
int
m
;
// UE selected beam index
uint8_t
UE_beam_index
;
bool
Msg3_dcch_dtch
;
bool
Msg4_ACKed
;
/// Sched CSI-RS: scheduling decisions
NR_gNB_UCI_STATS_t
uci_statS
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
9ff46300
...
...
@@ -808,6 +808,19 @@ rrc_gNB_generate_defaultRRCReconfiguration(
}
if
(
NODE_IS_DU
(
rrc
->
node_type
)
||
NODE_IS_MONOLITHIC
(
rrc
->
node_type
))
{
rrc_mac_config_req_gNB
(
rrc
->
module_id
,
rrc
->
configuration
.
ssb_SubcarrierOffset
,
rrc
->
configuration
.
pdsch_AntennaPorts
,
rrc
->
configuration
.
pusch_AntennaPorts
,
rrc
->
configuration
.
sib1_tda
,
rrc
->
configuration
.
minRXTXTIME
,
NULL
,
NULL
,
NULL
,
0
,
ue_p
->
rnti
,
ue_p
->
masterCellGroup
);
uint32_t
delay_ms
=
ue_context_pP
->
ue_context
.
masterCellGroup
&&
ue_context_pP
->
ue_context
.
masterCellGroup
->
spCellConfig
&&
ue_context_pP
->
ue_context
.
masterCellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
...
...
@@ -1061,6 +1074,19 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
#endif
if
(
NODE_IS_DU
(
rrc
->
node_type
)
||
NODE_IS_MONOLITHIC
(
rrc
->
node_type
))
{
rrc_mac_config_req_gNB
(
rrc
->
module_id
,
rrc
->
configuration
.
ssb_SubcarrierOffset
,
rrc
->
configuration
.
pdsch_AntennaPorts
,
rrc
->
configuration
.
pusch_AntennaPorts
,
rrc
->
configuration
.
sib1_tda
,
rrc
->
configuration
.
minRXTXTIME
,
NULL
,
NULL
,
NULL
,
0
,
ue_context_pP
->
ue_context
.
rnti
,
ue_context_pP
->
ue_context
.
masterCellGroup
);
uint32_t
delay_ms
=
ue_context_pP
->
ue_context
.
masterCellGroup
&&
ue_context_pP
->
ue_context
.
masterCellGroup
->
spCellConfig
&&
ue_context_pP
->
ue_context
.
masterCellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
...
...
@@ -1435,18 +1461,6 @@ rrc_gNB_process_RRCReconfigurationComplete(
/* Refresh SRBs/DRBs */
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
ctxt_pP
->
module_id
]
->
node_type
))
{
rrc_mac_config_req_gNB
(
rrc
->
module_id
,
rrc
->
configuration
.
ssb_SubcarrierOffset
,
rrc
->
configuration
.
pdsch_AntennaPorts
,
rrc
->
configuration
.
pusch_AntennaPorts
,
rrc
->
configuration
.
sib1_tda
,
rrc
->
configuration
.
minRXTXTIME
,
NULL
,
NULL
,
NULL
,
0
,
ue_context_pP
->
ue_context
.
rnti
,
ue_context_pP
->
ue_context
.
masterCellGroup
);
LOG_D
(
NR_RRC
,
"Configuring RLC DRBs/SRBs for UE %x
\n
"
,
ue_context_pP
->
ue_context
.
rnti
);
nr_rrc_rlc_config_asn1_req
(
ctxt_pP
,
SRB_configList
,
// NULL,
...
...
@@ -1980,6 +1994,20 @@ int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP
NULL
,
masterCellGroup
);
gNB_RrcConfigurationReq
*
configuration
=
&
RC
.
nrrrc
[
ctxt_pP
->
module_id
]
->
configuration
;
rrc_mac_config_req_gNB
(
ctxt_pP
->
module_id
,
configuration
->
ssb_SubcarrierOffset
,
configuration
->
pdsch_AntennaPorts
,
configuration
->
pusch_AntennaPorts
,
configuration
->
sib1_tda
,
configuration
->
minRXTXTIME
,
NULL
,
NULL
,
NULL
,
0
,
ue_context_pP
->
ue_context
.
rnti
,
masterCellGroup
);
nr_rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
...
...
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