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
canghaiwuhen
OpenXG-RAN
Commits
d0667d9e
Commit
d0667d9e
authored
Sep 21, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add NR_UE_list_t type
parent
e956c17b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
44 deletions
+20
-44
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+7
-27
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+3
-11
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+9
-5
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
d0667d9e
...
@@ -1592,26 +1592,9 @@ int extract_length(int startSymbolAndLength) {
...
@@ -1592,26 +1592,9 @@ int extract_length(int startSymbolAndLength) {
/*
/*
* Dump the UL or DL UE_info into LOG_T(MAC)
* Dump the UL or DL UE_info into LOG_T(MAC)
*/
*/
void
void
dump_nr_ue_list
(
NR_UE_list_t
*
listP
)
{
dump_nr_ue_list
(
NR_UE_info_t
*
listP
,
for
(
int
j
=
listP
->
head
;
j
>=
0
;
j
=
listP
->
next
[
j
])
int
ul_flag
)
LOG_T
(
MAC
,
"DL list node %d => %d
\n
"
,
j
,
listP
->
next
[
j
]);
//------------------------------------------------------------------------------
{
if
(
ul_flag
==
0
)
{
for
(
int
j
=
listP
->
head
;
j
>=
0
;
j
=
listP
->
next
[
j
])
{
LOG_T
(
MAC
,
"DL list node %d => %d
\n
"
,
j
,
listP
->
next
[
j
]);
}
}
else
{
for
(
int
j
=
listP
->
head_ul
;
j
>=
0
;
j
=
listP
->
next_ul
[
j
])
{
LOG_T
(
MAC
,
"UL list node %d => %d
\n
"
,
j
,
listP
->
next_ul
[
j
]);
}
}
return
;
}
}
int
find_nr_UE_id
(
module_id_t
mod_idP
,
rnti_t
rntiP
)
int
find_nr_UE_id
(
module_id_t
mod_idP
,
rnti_t
rntiP
)
...
@@ -1641,12 +1624,11 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
...
@@ -1641,12 +1624,11 @@ 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 (n
ext avail %d, n
um_UEs %d)
\n
"
,
LOG_I
(
MAC
,
"[gNB %d] Adding UE with rnti %x (num_UEs %d)
\n
"
,
mod_idP
,
mod_idP
,
rntiP
,
rntiP
,
UE_info
->
avail
,
UE_info
->
num_UEs
);
UE_info
->
num_UEs
);
dump_nr_ue_list
(
UE_info
,
0
);
dump_nr_ue_list
(
&
UE_info
->
list
);
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
if
(
UE_info
->
active
[
i
])
if
(
UE_info
->
active
[
i
])
...
@@ -1676,15 +1658,13 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
...
@@ -1676,15 +1658,13 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP){
mod_idP
,
mod_idP
,
UE_id
,
UE_id
,
rntiP
);
rntiP
);
dump_nr_ue_list
(
UE_info
,
dump_nr_ue_list
(
&
UE_info
->
list
);
0
);
return
(
UE_id
);
return
(
UE_id
);
}
}
// printf("MAC: cannot add new UE for rnti %x\n", rntiP);
// printf("MAC: cannot add new UE for rnti %x\n", rntiP);
LOG_E
(
MAC
,
"error in add_new_ue(), could not find space in UE_info, Dumping UE list
\n
"
);
LOG_E
(
MAC
,
"error in add_new_ue(), could not find space in UE_info, Dumping UE list
\n
"
);
dump_nr_ue_list
(
UE_info
,
dump_nr_ue_list
(
&
UE_info
->
list
);
0
);
return
-
1
;
return
-
1
;
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
d0667d9e
...
@@ -300,7 +300,7 @@ int NRRIV2BW(int locationAndBandwidth,int N_RB);
...
@@ -300,7 +300,7 @@ int NRRIV2BW(int locationAndBandwidth,int N_RB);
int
NRRIV2PRBOFFSET
(
int
locationAndBandwidth
,
int
N_RB
);
int
NRRIV2PRBOFFSET
(
int
locationAndBandwidth
,
int
N_RB
);
void
dump_nr_ue_list
(
NR_UE_
info_t
*
listP
,
int
ul_flag
);
void
dump_nr_ue_list
(
NR_UE_
list_t
*
listP
);
int
find_nr_UE_id
(
module_id_t
mod_idP
,
rnti_t
rntiP
);
int
find_nr_UE_id
(
module_id_t
mod_idP
,
rnti_t
rntiP
);
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
d0667d9e
...
@@ -106,13 +106,9 @@ void mac_top_init_gNB(void)
...
@@ -106,13 +106,9 @@ void mac_top_init_gNB(void)
UE_info
=
&
nrmac
->
UE_info
;
UE_info
=
&
nrmac
->
UE_info
;
UE_info
->
num_UEs
=
0
;
UE_info
->
num_UEs
=
0
;
UE_info
->
head
=
-
1
;
UE_info
->
list
.
head
=
-
1
;
UE_info
->
head_ul
=
-
1
;
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_GNB
;
list_el
++
)
{
UE_info
->
avail
=
0
;
UE_info
->
list
.
next
[
list_el
]
=
-
1
;
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_GNB
-
1
;
list_el
++
)
{
UE_info
->
next
[
list_el
]
=
list_el
+
1
;
UE_info
->
next_ul
[
list_el
]
=
list_el
+
1
;
UE_info
->
active
[
list_el
]
=
FALSE
;
UE_info
->
active
[
list_el
]
=
FALSE
;
for
(
int
list_harq
=
0
;
list_harq
<
NR_MAX_NB_HARQ_PROCESSES
;
list_harq
++
)
{
for
(
int
list_harq
=
0
;
list_harq
<
NR_MAX_NB_HARQ_PROCESSES
;
list_harq
++
)
{
UE_info
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
round
=
0
;
UE_info
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
round
=
0
;
...
@@ -123,10 +119,6 @@ void mac_top_init_gNB(void)
...
@@ -123,10 +119,6 @@ void mac_top_init_gNB(void)
UE_info
->
UE_sched_ctrl
[
list_el
].
ul_harq_processes
[
list_harq
].
state
=
0
;
UE_info
->
UE_sched_ctrl
[
list_el
].
ul_harq_processes
[
list_harq
].
state
=
0
;
}
}
}
}
UE_info
->
next
[
list_el
]
=
-
1
;
UE_info
->
next_ul
[
list_el
]
=
-
1
;
UE_info
->
active
[
list_el
]
=
FALSE
;
}
}
srand48
(
0
);
srand48
(
0
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
d0667d9e
...
@@ -344,17 +344,21 @@ typedef struct {
...
@@ -344,17 +344,21 @@ typedef struct {
int
ulsch_total_bytes_rx
;
int
ulsch_total_bytes_rx
;
}
NR_mac_stats_t
;
}
NR_mac_stats_t
;
/*! \brief UNR_E_list_t is a "list" of users within UE_info_t. Especial useful in
* the scheduler and to keep "classes" of users. */
typedef
struct
{
int
head
;
int
next
[
MAX_MOBILES_PER_GNB
];
}
NR_UE_list_t
;
/*! \brief UE list used by gNB to order UEs/CC for scheduling*/
/*! \brief UE list used by gNB to order UEs/CC for scheduling*/
typedef
struct
{
typedef
struct
{
DLSCH_PDU
DLSCH_pdu
[
4
][
MAX_MOBILES_PER_GNB
];
DLSCH_PDU
DLSCH_pdu
[
4
][
MAX_MOBILES_PER_GNB
];
/// scheduling control info
/// scheduling control info
NR_UE_sched_ctrl_t
UE_sched_ctrl
[
MAX_MOBILES_PER_GNB
];
NR_UE_sched_ctrl_t
UE_sched_ctrl
[
MAX_MOBILES_PER_GNB
];
NR_mac_stats_t
mac_stats
[
MAX_MOBILES_PER_GNB
];
NR_mac_stats_t
mac_stats
[
MAX_MOBILES_PER_GNB
];
int
next
[
MAX_MOBILES_PER_GNB
];
NR_UE_list_t
list
;
int
head
;
int
next_ul
[
MAX_MOBILES_PER_GNB
];
int
head_ul
;
int
avail
;
int
num_UEs
;
int
num_UEs
;
boolean_t
active
[
MAX_MOBILES_PER_GNB
];
boolean_t
active
[
MAX_MOBILES_PER_GNB
];
boolean_t
fiveG_connected
[
MAX_MOBILES_PER_GNB
];
boolean_t
fiveG_connected
[
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