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
14364709
Commit
14364709
authored
Mar 10, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_Msg3_dcch_dtch_reworking' into integration_2023_w10b
parents
3e3dd40c
799d0b3a
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
440 additions
and
279 deletions
+440
-279
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+0
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+410
-242
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+10
-21
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+11
-7
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+5
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+3
-5
No files found.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
14364709
...
...
@@ -730,7 +730,7 @@ int main(int argc, char **argv)
N_RB_DL
=
gNB
->
frame_parms
.
N_RB_DL
;
NR_UE_info_t
*
UE_info
=
RC
.
nrmac
[
0
]
->
UE_info
.
list
[
0
];
configure_UE_BWP
(
RC
.
nrmac
[
0
],
scc
,
&
UE_info
->
UE_sched_ctrl
,
NULL
,
UE_info
);
configure_UE_BWP
(
RC
.
nrmac
[
0
],
scc
,
&
UE_info
->
UE_sched_ctrl
,
NULL
,
UE_info
,
-
1
,
-
1
);
// stub to configure frame_parms
// nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell,SSB_positions);
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
14364709
...
...
@@ -540,7 +540,6 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
for
(
int
n
=
0
;
n
<
NR_NB_RA_PROC_MAX
;
n
++
)
{
NR_RA_t
*
ra
=
&
cc
->
ra
[
n
];
ra
->
cfra
=
false
;
ra
->
msg3_dcch_dtch
=
false
;
ra
->
rnti
=
0
;
ra
->
preambles
.
num_preambles
=
MAX_NUM_NR_PRACH_PREAMBLES
;
ra
->
preambles
.
preamble_list
=
malloc
(
MAX_NUM_NR_PRACH_PREAMBLES
*
sizeof
(
*
ra
->
preambles
.
preamble_list
));
...
...
@@ -630,7 +629,6 @@ bool nr_mac_prepare_ra_nsa_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupCo
}
}
}
ra
->
msg3_dcch_dtch
=
false
;
LOG_I
(
NR_MAC
,
"Added new RA process for UE RNTI %04x with initial CellGroup
\n
"
,
rnti
);
return
true
;
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
14364709
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
14364709
...
...
@@ -2021,8 +2021,10 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
NR_ServingCellConfigCommon_t
*
scc
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_RA_t
*
ra
,
NR_UE_info_t
*
UE
)
{
NR_UE_info_t
*
UE
,
int
dl_bwp_switch
,
int
ul_bwp_switch
)
{
AssertFatal
((
ra
!=
NULL
&&
UE
==
NULL
)
||
(
ra
==
NULL
&&
UE
!=
NULL
),
"RA and UE structures are mutually exlusive in BWP configuration
\n
"
);
NR_CellGroupConfig_t
*
CellGroup
;
...
...
@@ -2067,23 +2069,10 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
if
(
UE
&&
UE
->
Msg3_dcch_dtch
)
{
// switching to initial BWP
DL_BWP
->
bwp_id
=
0
;
UL_BWP
->
bwp_id
=
0
;
UE
->
Msg3_dcch_dtch
=
false
;
// Schedule BWP switching to the first active BWP (previous active BWP before RA with Msg3 carrying DCCH or DTCH message)
if
(
servingCellConfig
->
firstActiveDownlinkBWP_Id
)
{
sched_ctrl
->
next_dl_bwp_id
=
*
servingCellConfig
->
firstActiveDownlinkBWP_Id
;
}
else
{
sched_ctrl
->
next_dl_bwp_id
=
0
;
}
if
(
servingCellConfig
->
uplinkConfig
->
firstActiveUplinkBWP_Id
)
{
sched_ctrl
->
next_ul_bwp_id
=
*
servingCellConfig
->
uplinkConfig
->
firstActiveUplinkBWP_Id
;
}
else
{
sched_ctrl
->
next_ul_bwp_id
=
0
;
}
if
(
dl_bwp_switch
>=
0
&&
ul_bwp_switch
>=
0
)
{
AssertFatal
(
dl_bwp_switch
==
ul_bwp_switch
,
"Different UL and DL BWP not supported
\n
"
);
DL_BWP
->
bwp_id
=
dl_bwp_switch
;
UL_BWP
->
bwp_id
=
ul_bwp_switch
;
}
else
{
// (re)configuring BWP
...
...
@@ -2335,7 +2324,7 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
memset
(
dl_bwp
,
0
,
sizeof
(
*
dl_bwp
));
NR_UE_UL_BWP_t
*
ul_bwp
=
&
UE
->
current_UL_BWP
;
memset
(
ul_bwp
,
0
,
sizeof
(
*
ul_bwp
));
configure_UE_BWP
(
nr_mac
,
scc
,
sched_ctrl
,
NULL
,
UE
);
configure_UE_BWP
(
nr_mac
,
scc
,
sched_ctrl
,
NULL
,
UE
,
-
1
,
-
1
);
/* set illegal time domain allocation to force recomputation of all fields */
sched_ctrl
->
sched_pdsch
.
time_domain_allocation
=
-
1
;
...
...
@@ -2811,7 +2800,7 @@ void nr_mac_update_timers(module_id_t module_id,
process_CellGroup
(
cg
,
&
UE
->
UE_sched_ctrl
);
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
configure_UE_BWP
(
RC
.
nrmac
[
module_id
],
scc
,
sched_ctrl
,
NULL
,
UE
);
configure_UE_BWP
(
RC
.
nrmac
[
module_id
],
scc
,
sched_ctrl
,
NULL
,
UE
,
-
1
,
-
1
);
if
(
get_softmodem_params
()
->
sa
)
{
// add all available DL HARQ processes for this UE in SA
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
14364709
...
...
@@ -227,7 +227,7 @@ int nr_process_mac_pdu(instance_t module_idP,
NR_RA_t
*
ra
=
&
RC
.
nrmac
[
module_idP
]
->
common_channels
[
CC_id
].
ra
[
i
];
if
(
ra
->
state
>=
WAIT_Msg3
&&
ra
->
rnti
==
UE
->
rnti
)
{
ra
->
crnti
=
((
pduP
[
1
]
&
0xFF
)
<<
8
)
|
(
pduP
[
2
]
&
0xFF
);
ra
->
msg3_dcch_dtch
=
true
;
ra
->
state
=
Msg3_dcch_dtch
;
LOG_I
(
NR_MAC
,
"Received UL_SCH_LCID_C_RNTI with C-RNTI 0x%04x
\n
"
,
ra
->
crnti
);
break
;
}
...
...
@@ -755,9 +755,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
// harq_pid set a non valid value because it is not used in this call
// the function is only called to decode the contention resolution sub-header
if
(
nr_process_mac_pdu
(
gnb_mod_idP
,
UE
,
CC_idP
,
frameP
,
slotP
,
sduP
,
sdu_lenP
,
-
1
)
==
0
)
{
ra
->
state
=
Msg4
;
if
(
ra
->
m
sg3_dcch_dtch
)
{
if
(
ra
->
state
==
M
sg3_dcch_dtch
)
{
// Check if the UE identified by C-RNTI still exists at the gNB
NR_UE_info_t
*
UE_C
=
find_nr_UE
(
&
gNB_mac
->
UE_info
,
ra
->
crnti
);
if
(
!
UE_C
)
{
...
...
@@ -775,9 +774,14 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
reset_dl_harq_list
(
&
UE_C
->
UE_sched_ctrl
);
reset_ul_harq_list
(
&
UE_C
->
UE_sched_ctrl
);
}
LOG_I
(
NR_MAC
,
"Activating scheduling response to MSG3 with DCCH/DTCCH and RNTI 0x%04x (state %d)
\n
"
,
ra
->
crnti
,
ra
->
state
);
}
else
{
LOG_I
(
NR_MAC
,
"Activating scheduling RA-Msg4 for TC_RNTI 0x%04x (state %d)
\n
"
,
(
ra
->
msg3_dcch_dtch
?
ra
->
crnti
:
ra
->
rnti
),
ra
->
state
);
ra
->
rnti
,
ra
->
state
);
ra
->
state
=
Msg4
;
}
}
else
{
nr_mac_remove_ra_rnti
(
gnb_mod_idP
,
ra
->
rnti
);
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
14364709
...
...
@@ -342,7 +342,9 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
NR_ServingCellConfigCommon_t
*
scc
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_RA_t
*
ra
,
NR_UE_info_t
*
UE
);
NR_UE_info_t
*
UE
,
int
dl_bwp_switch
,
int
ul_bwp_switch
);
NR_UE_info_t
*
add_new_nr_ue
(
gNB_MAC_INST
*
nr_mac
,
rnti_t
rntiP
,
NR_CellGroupConfig_t
*
CellGroup
);
...
...
@@ -370,6 +372,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
void
nr_check_Msg4_Ack
(
module_id_t
module_id
,
int
CC_id
,
frame_t
frame
,
sub_frame_t
slot
,
NR_RA_t
*
ra
);
void
nr_generate_Msg3_dcch_dtch_response
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
slotP
,
NR_RA_t
*
ra
);
int
binomial
(
int
n
,
int
k
);
bool
is_xlsch_in_slot
(
uint64_t
bitmap
,
sub_frame_t
slot
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
14364709
...
...
@@ -96,8 +96,9 @@ typedef enum {
Msg2
=
1
,
WAIT_Msg3
=
2
,
Msg3_retransmission
=
3
,
Msg4
=
4
,
WAIT_Msg4_ACK
=
5
Msg3_dcch_dtch
=
4
,
Msg4
=
5
,
WAIT_Msg4_ACK
=
6
}
RA_gNB_state_t
;
typedef
struct
NR_preamble_ue
{
...
...
@@ -165,8 +166,6 @@ typedef struct {
uint8_t
msg3_cqireq
;
/// Round of Msg3 HARQ
uint8_t
msg3_round
;
/// Flag to indicate if Msg3 carries a DCCH or DTCH message
bool
msg3_dcch_dtch
;
int
msg3_startsymb
;
int
msg3_nrsymb
;
/// TBS used for Msg4
...
...
@@ -661,7 +660,6 @@ typedef struct {
asn_enc_rval_t
enc_rval
;
// UE selected beam index
uint8_t
UE_beam_index
;
bool
Msg3_dcch_dtch
;
bool
Msg4_ACKed
;
uint32_t
ra_timer
;
float
ul_thr_ue
;
...
...
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