Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
openinterfaces5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kumar, Sunil Dr (Comp Sci & Elec Eng)
openinterfaces5G
Commits
a943222b
Commit
a943222b
authored
4 years ago
by
Robert Schmidt
Committed by
Kumar, Sunil Dr (Comp Sci & Elec Eng)
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix NVS slicing algo: write more compactly, todo retransmission first
parent
ecbae3c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair2/LAYER2/MAC/slicing/slicing.c
+8
-7
8 additions, 7 deletions
openair2/LAYER2/MAC/slicing/slicing.c
with
8 additions
and
7 deletions
openair2/LAYER2/MAC/slicing/slicing.c
+
8
−
7
View file @
a943222b
...
@@ -813,18 +813,18 @@ void nvs_dl(module_id_t mod_id,
...
@@ -813,18 +813,18 @@ void nvs_dl(module_id_t mod_id,
memset
(
ue_sched_ctrl
->
rballoc_sub_UE
[
CC_id
],
0
,
sizeof
(
ue_sched_ctrl
->
rballoc_sub_UE
[
CC_id
]));
memset
(
ue_sched_ctrl
->
rballoc_sub_UE
[
CC_id
],
0
,
sizeof
(
ue_sched_ctrl
->
rballoc_sub_UE
[
CC_id
]));
ue_sched_ctrl
->
pre_dci_dl_pdu_idx
=
-
1
;
ue_sched_ctrl
->
pre_dci_dl_pdu_idx
=
-
1
;
const
int
idx
=
si
->
UE_assoc_slice
[
UE_id
];
DevAssert
(
idx
>=
0
);
const
UE_TEMPLATE
*
UE_template
=
&
UE_info
->
UE_template
[
CC_id
][
UE_id
];
const
UE_TEMPLATE
*
UE_template
=
&
UE_info
->
UE_template
[
CC_id
][
UE_id
];
const
uint8_t
round
=
UE_info
->
UE_sched_ctrl
[
UE_id
].
round
[
CC_id
][
harq_pid
];
const
uint8_t
round
=
UE_info
->
UE_sched_ctrl
[
UE_id
].
round
[
CC_id
][
harq_pid
];
/* if UE has data or retransmission, mark respective slice as active */
/* if UE has data or retransmission, mark respective slice as active */
if
(
UE_template
->
dl_buffer_total
>
0
||
round
!=
8
)
{
const
bool
active
=
UE_template
->
dl_buffer_total
>
0
||
round
!=
8
;
const
int
idx
=
si
->
UE_assoc_slice
[
UE_id
];
((
_nvs_int_t
*
)
si
->
s
[
idx
]
->
int_data
)
->
active
|=
active
;
if
(
idx
>=
0
)
((
_nvs_int_t
*
)
si
->
s
[
idx
]
->
int_data
)
->
active
=
1
;
}
}
}
const
int
N_RBG
=
to_rbg
(
RC
.
mac
[
mod_id
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
const
int
N_RBG
=
to_rbg
(
RC
.
mac
[
mod_id
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
const
int
RBGsize
=
get_min_rb_unit
(
mod_id
,
CC_id
);
const
int
RBGsize
=
get_min_rb_unit
(
mod_id
,
CC_id
);
const
int
N_RB_DL
=
to_prb
(
RC
.
mac
[
mod_id
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
uint8_t
*
vrb_map
=
RC
.
mac
[
mod_id
]
->
common_channels
[
CC_id
].
vrb_map
;
uint8_t
*
vrb_map
=
RC
.
mac
[
mod_id
]
->
common_channels
[
CC_id
].
vrb_map
;
uint8_t
rbgalloc_mask
[
N_RBG_MAX
];
uint8_t
rbgalloc_mask
[
N_RBG_MAX
];
int
n_rbg_sched
=
0
;
int
n_rbg_sched
=
0
;
...
@@ -832,12 +832,13 @@ void nvs_dl(module_id_t mod_id,
...
@@ -832,12 +832,13 @@ void nvs_dl(module_id_t mod_id,
// calculate mask: init to one + "AND" with vrb_map:
// calculate mask: init to one + "AND" with vrb_map:
// if any RB in vrb_map is blocked (1), the current RBG will be 0
// if any RB in vrb_map is blocked (1), the current RBG will be 0
rbgalloc_mask
[
i
]
=
1
;
rbgalloc_mask
[
i
]
=
1
;
for
(
int
j
=
0
;
j
<
RBGsize
;
j
++
)
for
(
int
j
=
0
;
j
<
RBGsize
&&
RBGsize
*
i
+
j
<
N_RB_DL
;
j
++
)
rbgalloc_mask
[
i
]
&=
!
vrb_map
[
RBGsize
*
i
+
j
];
rbgalloc_mask
[
i
]
&=
!
vrb_map
[
RBGsize
*
i
+
j
];
n_rbg_sched
+=
rbgalloc_mask
[
i
];
n_rbg_sched
+=
rbgalloc_mask
[
i
];
}
}
const
int
N_RB_DL
=
to_prb
(
RC
.
mac
[
mod_id
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
/* todo: schedule retransmission first */
float
maxw
=
0
.
0
f
;
float
maxw
=
0
.
0
f
;
int
maxidx
=
-
1
;
int
maxidx
=
-
1
;
for
(
int
i
=
0
;
i
<
si
->
num
;
++
i
)
{
for
(
int
i
=
0
;
i
<
si
->
num
;
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment