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
常顺宇
OpenXG-RAN
Commits
d9215819
Commit
d9215819
authored
Sep 21, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove fiveG_connected and use active
parent
793cbda9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
26 deletions
+21
-26
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+12
-11
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+2
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+2
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+5
-7
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+0
-1
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
d9215819
...
@@ -411,14 +411,16 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -411,14 +411,16 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
const
int
num_slots_per_tdd
=
slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
]
>>
(
7
-
tdd_pattern
->
dl_UL_TransmissionPeriodicity
);
const
int
num_slots_per_tdd
=
slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
]
>>
(
7
-
tdd_pattern
->
dl_UL_TransmissionPeriodicity
);
const
int
nr_ulmix_slots
=
tdd_pattern
->
nrofUplinkSlots
+
(
tdd_pattern
->
nrofUplinkSymbols
!=
0
);
const
int
nr_ulmix_slots
=
tdd_pattern
->
nrofUplinkSlots
+
(
tdd_pattern
->
nrofUplinkSymbols
!=
0
);
if
(
slot
==
0
&&
(
UE_info
->
fiveG_connected
[
UE_id
]
||
get_softmodem_params
()
->
phy_test
)
)
{
if
(
slot
==
0
&&
UE_info
->
active
[
UE_id
]
)
{
for
(
int
k
=
0
;
k
<
nr_ulmix_slots
;
k
++
)
{
for
(
int
k
=
0
;
k
<
nr_ulmix_slots
;
k
++
)
{
memset
((
void
*
)
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
k
],
/* Seems to be covered 384? */
/*memset((void *) &UE_info->UE_sched_ctrl[UE_id].sched_pucch[k],
0,
0,
sizeof
(
NR_sched_pucch
));
sizeof(NR_sched_pucch));*/
memset
((
void
*
)
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pusch
[
k
],
/* Seems to be covered in line 335? */
/*memset((void *) &UE_info->UE_sched_ctrl[UE_id].sched_pusch[k],
0,
0,
sizeof
(
NR_sched_pusch
));
sizeof(NR_sched_pusch));
*/
}
}
}
}
...
@@ -470,10 +472,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -470,10 +472,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
(
get_softmodem_params
()
->
phy_test
==
0
)
{
if
(
get_softmodem_params
()
->
phy_test
==
0
)
{
nr_schedule_RA
(
module_idP
,
frame
,
slot
);
nr_schedule_RA
(
module_idP
,
frame
,
slot
);
nr_schedule_reception_msg3
(
module_idP
,
0
,
frame
,
slot
);
nr_schedule_reception_msg3
(
module_idP
,
0
,
frame
,
slot
);
}
else
}
UE_info
->
fiveG_connected
[
UE_id
]
=
true
;
if
(
UE_info
->
fiveG_connected
[
UE_id
])
{
if
(
UE_info
->
active
[
UE_id
])
{
// TbD once RACH is available, start ta_timer when UE is connected
// TbD once RACH is available, start ta_timer when UE is connected
if
(
ue_sched_ctl
->
ta_timer
)
if
(
ue_sched_ctl
->
ta_timer
)
ue_sched_ctl
->
ta_timer
--
;
ue_sched_ctl
->
ta_timer
--
;
...
@@ -488,13 +489,13 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -488,13 +489,13 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// This schedules the DCI for Uplink and subsequently PUSCH
// This schedules the DCI for Uplink and subsequently PUSCH
// The decision about whether to schedule is done for each UE independently
// The decision about whether to schedule is done for each UE independently
// inside
// inside
if
(
UE_info
->
fiveG_connected
[
UE_id
])
{
if
(
UE_info
->
active
[
UE_id
])
{
int
tda
=
1
;
// time domain assignment hardcoded for now
int
tda
=
1
;
// time domain assignment hardcoded for now
schedule_fapi_ul_pdu
(
module_idP
,
frame
,
slot
,
num_slots_per_tdd
,
nr_ulmix_slots
,
tda
,
ulsch_in_slot_bitmap
);
schedule_fapi_ul_pdu
(
module_idP
,
frame
,
slot
,
num_slots_per_tdd
,
nr_ulmix_slots
,
tda
,
ulsch_in_slot_bitmap
);
nr_schedule_pusch
(
module_idP
,
UE_id
,
num_slots_per_tdd
,
nr_ulmix_slots
,
frame
,
slot
);
nr_schedule_pusch
(
module_idP
,
UE_id
,
num_slots_per_tdd
,
nr_ulmix_slots
,
frame
,
slot
);
}
}
if
(
UE_info
->
fiveG_connected
[
UE_id
]
if
(
UE_info
->
active
[
UE_id
]
&&
(
is_xlsch_in_slot
(
dlsch_in_slot_bitmap
,
slot
%
num_slots_per_tdd
))
&&
(
is_xlsch_in_slot
(
dlsch_in_slot_bitmap
,
slot
%
num_slots_per_tdd
))
&&
(
!
get_softmodem_params
()
->
phy_test
||
slot
==
1
))
{
&&
(
!
get_softmodem_params
()
->
phy_test
||
slot
==
1
))
{
ue_sched_ctl
->
current_harq_pid
=
slot
%
num_slots_per_tdd
;
ue_sched_ctl
->
current_harq_pid
=
slot
%
num_slots_per_tdd
;
...
@@ -505,7 +506,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -505,7 +506,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
ue_sched_ctl
->
ta_apply
=
false
;
ue_sched_ctl
->
ta_apply
=
false
;
}
}
if
(
UE_info
->
fiveG_connected
[
UE_id
])
if
(
UE_info
->
active
[
UE_id
])
nr_schedule_pucch
(
module_idP
,
UE_id
,
nr_ulmix_slots
,
frame
,
slot
);
nr_schedule_pucch
(
module_idP
,
UE_id
,
nr_ulmix_slots
,
frame
,
slot
);
stop_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
stop_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
d9215819
...
@@ -268,9 +268,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
...
@@ -268,9 +268,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
break
;
break
;
}
}
}
}
if
(
pr_found
)
if
(
!
pr_found
)
{
UE_info
->
fiveG_connected
[
UE_id
]
=
false
;
else
{
LOG_E
(
MAC
,
"[gNB %d][RAPROC] FAILURE: preamble %d does not correspond to any of the ones in rach_ConfigDedicated for UE_id %d
\n
"
,
LOG_E
(
MAC
,
"[gNB %d][RAPROC] FAILURE: preamble %d does not correspond to any of the ones in rach_ConfigDedicated for UE_id %d
\n
"
,
module_idP
,
preamble_index
,
UE_id
);
module_idP
,
preamble_index
,
UE_id
);
return
;
// if the PRACH preamble does not correspond to any of the ones sent through RRC abort RA proc
return
;
// if the PRACH preamble does not correspond to any of the ones sent through RRC abort RA proc
...
@@ -448,7 +446,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
...
@@ -448,7 +446,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
memset
(
pusch_pdu
,
0
,
sizeof
(
nfapi_nr_pusch_pdu_t
));
memset
(
pusch_pdu
,
0
,
sizeof
(
nfapi_nr_pusch_pdu_t
));
AssertFatal
(
UE_info
->
active
[
UE_id
],
"Cannot find UE_id %d is not
active
\n
"
,
UE_id
);
AssertFatal
(
!
UE_info
->
active
[
UE_id
],
"UE_id %d is already
active
\n
"
,
UE_id
);
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_info
->
secondaryCellGroup
[
UE_id
];
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_info
->
secondaryCellGroup
[
UE_id
];
AssertFatal
(
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
==
1
,
AssertFatal
(
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
==
1
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
d9215819
...
@@ -1626,7 +1626,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
...
@@ -1626,7 +1626,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
int
num_slots_ul
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
int
num_slots_ul
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
if
(
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
>
0
)
if
(
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
>
0
)
num_slots_ul
++
;
num_slots_ul
++
;
LOG_
I
(
MAC
,
"[gNB %d] Adding UE with rnti %x (num_UEs %d)
\n
"
,
LOG_
W
(
MAC
,
"[gNB %d] Adding UE with rnti %x (num_UEs %d)
\n
"
,
mod_idP
,
mod_idP
,
rntiP
,
rntiP
,
UE_info
->
num_UEs
);
UE_info
->
num_UEs
);
...
@@ -1638,7 +1638,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
...
@@ -1638,7 +1638,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
int
UE_id
=
i
;
int
UE_id
=
i
;
UE_info
->
num_UEs
++
;
UE_info
->
num_UEs
++
;
UE_info
->
active
[
UE_id
]
=
true
;
UE_info
->
active
[
UE_id
]
=
false
;
/* not yet active, we wait for RA! */
UE_info
->
rnti
[
UE_id
]
=
rntiP
;
UE_info
->
rnti
[
UE_id
]
=
rntiP
;
add_nr_ue_list
(
&
UE_info
->
list
,
UE_id
);
add_nr_ue_list
(
&
UE_info
->
list
,
UE_id
);
memset
((
void
*
)
&
UE_info
->
UE_sched_ctrl
[
UE_id
],
memset
((
void
*
)
&
UE_info
->
UE_sched_ctrl
[
UE_id
],
...
@@ -1691,7 +1691,6 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti)
...
@@ -1691,7 +1691,6 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti)
/* UE found, remove it */
/* UE found, remove it */
UE_id
=
i
;
UE_id
=
i
;
UE_info
->
num_UEs
--
;
UE_info
->
num_UEs
--
;
UE_list
->
fiveG_connected
[
UE_id
]
=
FALSE
;
UE_info
->
active
[
UE_id
]
=
FALSE
;
UE_info
->
active
[
UE_id
]
=
FALSE
;
UE_info
->
rnti
[
UE_id
]
=
0
;
UE_info
->
rnti
[
UE_id
]
=
0
;
free
(
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
);
free
(
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
d9215819
...
@@ -370,16 +370,14 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
...
@@ -370,16 +370,14 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
// random access pusch with TC-RNTI
// random access pusch with TC-RNTI
if
(
sduP
!=
NULL
)
{
// if the CRC passed
if
(
sduP
!=
NULL
)
{
// if the CRC passed
for
(
int
i
=
0
;
i
<
MAX_MOBILES_PER_GNB
;
i
++
)
{
for
(
int
i
=
0
;
i
<
MAX_MOBILES_PER_GNB
;
i
++
)
{
if
(
UE_info
->
active
[
i
])
{
if
(
UE_info
->
tc_rnti
[
i
]
==
current_rnti
)
{
if
(
UE_info
->
tc_rnti
[
i
]
==
current_rnti
)
{
// for now the only thing we are doing is set the UE as 5G connected
// for now the only thing we are doing is set the UE as active
UE_info
->
fiveG_connected
[
i
]
=
true
;
UE_info
->
active
[
i
]
=
true
;
LOG_I
(
MAC
,
"[gNB %d][RAPROC] PUSCH with TC_RNTI %x received correctly and UE_id %d is now 5G connected
\n
"
,
LOG_W
(
MAC
,
"[gNB %d][RAPROC] PUSCH with TC_RNTI %x received correctly and UE_id %d is now 5G connected
\n
"
,
gnb_mod_idP
,
current_rnti
,
i
);
gnb_mod_idP
,
current_rnti
,
i
);
}
}
}
}
}
}
}
}
}
}
}
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
d9215819
...
@@ -361,7 +361,6 @@ typedef struct {
...
@@ -361,7 +361,6 @@ typedef struct {
NR_UE_list_t
list
;
NR_UE_list_t
list
;
int
num_UEs
;
int
num_UEs
;
bool
active
[
MAX_MOBILES_PER_GNB
];
bool
active
[
MAX_MOBILES_PER_GNB
];
boolean_t
fiveG_connected
[
MAX_MOBILES_PER_GNB
];
rnti_t
rnti
[
MAX_MOBILES_PER_GNB
];
rnti_t
rnti
[
MAX_MOBILES_PER_GNB
];
rnti_t
tc_rnti
[
MAX_MOBILES_PER_GNB
];
rnti_t
tc_rnti
[
MAX_MOBILES_PER_GNB
];
NR_preamble_ue
preambles
[
MAX_MOBILES_PER_GNB
];
NR_preamble_ue
preambles
[
MAX_MOBILES_PER_GNB
];
...
...
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