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
wangjie
OpenXG-RAN
Commits
d1af0775
Commit
d1af0775
authored
Nov 09, 2020
by
ChiehChun
Committed by
Robert Schmidt
Nov 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add static TBS and Calculate throughput
parent
74003a93
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+11
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+1
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
d1af0775
...
@@ -482,6 +482,8 @@ bool allocate_retransmission(module_id_t module_id,
...
@@ -482,6 +482,8 @@ bool allocate_retransmission(module_id_t module_id,
return
true
;
return
true
;
}
}
float
thr_ue
[
MAX_MOBILES_PER_GNB
];
void
pf_dl
(
module_id_t
module_id
,
void
pf_dl
(
module_id_t
module_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
...
@@ -492,6 +494,9 @@ void pf_dl(module_id_t module_id,
...
@@ -492,6 +494,9 @@ void pf_dl(module_id_t module_id,
int
max_num_ue
)
{
int
max_num_ue
)
{
const
int
UE_id
=
0
;
const
int
UE_id
=
0
;
float
coeff_ue
[
MAX_MOBILES_PER_GNB
];
NR_UE_list_t
UE_sched
;
// UEs that could be scheduled
int
*
uep
=
&
UE_sched
.
head
;
/* Loop UE_info->list to check retransmission */
/* Loop UE_info->list to check retransmission */
for
(
int
UE_id
=
UE_info
->
list
.
head
;
UE_id
>=
0
;
UE_id
=
UE_info
->
list
.
next
[
UE_id
])
{
for
(
int
UE_id
=
UE_info
->
list
.
head
;
UE_id
>=
0
;
UE_id
=
UE_info
->
list
.
next
[
UE_id
])
{
...
@@ -501,7 +506,10 @@ void pf_dl(module_id_t module_id,
...
@@ -501,7 +506,10 @@ void pf_dl(module_id_t module_id,
const
rnti_t
rnti
=
UE_info
->
rnti
[
UE_id
];
const
rnti_t
rnti
=
UE_info
->
rnti
[
UE_id
];
/* Calculate Throughput */
/* Calculate Throughput */
const
float
a
=
0
.
0005
f
;
// corresponds to 200ms window
const
uint32_t
b
=
UE_info
->
mac_stats
[
UE_id
].
dlsch_current_bytes
;
thr_ue
[
UE_id
]
=
(
1
-
a
)
*
thr_ue
[
UE_id
]
+
a
*
b
;
LOG_I
(
MAC
,
"thr_ue[%d] %f
\n
"
,
UE_id
,
thr_ue
[
UE_id
]);
/* retransmission */
/* retransmission */
if
(
harq
->
round
!=
0
)
{
if
(
harq
->
round
!=
0
)
{
...
@@ -660,6 +668,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -660,6 +668,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
NR_UE_list_t
*
UE_list
=
&
UE_info
->
list
;
NR_UE_list_t
*
UE_list
=
&
UE_info
->
list
;
for
(
int
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
for
(
int
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
UE_info
->
mac_stats
[
UE_id
].
dlsch_current_bytes
=
0
;
/* update TA and set ta_apply every 10 frames.
/* update TA and set ta_apply every 10 frames.
* Possible improvement: take the periodicity from input file.
* Possible improvement: take the periodicity from input file.
...
@@ -822,6 +831,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -822,6 +831,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
}
}
UE_info
->
mac_stats
[
UE_id
].
dlsch_total_bytes
+=
TBS
;
UE_info
->
mac_stats
[
UE_id
].
dlsch_total_bytes
+=
TBS
;
UE_info
->
mac_stats
[
UE_id
].
dlsch_current_bytes
=
TBS
;
UE_info
->
mac_stats
[
UE_id
].
lc_bytes_tx
[
lcid
]
+=
sdu_length_total
;
UE_info
->
mac_stats
[
UE_id
].
lc_bytes_tx
[
lcid
]
+=
sdu_length_total
;
const
int
post_padding
=
TBS
>
header_length_total
+
sdu_length_total
+
ta_len
;
const
int
post_padding
=
TBS
>
header_length_total
+
sdu_length_total
+
ta_len
;
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
d1af0775
...
@@ -399,6 +399,7 @@ typedef struct {
...
@@ -399,6 +399,7 @@ typedef struct {
int
dlsch_rounds
[
8
];
int
dlsch_rounds
[
8
];
int
dlsch_errors
;
int
dlsch_errors
;
int
dlsch_total_bytes
;
int
dlsch_total_bytes
;
int
dlsch_current_bytes
;
int
ulsch_rounds
[
8
];
int
ulsch_rounds
[
8
];
int
ulsch_errors
;
int
ulsch_errors
;
int
ulsch_total_bytes_scheduled
;
int
ulsch_total_bytes_scheduled
;
...
...
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