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
699bbcb8
Commit
699bbcb8
authored
Feb 24, 2018
by
jftt_wangshanshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify source of ulsch_scheduler_pre_processor
parent
0504659e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
72 deletions
+21
-72
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+21
-72
No files found.
openair2/LAYER2/MAC/pre_processor.c
View file @
699bbcb8
...
...
@@ -2696,6 +2696,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
uint16_t
first_rb
[
MAX_NUM_CCs
];
uint8_t
mcs
;
uint8_t
rb_table_index
;
uint8_t
num_pucch_rb
;
uint32_t
tbs
;
int16_t
tx_power
;
int
UE_id
;
...
...
@@ -2711,19 +2712,21 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
frame_parms
=
&
(
RC
.
eNB
[
module_idP
][
CC_id
]
->
frame_parms
);
if
(
cc
->
tdd_Config
)
{
//TDD
if
(
frame_parms
->
N_RB_UL
==
25
)
{
first_rb
[
CC_id
]
=
1
;
num_pucch_rb
=
1
;
}
else
if
(
frame_parms
->
N_RB_UL
==
50
)
{
first_rb
[
CC_id
]
=
2
;
num_pucch_rb
=
2
;
}
else
{
first_rb
[
CC_id
]
=
3
;
num_pucch_rb
=
3
;
}
}
else
{
//FDD
if
(
frame_parms
->
N_RB_UL
==
25
)
{
first_rb
[
CC_id
]
=
1
;
num_pucch_rb
=
1
;
}
else
{
first_rb
[
CC_id
]
=
2
;
num_pucch_rb
=
2
;
}
}
first_rb
[
CC_id
]
=
num_pucch_rb
;
ue_num_temp
=
ulsch_ue_select
[
CC_id
].
ue_num
;
for
(
ulsch_ue_num
=
0
;
ulsch_ue_num
<
ulsch_ue_select
[
CC_id
].
ue_num
;
ulsch_ue_num
++
)
{
...
...
@@ -2742,51 +2745,14 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
}
rnti
=
UE_RNTI
(
CC_id
,
UE_id
);
if
(
cc
->
tdd_Config
)
{
if
(
frame_parms
->
N_RB_UL
==
25
)
{
if
(
first_rb
[
CC_id
]
>=
frame_parms
->
N_RB_UL
-
1
)
{
LOG_W
(
MAC
,
"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_id
,
rnti
,
CC_id
);
break
;
}
// calculate the average rb ( remain UE)
total_rbs
=
frame_parms
->
N_RB_UL
-
1
-
first_rb
[
CC_id
];
}
else
if
(
frame_parms
->
N_RB_UL
==
50
)
{
if
(
first_rb
[
CC_id
]
>=
frame_parms
->
N_RB_UL
-
2
)
{
LOG_W
(
MAC
,
"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_id
,
rnti
,
CC_id
);
break
;
}
// calculate the average rb ( remain UE)
total_rbs
=
frame_parms
->
N_RB_UL
-
2
-
first_rb
[
CC_id
];
}
else
{
if
(
first_rb
[
CC_id
]
>=
frame_parms
->
N_RB_UL
-
3
)
{
LOG_W
(
MAC
,
"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_id
,
rnti
,
CC_id
);
break
;
}
// calculate the average rb ( remain UE)
total_rbs
=
frame_parms
->
N_RB_UL
-
3
-
first_rb
[
CC_id
];
}
}
else
{
if
(
frame_parms
->
N_RB_UL
==
25
){
if
(
first_rb
[
CC_id
]
>=
frame_parms
->
N_RB_UL
-
1
){
LOG_W
(
MAC
,
"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_id
,
rnti
,
CC_id
);
break
;
}
// calculate the average rb ( remain UE)
total_rbs
=
frame_parms
->
N_RB_UL
-
1
-
first_rb
[
CC_id
];
}
else
{
if
(
first_rb
[
CC_id
]
>=
frame_parms
->
N_RB_UL
-
2
){
if
(
first_rb
[
CC_id
]
>=
frame_parms
->
N_RB_UL
-
num_pucch_rb
)
{
LOG_W
(
MAC
,
"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_id
,
rnti
,
CC_id
);
break
;
}
// calculate the average rb ( remain UE)
total_rbs
=
frame_parms
->
N_RB_UL
-
2
-
first_rb
[
CC_id
];
}
}
total_rbs
=
frame_parms
->
N_RB_UL
-
num_pucch_rb
-
first_rb
[
CC_id
];
average_rbs
=
(
int
)
round
((
double
)
total_rbs
/
(
double
)
ue_num_temp
);
if
(
average_rbs
<
3
)
{
ue_num_temp
--
;
...
...
@@ -2835,30 +2801,13 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
tx_power
=
estimate_ue_tx_power
(
tbs
,
rb_table
[
rb_table_index
],
0
,
frame_parms
->
Ncp
,
0
);
}
if
(
frame_parms
->
N_RB_UL
==
25
){
while
(
(
tbs
<
UE_template
->
ul_total_buffer
)
&&
(
rb_table
[
rb_table_index
]
<
(
frame_parms
->
N_RB_UL
-
1
-
first_rb
[
CC_id
]))
&&
while
(
(
tbs
<
UE_template
->
ul_total_buffer
)
&&
(
rb_table
[
rb_table_index
]
<
(
frame_parms
->
N_RB_UL
-
num_pucch_rb
-
first_rb
[
CC_id
]))
&&
((
UE_template
->
phr_info
-
tx_power
)
>
0
)
&&
(
rb_table_index
<
32
))
{
rb_table_index
++
;
tbs
=
get_TBS_UL
(
mcs
,
rb_table
[
rb_table_index
])
<<
3
;
tx_power
=
estimate_ue_tx_power
(
tbs
,
rb_table
[
rb_table_index
],
0
,
frame_parms
->
Ncp
,
0
);
}
}
else
{
if
(
cc
->
tdd_Config
&&
frame_parms
->
N_RB_UL
==
100
)
{
while
(
(
tbs
<
UE_template
->
ul_total_buffer
)
&&
(
rb_table
[
rb_table_index
]
<
(
frame_parms
->
N_RB_UL
-
3
-
first_rb
[
CC_id
]))
&&
((
UE_template
->
phr_info
-
tx_power
)
>
0
)
&&
(
rb_table_index
<
32
))
{
rb_table_index
++
;
tbs
=
get_TBS_UL
(
mcs
,
rb_table
[
rb_table_index
])
<<
3
;
tx_power
=
estimate_ue_tx_power
(
tbs
,
rb_table
[
rb_table_index
],
0
,
frame_parms
->
Ncp
,
0
);
}
}
else
{
while
(
(
tbs
<
UE_template
->
ul_total_buffer
)
&&
(
rb_table
[
rb_table_index
]
<
(
frame_parms
->
N_RB_UL
-
2
-
first_rb
[
CC_id
]))
&&
((
UE_template
->
phr_info
-
tx_power
)
>
0
)
&&
(
rb_table_index
<
32
))
{
rb_table_index
++
;
tbs
=
get_TBS_UL
(
mcs
,
rb_table
[
rb_table_index
])
<<
3
;
tx_power
=
estimate_ue_tx_power
(
tbs
,
rb_table
[
rb_table_index
],
0
,
frame_parms
->
Ncp
,
0
);
}
}
}
if
(
rb_table
[
rb_table_index
]
<
3
)
{
rb_table_index
=
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