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
44d1eb80
Commit
44d1eb80
authored
Apr 25, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preprocessor reset: avoid unnecessary iterations
parent
5ceba4a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
81 deletions
+79
-81
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+79
-81
No files found.
openair2/LAYER2/MAC/pre_processor.c
View file @
44d1eb80
...
@@ -1446,14 +1446,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
...
@@ -1446,14 +1446,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
if
(
!
ue_dl_slice_membership
(
module_idP
,
UE_id
,
slice_idx
))
if
(
!
ue_dl_slice_membership
(
module_idP
,
UE_id
,
slice_idx
))
continue
;
continue
;
vrb_map
=
RC
.
mac
[
module_idP
]
->
common_channels
[
CC_id
].
vrb_map
;
N_RB_DL
=
to_prb
(
RC
.
mac
[
module_idP
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
#ifdef SF0_LIMIT
sf0_lower
=
-
1
;
sf0_upper
=
-
1
;
#endif
LOG_D
(
MAC
,
"Running preprocessor for UE %d (%x)
\n
"
,
UE_id
,
rnti
);
LOG_D
(
MAC
,
"Running preprocessor for UE %d (%x)
\n
"
,
UE_id
,
rnti
);
// initialize harq_pid and round
// initialize harq_pid and round
if
(
ue_sched_ctl
->
ta_timer
)
if
(
ue_sched_ctl
->
ta_timer
)
...
@@ -1522,91 +1514,97 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
...
@@ -1522,91 +1514,97 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
ue_sched_ctl
->
pre_nb_available_rbs
[
CC_id
]
=
0
;
ue_sched_ctl
->
pre_nb_available_rbs
[
CC_id
]
=
0
;
ue_sched_ctl
->
dl_pow_off
[
CC_id
]
=
2
;
ue_sched_ctl
->
dl_pow_off
[
CC_id
]
=
2
;
switch
(
N_RB_DL
)
{
for
(
i
=
0
;
i
<
N_RBG
[
CC_id
];
i
++
)
{
case
6
:
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
i
]
=
0
;
RBGsize
=
1
;
RBGsize_last
=
1
;
break
;
case
15
:
RBGsize
=
2
;
RBGsize_last
=
1
;
break
;
case
25
:
RBGsize
=
2
;
RBGsize_last
=
1
;
break
;
case
50
:
RBGsize
=
3
;
RBGsize_last
=
2
;
break
;
case
75
:
RBGsize
=
4
;
RBGsize_last
=
3
;
break
;
case
100
:
RBGsize
=
4
;
RBGsize_last
=
4
;
break
;
default:
AssertFatal
(
1
==
0
,
"unsupported RBs (%d)
\n
"
,
N_RB_DL
);
}
}
}
N_RB_DL
=
to_prb
(
RC
.
mac
[
module_idP
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
#ifdef SF0_LIMIT
#ifdef SF0_LIMIT
switch
(
N_RBG
[
CC_id
])
{
switch
(
N_RBG
[
CC_id
])
{
case
6
:
case
6
:
sf0_lower
=
0
;
sf0_lower
=
0
;
sf0_upper
=
5
;
sf0_upper
=
5
;
break
;
break
;
case
8
:
case
8
:
sf0_lower
=
2
;
sf0_lower
=
2
;
sf0_upper
=
5
;
sf0_upper
=
5
;
break
;
break
;
case
13
:
case
13
:
sf0_lower
=
4
;
sf0_lower
=
4
;
sf0_upper
=
7
;
sf0_upper
=
7
;
break
;
break
;
case
17
:
case
17
:
sf0_lower
=
7
;
sf0_lower
=
7
;
sf0_upper
=
9
;
sf0_upper
=
9
;
break
;
break
;
case
25
:
case
25
:
sf0_lower
=
11
;
sf0_lower
=
11
;
sf0_upper
=
13
;
sf0_upper
=
13
;
break
;
break
;
default:
default:
AssertFatal
(
1
==
0
,
"unsupported RBs (%d)
\n
"
,
N_RB_DL
);
AssertFatal
(
1
==
0
,
"unsupported RBs (%d)
\n
"
,
N_RB_DL
);
}
}
#endif
#endif
// Initialize Subbands according to VRB map
switch
(
N_RB_DL
)
{
for
(
i
=
0
;
i
<
N_RBG
[
CC_id
];
i
++
)
{
case
6
:
int
rb_size
=
i
==
N_RBG
[
CC_id
]
-
1
?
RBGsize_last
:
RBGsize
;
RBGsize
=
1
;
RBGsize_last
=
1
;
break
;
case
15
:
RBGsize
=
2
;
RBGsize_last
=
1
;
break
;
case
25
:
RBGsize
=
2
;
RBGsize_last
=
1
;
break
;
case
50
:
RBGsize
=
3
;
RBGsize_last
=
2
;
break
;
case
75
:
RBGsize
=
4
;
RBGsize_last
=
3
;
break
;
case
100
:
RBGsize
=
4
;
RBGsize_last
=
4
;
break
;
default:
AssertFatal
(
1
==
0
,
"unsupported RBs (%d)
\n
"
,
N_RB_DL
);
}
vrb_map
=
RC
.
mac
[
module_idP
]
->
common_channels
[
CC_id
].
vrb_map
;
// Initialize Subbands according to VRB map
for
(
i
=
0
;
i
<
N_RBG
[
CC_id
];
i
++
)
{
int
rb_size
=
i
==
N_RBG
[
CC_id
]
-
1
?
RBGsize_last
:
RBGsize
;
rballoc_sub
[
CC_id
][
i
]
=
0
;
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
i
]
=
0
;
rballoc_sub
[
CC_id
][
i
]
=
0
;
#ifdef SF0_LIMIT
#ifdef SF0_LIMIT
// for avoiding 6+ PRBs around DC in subframe 0 (avoid excessive errors)
// for avoiding 6+ PRBs around DC in subframe 0 (avoid excessive errors)
/* TODO: make it proper - allocate those RBs, do not "protect" them, but
/* TODO: make it proper - allocate those RBs, do not "protect" them, but
* compute number of available REs and limit MCS according to the
* compute number of available REs and limit MCS according to the
* TBS table 36.213 7.1.7.2.1-1 (can be done after pre-processor)
* TBS table 36.213 7.1.7.2.1-1 (can be done after pre-processor)
*/
*/
if
(
subframeP
==
0
&&
i
>=
sf0_lower
&&
i
<=
sf0_upper
)
if
(
subframeP
==
0
&&
i
>=
sf0_lower
&&
i
<=
sf0_upper
)
rballoc_sub
[
CC_id
][
i
]
=
1
;
rballoc_sub
[
CC_id
][
i
]
=
1
;
#endif
#endif
// for SI-RNTI,RA-RNTI and P-RNTI allocations
// for SI-RNTI,RA-RNTI and P-RNTI allocations
for
(
j
=
0
;
j
<
rb_size
;
j
++
)
{
for
(
j
=
0
;
j
<
rb_size
;
j
++
)
{
if
(
vrb_map
[
j
+
(
i
*
RBGsize
)]
!=
0
)
{
if
(
vrb_map
[
j
+
(
i
*
RBGsize
)]
!=
0
)
{
rballoc_sub
[
CC_id
][
i
]
=
1
;
rballoc_sub
[
CC_id
][
i
]
=
1
;
LOG_D
(
MAC
,
"Frame %d, subframe %d : vrb %d allocated
\n
"
,
frameP
,
subframeP
,
j
+
(
i
*
RBGsize
));
LOG_D
(
MAC
,
"Frame %d, subframe %d : vrb %d allocated
\n
"
,
frameP
,
subframeP
,
j
+
(
i
*
RBGsize
));
break
;
break
;
}
}
}
LOG_D
(
MAC
,
"Frame %d Subframe %d CC_id %d RBG %i : rb_alloc %d
\n
"
,
frameP
,
subframeP
,
CC_id
,
i
,
rballoc_sub
[
CC_id
][
i
]);
MIMO_mode_indicator
[
CC_id
][
i
]
=
2
;
}
}
LOG_D
(
MAC
,
"Frame %d Subframe %d CC_id %d RBG %i : rb_alloc %d
\n
"
,
frameP
,
subframeP
,
CC_id
,
i
,
rballoc_sub
[
CC_id
][
i
]);
MIMO_mode_indicator
[
CC_id
][
i
]
=
2
;
}
}
}
}
}
}
...
...
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