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
Michael Black
OpenXG-RAN
Commits
799d0b3a
Commit
799d0b3a
authored
Mar 09, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reworking response to MSG3 with DCCH/DTCH
parent
d379bbae
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 @
799d0b3a
...
...
@@ -799,7 +799,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 @
799d0b3a
...
...
@@ -547,7 +547,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
RC
.
nrmac
[
Mod_idP
]
->
sib1_tda
=
sib1_tda
;
for
(
int
n
=
0
;
n
<
NR_NB_RA_PROC_MAX
;
n
++
)
{
cc
->
ra
[
n
].
cfra
=
false
;
cc
->
ra
[
n
].
msg3_dcch_dtch
=
false
;
cc
->
ra
[
n
].
rnti
=
0
;
cc
->
ra
[
n
].
preambles
.
num_preambles
=
MAX_NUM_NR_PRACH_PREAMBLES
;
cc
->
ra
[
n
].
preambles
.
preamble_list
=
(
uint8_t
*
)
malloc
(
MAX_NUM_NR_PRACH_PREAMBLES
*
sizeof
(
uint8_t
));
...
...
@@ -613,7 +612,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
for
(
int
i
=
0
;
i
<
MAX_NUM_NR_PRACH_PREAMBLES
;
i
++
)
ra
->
preambles
.
preamble_list
[
i
]
=
i
;
}
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
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
799d0b3a
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
799d0b3a
...
...
@@ -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 @
799d0b3a
...
...
@@ -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 @
799d0b3a
...
...
@@ -343,7 +343,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
);
...
...
@@ -371,6 +373,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 @
799d0b3a
...
...
@@ -94,8 +94,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
{
...
...
@@ -163,8 +164,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
...
...
@@ -659,7 +658,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