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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
4af41d2a
Commit
4af41d2a
authored
7 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more correction of indentation
parent
2c844312
Branches unavailable
2025.w14
2025.w13
2025.w12
2025.w11
2025.w10
2025.w09
2025.w08
2025.w07
2025.w06
2025.w05
2025.w04
2025.w03
2025.w02
2024.w51
2024.w50
2024.w49
2024.w48
2024.w47
2024.w46
2024.w45
2024.w44
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
2020.w34
2020.w33
2020.w31
2020.w30
2020.w29
2020.w28
2020.w26
2020.w25
2020.w24
2020.w23
2020.w22
2020.w19
2020.w17
2020.w16
2020.w15
2020.w11
2020.w09
2020.w06
2020.w05
2020.w04
2020.w03
2019.w51
2019.w44
2019.w41
2019.w36
2019.w30
2019.w28
2019.w27
2019.w25
2019.w23
2019.w21
2019.w17
2019.w15
2019.w13
2019.w11
2019.w10
2019.w09
2019.w08
2019.w07
2019.w06
2019.w04
2019.w03
2018.w51
2018.w48
2018.w47
2018.w46
2018.w44
2018.w41
2018.w40
2018.w39
2018.w36
2018.w33
2018.w31
2018.w29
2018.w25
2018.w19
2018.w15
2018.w12
2018.w11
2018.w10
2018.w09
2018.w08
2018.w07
2018.w06
v2.2.0
v2.1.0
v2.0.0
v1.2.2
v1.2.1
v1.2.0
v1.1.1
v1.1.0
v1.0.3
v1.0.2
v1.0.1
v1.0.0
setparam
osa-etsi-ws-ue
osa-etsi-ws-try2
osa-etsi-ws-try1
osa-etsi-ws-gNB
oai_nr_sync
nr-ip-over-lte
nr-ip-over-lte-v.1.5
nr-ip-over-lte-v.1.4
nr-ip-over-lte-v.1.3
nr-ip-over-lte-v.1.2
nr-ip-over-lte-v.1.1
nr-ip-over-lte-v.1.0
flexran-eol
develop-nr-pdcch
develop-nr-2020w03
develop-nr-2020w02
develop-nr-2019w51
develop-nr-2019w50
develop-nr-2019w48
develop-nr-2019w47
develop-nr-2019w45
develop-nr-2019w43
develop-nr-2019w42
develop-nr-2019w40
develop-nr-2019w28
develop-nr-2019w23
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
ARC_1.3
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2872 additions
and
3309 deletions
+2872
-3309
openair2/LAYER2/MAC/eNB_scheduler_bch.c
openair2/LAYER2/MAC/eNB_scheduler_bch.c
+110
-225
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+1587
-1753
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+1175
-1331
No files found.
openair2/LAYER2/MAC/eNB_scheduler_bch.c
View file @
4af41d2a
...
...
@@ -235,35 +235,28 @@ schedule_SIB1_BR(module_id_t module_idP,
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
length
=
TBS
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
=
2
;
// format 1A/1B/1D
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
virtual_resource_block_assignment_flag
=
0
;
// localized
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
6
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
6
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
modulation
=
2
;
//QPSK
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
rvidx
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
=
1
;
// first block
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pa
=
4
;
// 0 dB
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ngap
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
nprb
=
get_subbandsize
(
cc
->
mib
->
message
.
dl_Bandwidth
);
// ignored
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
// Rel10 fields
...
...
@@ -280,10 +273,7 @@ schedule_SIB1_BR(module_id_t module_idP,
dl_req
->
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_BODY_TAG
;
// Program TX Request
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
->
pdu_length
=
bcch_sdu_length
;
TX_req
->
pdu_index
=
eNB
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_segments
=
1
;
...
...
@@ -315,11 +305,8 @@ schedule_SIB1_BR(module_id_t module_idP,
}
}
int
si_WindowLength_BR_r13tab
[
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare
]
=
{
20
,
40
,
60
,
80
,
120
,
160
,
200
};
int
si_TBS_r13tab
[
SchedulingInfo_BR_r13__si_TBS_r13_b936
+
1
]
=
{
152
,
208
,
256
,
328
,
408
,
504
,
600
,
712
,
808
,
936
};
int
si_WindowLength_BR_r13tab
[
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare
]
=
{
20
,
40
,
60
,
80
,
120
,
160
,
200
};
int
si_TBS_r13tab
[
SchedulingInfo_BR_r13__si_TBS_r13_b936
+
1
]
=
{
152
,
208
,
256
,
328
,
408
,
504
,
600
,
712
,
808
,
936
};
//------------------------------------------------------------------------------
void
...
...
@@ -354,65 +341,40 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
if
(
cc
->
mib
->
message
.
schedulingInfoSIB1_BR_r13
==
0
)
continue
;
else
{
AssertFatal
(
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
!=
NULL
,
AssertFatal
(
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
!=
NULL
,
"sib_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null
\n
"
);
SchedulingInfoList_BR_r13_t
*
schedulingInfoList_BR_r13
=
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
schedulingInfoList_BR_r13
;
SchedulingInfoList_BR_r13_t
*
schedulingInfoList_BR_r13
=
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
schedulingInfoList_BR_r13
;
AssertFatal
(
schedulingInfoList_BR_r13
!=
NULL
,
"sib_v13ext->schedulingInfoList_BR_r13 is null
\n
"
);
SchedulingInfoList_t
*
schedulingInfoList
=
cc
->
schedulingInfoList
;
AssertFatal
(
schedulingInfoList_BR_r13
->
list
.
count
==
schedulingInfoList
->
list
.
count
,
SchedulingInfoList_t
*
schedulingInfoList
=
cc
->
schedulingInfoList
;
AssertFatal
(
schedulingInfoList_BR_r13
->
list
.
count
==
schedulingInfoList
->
list
.
count
,
"schedulingInfolist_BR.r13->list.count %d != schedulingInfoList.list.count %d
\n
"
,
schedulingInfoList_BR_r13
->
list
.
count
,
schedulingInfoList
->
list
.
count
);
AssertFatal
(
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_WindowLength_BR_r13
<=
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200
,
AssertFatal
(
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_WindowLength_BR_r13
<=
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200
,
"si_WindowLength_BR_r13 %d > %d
\n
"
,
(
int
)
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_WindowLength_BR_r13
,
(
int
)
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_WindowLength_BR_r13
,
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200
);
// check that SI frequency-hopping is disabled
AssertFatal
(
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_HoppingConfigCommon_r13
==
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off
,
AssertFatal
(
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_HoppingConfigCommon_r13
==
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off
,
"Deactivate SI_HoppingConfigCommon_r13 in configuration file, not supported for now
\n
"
);
long
si_WindowLength_BR_r13
=
si_WindowLength_BR_r13tab
[
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_WindowLength_BR_r13
];
long
si_RepetitionPattern_r13
=
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_RepetitionPattern_r13
;
AssertFatal
(
si_RepetitionPattern_r13
<=
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF
,
long
si_WindowLength_BR_r13
=
si_WindowLength_BR_r13tab
[
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_WindowLength_BR_r13
];
long
si_RepetitionPattern_r13
=
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
si_RepetitionPattern_r13
;
AssertFatal
(
si_RepetitionPattern_r13
<=
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF
,
"si_RepetitionPattern_r13 %d > %d
\n
"
,
(
int
)
si_RepetitionPattern_r13
,
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF
);
// cycle through SIB list
for
(
i
=
0
;
i
<
schedulingInfoList_BR_r13
->
list
.
count
;
i
++
)
{
long
si_Periodicity
=
schedulingInfoList
->
list
.
array
[
i
]
->
si_Periodicity
;
long
si_Narrowband_r13
=
schedulingInfoList_BR_r13
->
list
.
array
[
i
]
->
si_Narrowband_r13
;
long
si_TBS_r13
=
si_TBS_r13tab
[
schedulingInfoList_BR_r13
->
list
.
array
[
i
]
->
si_TBS_r13
];
long
si_Periodicity
=
schedulingInfoList
->
list
.
array
[
i
]
->
si_Periodicity
;
long
si_Narrowband_r13
=
schedulingInfoList_BR_r13
->
list
.
array
[
i
]
->
si_Narrowband_r13
;
long
si_TBS_r13
=
si_TBS_r13tab
[
schedulingInfoList_BR_r13
->
list
.
array
[
i
]
->
si_TBS_r13
];
// check if the SI is to be scheduled now
int
period_in_sf
=
80
<<
si_Periodicity
;
// 2^i * 80 subframes, note: si_Periodicity is 2^i * 80ms
...
...
@@ -434,18 +396,14 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
"RRC provided bcch with length %d > %d (si_TBS_r13 %d)
\n
"
,
bcch_sdu_length
,
(
int
)
(
si_TBS_r13
>>
3
),
(
int
)
schedulingInfoList_BR_r13
->
list
.
array
[
i
]
->
si_TBS_r13
);
(
int
)
schedulingInfoList_BR_r13
->
list
.
array
[
i
]
->
si_TBS_r13
);
// allocate all 6 PRBs in narrowband for SIB1_BR
// check that SIB1 didn't take this narrowband
if
(
vrb_map
[
first_rb
]
>
0
)
continue
;
if
(
vrb_map
[
first_rb
]
>
0
)
continue
;
first_rb
=
narrowband_to_first_rb
(
cc
,
si_Narrowband_r13
-
1
);
first_rb
=
narrowband_to_first_rb
(
cc
,
si_Narrowband_r13
-
1
);
vrb_map
[
first_rb
]
=
1
;
vrb_map
[
first_rb
+
1
]
=
1
;
vrb_map
[
first_rb
+
2
]
=
1
;
...
...
@@ -465,89 +423,54 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
length
=
si_TBS_r13
>>
3
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
length
=
si_TBS_r13
>>
3
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
=
2
;
// format 1A/1B/1D
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
virtual_resource_block_assignment_flag
=
0
;
// localized
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
6
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
6
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
modulation
=
2
;
//QPSK
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
rvidx
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
rvidx
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
=
1
;
// first block
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pa
=
4
;
// 0 dB
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ngap
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
nprb
=
get_subbandsize
(
cc
->
mib
->
message
.
dl_Bandwidth
);
// ignored
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
// Rel10 fields (for PDSCH starting symbol)
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel10
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel10
.
pdsch_start
=
cc
[
CC_id
].
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
startSymbolBR_r13
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel10
.
pdsch_start
=
cc
[
CC_id
].
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
startSymbolBR_r13
;
// Rel13 fields
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
ue_type
=
1
;
// CEModeA UE
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
pdsch_payload_type
=
1
;
// SI-BR
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
initial_transmission_sf_io
=
absSF
-
sf_mod_period
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
initial_transmission_sf_io
=
absSF
-
sf_mod_period
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req
->
number_pdu
++
;
dl_req
->
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_BODY_TAG
;
// Program TX Request
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
->
pdu_length
=
bcch_sdu_length
;
TX_req
->
pdu_index
=
eNB
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_segments
=
1
;
TX_req
->
segments
[
0
].
segment_length
=
bcch_sdu_length
;
TX_req
->
segments
[
0
].
segment_data
=
cc
->
BCCH_BR_pdu
[
i
+
1
].
payload
;
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
++
;
TX_req
->
segments
[
0
].
segment_length
=
bcch_sdu_length
;
TX_req
->
segments
[
0
].
segment_data
=
cc
->
BCCH_BR_pdu
[
i
+
1
].
payload
;
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
++
;
eNB
->
TX_req
[
CC_id
].
sfn_sf
=
sfn_sf
;
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tl
.
tag
=
NFAPI_TX_REQUEST_BODY_TAG
;
eNB
->
TX_req
[
CC_id
].
header
.
message_id
=
NFAPI_TX_REQUEST
;
...
...
@@ -620,17 +543,14 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
module_idP
,
frameP
,
CC_id
,
mib_sdu_length
,
(
int
)
cc
->
mib
->
message
.
schedulingInfoSIB1_BR_r13
);
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_BCH_PDU_TYPE
,
dl_config_pdu
->
pdu_size
=
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_BCH_PDU_TYPE
,
dl_config_pdu
->
pdu_size
=
2
+
sizeof
(
nfapi_dl_config_bch_pdu
);
dl_config_pdu
->
bch_pdu
.
bch_pdu_rel8
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG
;
dl_config_pdu
->
bch_pdu
.
bch_pdu_rel8
.
length
=
mib_sdu_length
;
dl_config_pdu
->
bch_pdu
.
bch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
bch_pdu
.
bch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
bch_pdu
.
bch_pdu_rel8
.
transmission_power
=
6000
;
dl_req
->
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_BODY_TAG
;
dl_req
->
number_pdu
++
;
...
...
@@ -641,9 +561,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
LOG_D
(
MAC
,
"eNB->DL_req[0].number_pdu %d (%p)
\n
"
,
dl_req
->
number_pdu
,
&
dl_req
->
number_pdu
);
// DL request
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
->
pdu_length
=
3
;
TX_req
->
pdu_index
=
eNB
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_segments
=
1
;
...
...
@@ -753,88 +671,59 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
}
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dci_dl_pdu
));
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dci_dl_pdu
));
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
=
NFAPI_DL_DCI_FORMAT_1A
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
=
4
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
=
NFAPI_DL_DCI_FORMAT_1A
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
=
4
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti_type
=
2
;
// S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
transmission_power
=
6000
;
// equal to RS power
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
harq_process
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
tpc
=
1
;
// no TPC
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
new_data_indicator_1
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
new_data_indicator_1
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
mcs_1
=
mcs
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_1
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_1
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
4
);
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
4
);
dl_config_request
->
sfn_sf
=
sfn_sf
;
if
(
!
CCE_allocation_infeasible
(
module_idP
,
CC_id
,
0
,
subframeP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
,
SI_RNTI
))
{
if
(
!
CCE_allocation_infeasible
(
module_idP
,
CC_id
,
0
,
subframeP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
,
SI_RNTI
))
{
LOG_D
(
MAC
,
"Frame %d: Subframe %d : Adding common DCI for S_RNTI
\n
"
,
frameP
,
subframeP
);
dl_req
->
number_dci
++
;
dl_req
->
number_pdu
++
;
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
sizeof
(
nfapi_dl_config_request_p
du_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
length
=
bcch_sdu_length
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
=
2
;
// format 1A/1B/1D
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
virtual_resource_block_assignment_flag
=
0
;
// localized
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
4
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
4
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
modulation
=
2
;
//QPSK
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
=
1
;
// first block
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pa
=
4
;
// 0 dB
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ngap
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
nprb
=
get_subbandsize
(
cc
->
mib
->
message
.
dl_Bandwidth
);
// ignored
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req
->
number_pdu
++
;
...
...
@@ -851,16 +740,12 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
dl_config_request
->
sfn_sf
=
sfn_sf
;
// Program TX Request
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
->
pdu_length
=
bcch_sdu_length
;
TX_req
->
pdu_index
=
eNB
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_segments
=
1
;
TX_req
->
segments
[
0
].
segment_length
=
bcch_sdu_length
;
TX_req
->
segments
[
0
].
segment_data
=
cc
->
BCCH_pdu
.
payload
;
TX_req
->
segments
[
0
].
segment_data
=
cc
->
BCCH_pdu
.
payload
;
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
++
;
eNB
->
TX_req
[
CC_id
].
sfn_sf
=
sfn_sf
;
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tl
.
tag
=
NFAPI_TX_REQUEST_BODY_TAG
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
4af41d2a
...
...
@@ -104,10 +104,8 @@ schedule_next_dlue(module_id_t module_idP, int CC_id,
for
(
next_ue
=
UE_list
->
head
;
next_ue
>=
0
;
next_ue
=
UE_list
->
next
[
next_ue
])
{
if
(
eNB_dlsch_info
[
module_idP
][
CC_id
][
next_ue
].
status
==
S_DL_BUFFERED
)
{
eNB_dlsch_info
[
module_idP
][
CC_id
][
next_ue
].
status
=
S_DL_WAITING
;
if
(
eNB_dlsch_info
[
module_idP
][
CC_id
][
next_ue
].
status
==
S_DL_BUFFERED
)
{
eNB_dlsch_info
[
module_idP
][
CC_id
][
next_ue
].
status
=
S_DL_WAITING
;
}
}
...
...
@@ -129,8 +127,7 @@ generate_dlsch_header(unsigned char *mac_header,
//------------------------------------------------------------------------------
{
SCH_SUBHEADER_FIXED
*
mac_header_ptr
=
(
SCH_SUBHEADER_FIXED
*
)
mac_header
;
SCH_SUBHEADER_FIXED
*
mac_header_ptr
=
(
SCH_SUBHEADER_FIXED
*
)
mac_header
;
uint8_t
first_element
=
0
,
last_size
=
0
,
i
;
uint8_t
mac_header_control_elements
[
16
],
*
ce_ptr
;
...
...
@@ -244,18 +241,15 @@ generate_dlsch_header(unsigned char *mac_header,
((
SCH_SUBHEADER_SHORT
*
)
mac_header_ptr
)
->
E
=
0
;
((
SCH_SUBHEADER_SHORT
*
)
mac_header_ptr
)
->
F
=
0
;
((
SCH_SUBHEADER_SHORT
*
)
mac_header_ptr
)
->
LCID
=
sdu_lcids
[
i
];
((
SCH_SUBHEADER_SHORT
*
)
mac_header_ptr
)
->
L
=
(
unsigned
char
)
sdu_lengths
[
i
];
((
SCH_SUBHEADER_SHORT
*
)
mac_header_ptr
)
->
L
=
(
unsigned
char
)
sdu_lengths
[
i
];
last_size
=
2
;
}
else
{
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
R
=
0
;
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
E
=
0
;
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
F
=
1
;
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
LCID
=
sdu_lcids
[
i
];
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
L_MSB
=
((
unsigned
short
)
sdu_lengths
[
i
]
>>
8
)
&
0x7f
;
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
L_LSB
=
(
unsigned
short
)
sdu_lengths
[
i
]
&
0xff
;
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
L_MSB
=
((
unsigned
short
)
sdu_lengths
[
i
]
>>
8
)
&
0x7f
;
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
L_LSB
=
(
unsigned
short
)
sdu_lengths
[
i
]
&
0xff
;
((
SCH_SUBHEADER_LONG
*
)
mac_header_ptr
)
->
padding
=
0x00
;
last_size
=
3
;
#ifdef DEBUG_HEADER_PARSING
...
...
@@ -527,18 +521,15 @@ schedule_ue_spec(module_id_t module_idP,
// store the global enb stats:
eNB
->
eNB_stats
[
CC_id
].
num_dlactive_UEs
=
UE_list
->
num_UEs
;
eNB
->
eNB_stats
[
CC_id
].
available_prbs
=
total_nb_available_rb
[
CC_id
];
eNB
->
eNB_stats
[
CC_id
].
total_available_prbs
+=
total_nb_available_rb
[
CC_id
];
eNB
->
eNB_stats
[
CC_id
].
available_prbs
=
total_nb_available_rb
[
CC_id
];
eNB
->
eNB_stats
[
CC_id
].
total_available_prbs
+=
total_nb_available_rb
[
CC_id
];
eNB
->
eNB_stats
[
CC_id
].
dlsch_bytes_tx
=
0
;
eNB
->
eNB_stats
[
CC_id
].
dlsch_pdus_tx
=
0
;
}
/// CALLING Pre_Processor for downlink scheduling (Returns estimation of RBs required by each UE and the allocation on sub-band)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR
,
VCD_FUNCTION_IN
);
start_meas
(
&
eNB
->
schedule_dlsch_preprocessor
);
dlsch_scheduler_pre_processor
(
module_idP
,
frameP
,
subframeP
,
N_RBG
,
mbsfn_flag
);
...
...
@@ -631,23 +622,18 @@ schedule_ue_spec(module_id_t module_idP,
nb_available_rb
=
ue_sched_ctl
->
pre_nb_available_rbs
[
CC_id
];
if
(
cc
->
tdd_Config
)
harq_pid
=
((
frameP
*
10
)
+
subframeP
)
%
10
;
else
harq_pid
=
((
frameP
*
10
)
+
subframeP
)
&
7
;
if
(
cc
->
tdd_Config
)
harq_pid
=
((
frameP
*
10
)
+
subframeP
)
%
10
;
else
harq_pid
=
((
frameP
*
10
)
+
subframeP
)
&
7
;
round
=
ue_sched_ctl
->
round
[
CC_id
][
harq_pid
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
crnti
=
rnti
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rrc_status
=
mac_eNB_get_rrc_status
(
module_idP
,
rnti
);
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rrc_status
=
mac_eNB_get_rrc_status
(
module_idP
,
rnti
);
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
harq_pid
=
harq_pid
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
harq_round
=
round
;
if
(
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rrc_status
<
RRC_CONNECTED
)
continue
;
if
(
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rrc_status
<
RRC_CONNECTED
)
continue
;
sdu_length_total
=
0
;
num_sdus
=
0
;
...
...
@@ -670,9 +656,7 @@ schedule_ue_spec(module_id_t module_idP,
// initializing the rb allocation indicator for each UE
for
(
j
=
0
;
j
<
N_RBG
[
CC_id
];
j
++
)
{
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
0
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
0
;
}
LOG_D
(
MAC
,
...
...
@@ -690,9 +674,7 @@ schedule_ue_spec(module_id_t module_idP,
// get freq_allocation
nb_rb
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
nb_rb
[
harq_pid
];
TBS
=
get_TBS_DL
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
],
TBS
=
get_TBS_DL
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
],
nb_rb
);
if
(
nb_rb
<=
nb_available_rb
)
{
...
...
@@ -709,36 +691,24 @@ schedule_ue_spec(module_id_t module_idP,
if
(
nb_rb
==
ue_sched_ctl
->
pre_nb_available_rbs
[
CC_id
])
{
for
(
j
=
0
;
j
<
N_RBG
[
CC_id
];
j
++
)
{
// for indicating the rballoc for each sub-band
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
];
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
];
}
}
else
{
nb_rb_temp
=
nb_rb
;
j
=
0
;
while
((
nb_rb_temp
>
0
)
&&
(
j
<
N_RBG
[
CC_id
]))
{
if
(
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
]
==
1
)
{
if
(
UE_list
->
UE_template
[
CC_id
]
[
UE_id
].
rballoc_subband
[
harq_pid
][
j
])
printf
(
"WARN: rballoc_subband not free for retrans?
\n
"
);
UE_list
->
UE_template
[
CC_id
]
[
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
];
if
(
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
]
==
1
)
{
if
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
])
printf
(
"WARN: rballoc_subband not free for retrans?
\n
"
);
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
];
if
((
j
==
N_RBG
[
CC_id
]
-
1
)
&&
((
N_RB_DL
[
CC_id
]
==
25
)
||
(
N_RB_DL
[
CC_id
]
==
50
)))
{
nb_rb_temp
=
nb_rb_temp
-
min_rb_unit
[
CC_id
]
+
1
;
nb_rb_temp
=
nb_rb_temp
-
min_rb_unit
[
CC_id
]
+
1
;
}
else
{
nb_rb_temp
=
nb_rb_temp
-
min_rb_unit
[
CC_id
];
nb_rb_temp
=
nb_rb_temp
-
min_rb_unit
[
CC_id
];
}
}
...
...
@@ -763,70 +733,42 @@ schedule_ue_spec(module_id_t module_idP,
default:
LOG_D
(
MAC
,
"retransmission DL_REQ: rnti:%x
\n
"
,
rnti
);
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dci_dl_pdu
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dci_dl_pdu
));
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
=
NFAPI_DL_DCI_FORMAT_1
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
=
get_aggregation
(
get_bw_index
(
module_idP
,
CC_id
),
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
=
NFAPI_DL_DCI_FORMAT_1
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
=
get_aggregation
(
get_bw_index
(
module_idP
,
CC_id
),
ue_sched_ctl
->
dl_cqi
[
CC_id
],
format1
);
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti
=
rnti
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti
=
rnti
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti_type
=
1
;
// CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
transmission_power
=
6000
;
// equal to RS power
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
harq_process
=
harq_pid
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
harq_process
=
harq_pid
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
tpc
=
1
;
// dont adjust power when retransmitting
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
new_data_indicator_1
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
];
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
mcs_1
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
];
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_1
=
round
&
3
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
new_data_indicator_1
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
];
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
mcs_1
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
];
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_1
=
round
&
3
;
if
(
cc
[
CC_id
].
tdd_Config
!=
NULL
)
{
//TDD
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
downlink_assignment_index
=
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
DAI
-
1
)
&
3
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
downlink_assignment_index
=
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
DAI
-
1
)
&
3
;
LOG_D
(
MAC
,
"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, dai %d, mcs %d
\n
"
,
module_idP
,
CC_id
,
harq_pid
,
round
,
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
DAI
-
1
),
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
]);
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
DAI
-
1
),
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
]);
}
else
{
LOG_D
(
MAC
,
"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, mcs %d
\n
"
,
module_idP
,
CC_id
,
harq_pid
,
round
,
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
]);
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
]);
}
if
(
!
CCE_allocation_infeasible
(
module_idP
,
CC_id
,
1
,
subframeP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
,
rnti
))
{
if
(
!
CCE_allocation_infeasible
(
module_idP
,
CC_id
,
1
,
subframeP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
,
rnti
))
{
dl_req
->
number_dci
++
;
dl_req
->
number_pdu
++
;
dl_req
->
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_BODY_TAG
;
...
...
@@ -878,16 +820,11 @@ schedule_ue_spec(module_id_t module_idP,
S_DL_SCHEDULED
);
//eNB_UE_stats->dlsch_trials[round]++;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_retransmission
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rbs_used_retx
=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used_retx
+=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs1
=
eNB_UE_stats
->
dlsch_mcs1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs2
=
eNB_UE_stats
->
dlsch_mcs1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_retransmission
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rbs_used_retx
=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used_retx
+=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs1
=
eNB_UE_stats
->
dlsch_mcs1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs2
=
eNB_UE_stats
->
dlsch_mcs1
;
}
else
{
LOG_D
(
MAC
,
"[eNB %d] Frame %d CC_id %d : don't schedule UE %d, its retransmission takes more resources than we have
\n
"
,
...
...
@@ -906,8 +843,7 @@ schedule_ue_spec(module_id_t module_idP,
if
(
ue_sched_ctl
->
ta_timer
==
0
)
{
ta_update
=
ue_sched_ctl
->
ta_update
;
/* if we send TA then set timer to not send it for a while */
if
(
ta_update
!=
31
)
ue_sched_ctl
->
ta_timer
=
20
;
if
(
ta_update
!=
31
)
ue_sched_ctl
->
ta_timer
=
20
;
/* reset ta_update */
ue_sched_ctl
->
ta_update
=
31
;
}
else
{
...
...
@@ -943,11 +879,8 @@ schedule_ue_spec(module_id_t module_idP,
module_idP
,
CC_id
,
sdu_lengths
[
0
]);
sdu_length_total
=
sdu_lengths
[
0
];
sdu_lcids
[
0
]
=
DCCH
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
DCCH
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
DCCH
]
+=
sdu_lengths
[
0
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
DCCH
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
DCCH
]
+=
sdu_lengths
[
0
];
num_sdus
=
1
;
#ifdef DEBUG_eNB_SCHEDULER
LOG_T
(
MAC
,
...
...
@@ -991,9 +924,7 @@ schedule_ue_spec(module_id_t module_idP,
header_len_dcch
+=
2
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
DCCH1
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
DCCH1
]
+=
sdu_lengths
[
num_sdus
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
DCCH1
]
+=
sdu_lengths
[
num_sdus
];
num_sdus
++
;
#ifdef DEBUG_eNB_SCHEDULER
LOG_T
(
MAC
,
...
...
@@ -1132,31 +1063,22 @@ schedule_ue_spec(module_id_t module_idP,
if
(
nb_rb
==
ue_sched_ctl
->
pre_nb_available_rbs
[
CC_id
])
{
for
(
j
=
0
;
j
<
N_RBG
[
CC_id
];
j
++
)
{
// for indicating the rballoc for each sub-band
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
];
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
];
}
}
else
{
nb_rb_temp
=
nb_rb
;
j
=
0
;
while
((
nb_rb_temp
>
0
)
&&
(
j
<
N_RBG
[
CC_id
]))
{
if
(
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
]
==
1
)
{
UE_list
->
UE_template
[
CC_id
]
[
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
];
if
(
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
]
==
1
)
{
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
j
]
=
ue_sched_ctl
->
rballoc_sub_UE
[
CC_id
][
j
];
if
((
j
==
N_RBG
[
CC_id
]
-
1
)
&&
((
N_RB_DL
[
CC_id
]
==
25
)
||
(
N_RB_DL
[
CC_id
]
==
50
)))
{
nb_rb_temp
=
nb_rb_temp
-
min_rb_unit
[
CC_id
]
+
1
;
nb_rb_temp
=
nb_rb_temp
-
min_rb_unit
[
CC_id
]
+
1
;
}
else
{
nb_rb_temp
=
nb_rb_temp
-
min_rb_unit
[
CC_id
];
nb_rb_temp
=
nb_rb_temp
-
min_rb_unit
[
CC_id
];
}
}
...
...
@@ -1165,17 +1087,13 @@ schedule_ue_spec(module_id_t module_idP,
}
// decrease mcs until TBS falls below required length
while
((
TBS
>
(
sdu_length_total
+
header_len_dcch
+
header_len_dtch
+
ta_len
))
&&
(
mcs
>
0
))
{
while
((
TBS
>
(
sdu_length_total
+
header_len_dcch
+
header_len_dtch
+
ta_len
))
&&
(
mcs
>
0
))
{
mcs
--
;
TBS
=
get_TBS_DL
(
mcs
,
nb_rb
);
}
// if we have decreased too much or we don't have enough RBs, increase MCS
while
((
TBS
<
(
sdu_length_total
+
header_len_dcch
+
header_len_dtch
+
ta_len
))
while
((
TBS
<
(
sdu_length_total
+
header_len_dcch
+
header_len_dtch
+
ta_len
))
&&
(((
ue_sched_ctl
->
dl_pow_off
[
CC_id
]
>
0
)
&&
(
mcs
<
28
))
||
((
ue_sched_ctl
->
dl_pow_off
[
CC_id
]
==
0
)
...
...
@@ -1196,11 +1114,8 @@ schedule_ue_spec(module_id_t module_idP,
// TBS, sdu_length_total, offset, TBS-sdu_length_total-offset);
#endif
if
((
TBS
-
header_len_dcch
-
header_len_dtch
-
sdu_length_total
-
ta_len
)
<=
2
)
{
padding
=
(
TBS
-
header_len_dcch
-
header_len_dtch
-
sdu_length_total
-
ta_len
);
if
((
TBS
-
header_len_dcch
-
header_len_dtch
-
sdu_length_total
-
ta_len
)
<=
2
)
{
padding
=
(
TBS
-
header_len_dcch
-
header_len_dtch
-
sdu_length_total
-
ta_len
);
post_padding
=
0
;
}
else
{
padding
=
0
;
...
...
@@ -1245,16 +1160,13 @@ schedule_ue_spec(module_id_t module_idP,
#endif
// cycle through SDUs and place in dlsch_buffer
memcpy
(
&
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
][
offset
],
memcpy
(
&
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
][
offset
],
dlsch_buffer
,
sdu_length_total
);
// memcpy(RC.mac[0].DLSCH_pdu[0][0].payload[0][offset],dcch_buffer,sdu_lengths[0]);
// fill remainder of DLSCH with random data
for
(
j
=
0
;
j
<
(
TBS
-
sdu_length_total
-
offset
);
j
++
)
{
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
][
offset
+
sdu_length_total
+
j
]
=
(
char
)
(
taus
()
&
0xff
);
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
][
offset
+
sdu_length_total
+
j
]
=
(
char
)
(
taus
()
&
0xff
);
}
...
...
@@ -1276,33 +1188,25 @@ schedule_ue_spec(module_id_t module_idP,
T_BUFFER
(
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
],
TBS
));
UE_list
->
UE_template
[
CC_id
][
UE_id
].
nb_rb
[
harq_pid
]
=
nb_rb
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
nb_rb
[
harq_pid
]
=
nb_rb
;
add_ue_dlsch_info
(
module_idP
,
CC_id
,
UE_id
,
subframeP
,
S_DL_SCHEDULED
);
// store stats
eNB
->
eNB_stats
[
CC_id
].
dlsch_bytes_tx
+=
sdu_length_total
;
eNB
->
eNB_stats
[
CC_id
].
dlsch_bytes_tx
+=
sdu_length_total
;
eNB
->
eNB_stats
[
CC_id
].
dlsch_pdus_tx
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rbs_used
=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used
+=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs1
=
eNB_UE_stats
->
dlsch_mcs1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used
+=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs1
=
eNB_UE_stats
->
dlsch_mcs1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs2
=
mcs
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
TBS
=
TBS
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
overhead_bytes
=
TBS
-
sdu_length_total
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_sdu_bytes
+=
sdu_length_total
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_pdu_bytes
+=
TBS
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_num_pdus
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
overhead_bytes
=
TBS
-
sdu_length_total
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_sdu_bytes
+=
sdu_length_total
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_pdu_bytes
+=
TBS
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_num_pdus
+=
1
;
if
(
cc
[
CC_id
].
tdd_Config
!=
NULL
)
{
// TDD
UE_list
->
UE_template
[
CC_id
][
UE_id
].
DAI
++
;
...
...
@@ -1320,29 +1224,19 @@ schedule_ue_spec(module_id_t module_idP,
// this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
int32_t
framex10psubframe
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_frame
*
10
+
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_subframe
;
int32_t
framex10psubframe
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_frame
*
10
+
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_subframe
;
if
(((
framex10psubframe
+
10
)
<=
(
frameP
*
10
+
subframeP
))
||
//normal case
((
framex10psubframe
>
(
frameP
*
10
+
subframeP
))
&&
(((
10240
-
framex10psubframe
+
frameP
*
10
+
subframeP
)
>=
10
))))
//frame wrap-around
if
(
ue_sched_ctl
->
pucch1_cqi_update
[
CC_id
]
==
1
)
{
ue_sched_ctl
->
pucch1_cqi_update
[
CC_id
]
=
0
;
UE_list
->
UE_template
[
CC_id
]
[
UE_id
].
pucch_tpc_tx_frame
=
frameP
;
UE_list
->
UE_template
[
CC_id
]
[
UE_id
].
pucch_tpc_tx_subframe
=
subframeP
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_frame
=
frameP
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_subframe
=
subframeP
;
if
(
normalized_rx_power
>
(
target_rx_power
+
4
))
{
if
(
normalized_rx_power
>
(
target_rx_power
+
4
))
{
tpc
=
0
;
//-1
tpc_accumulated
--
;
}
else
if
(
normalized_rx_power
<
(
target_rx_power
-
4
))
{
}
else
if
(
normalized_rx_power
<
(
target_rx_power
-
4
))
{
tpc
=
2
;
//+1
tpc_accumulated
++
;
}
else
{
...
...
@@ -1363,19 +1257,13 @@ schedule_ue_spec(module_id_t module_idP,
tpc
=
1
;
//0
}
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dci_dl_pdu
));
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
=
NFAPI_DL_DCI_FORMAT_1
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
=
get_aggregation
(
get_bw_index
(
module_idP
,
CC_id
),
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)
(
2
+
sizeof
(
nfapi_dl_config_dci_dl_pdu
));
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
=
NFAPI_DL_DCI_FORMAT_1
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
=
get_aggregation
(
get_bw_index
(
module_idP
,
CC_id
),
ue_sched_ctl
->
dl_cqi
[
CC_id
],
format1
);
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG
;
...
...
@@ -1383,26 +1271,16 @@ schedule_ue_spec(module_id_t module_idP,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti_type
=
1
;
// CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
transmission_power
=
6000
;
// equal to RS power
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
harq_process
=
harq_pid
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
harq_process
=
harq_pid
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
tpc
=
tpc
;
// dont adjust power when retransmitting
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
new_data_indicator_1
=
1
-
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
];
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
new_data_indicator_1
=
1
-
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
];
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
mcs_1
=
mcs
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_1
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_1
=
0
;
//deactivate second codeword
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
mcs_2
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_2
=
1
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_2
=
1
;
if
(
cc
[
CC_id
].
tdd_Config
!=
NULL
)
{
//TDD
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
downlink_assignment_index
=
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
DAI
-
1
)
&
3
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
downlink_assignment_index
=
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
DAI
-
1
)
&
3
;
LOG_D
(
MAC
,
"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d
\n
"
,
module_idP
,
CC_id
,
harq_pid
,
...
...
@@ -1416,8 +1294,7 @@ schedule_ue_spec(module_id_t module_idP,
}
LOG_D
(
MAC
,
"Checking feasibility pdu %d (new sdu)
\n
"
,
dl_req
->
number_pdu
);
if
(
!
CCE_allocation_infeasible
(
module_idP
,
CC_id
,
1
,
subframeP
,
if
(
!
CCE_allocation_infeasible
(
module_idP
,
CC_id
,
1
,
subframeP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
,
rnti
))
{
...
...
@@ -1438,23 +1315,13 @@ schedule_ue_spec(module_id_t module_idP,
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
]);
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
]
=
1
-
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
];
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
]
=
mcs
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs2
[
harq_pid
]
=
0
;
AssertFatal
(
UE_list
->
UE_template
[
CC_id
]
[
UE_id
].
physicalConfigDedicated
!=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
]
=
1
-
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldNDI
[
harq_pid
];
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs1
[
harq_pid
]
=
mcs
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
oldmcs2
[
harq_pid
]
=
0
;
AssertFatal
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
physicalConfigDedicated
!=
NULL
,
"physicalConfigDedicated is NULL
\n
"
);
AssertFatal
(
UE_list
->
UE_template
[
CC_id
]
[
UE_id
].
physicalConfigDedicated
->
pdsch_ConfigDedicated
!=
NULL
,
AssertFatal
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
physicalConfigDedicated
->
pdsch_ConfigDedicated
!=
NULL
,
"physicalConfigDedicated->pdsch_ConfigDedicated is NULL
\n
"
);
fill_nfapi_dlsch_config
(
eNB
,
dl_req
,
TBS
,
eNB
->
pdu_index
[
CC_id
],
rnti
,
0
,
// type 0 allocation from 7.1.6 in 36.213
...
...
@@ -1475,8 +1342,7 @@ schedule_ue_spec(module_id_t module_idP,
0
,
//number of PRBs treated as one subband, not used here
0
// number of beamforming vectors, not used here
);
eNB
->
TX_req
[
CC_id
].
sfn_sf
=
fill_nfapi_tx_req
(
&
eNB
->
eNB
->
TX_req
[
CC_id
].
sfn_sf
=
fill_nfapi_tx_req
(
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
,
(
frameP
*
10
)
+
subframeP
,
...
...
@@ -1519,8 +1385,7 @@ schedule_ue_spec(module_id_t module_idP,
fill_DLSCH_dci
(
module_idP
,
frameP
,
subframeP
,
mbsfn_flag
);
stop_meas
(
&
eNB
->
schedule_dlsch
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH
,
VCD_FUNCTION_OUT
);
}
...
...
@@ -1569,63 +1434,37 @@ fill_DLSCH_dci(module_id_t module_idP,
LOG_T
(
MAC
,
"CC_id %d, UE_id: %d => status %d
\n
"
,
CC_id
,
UE_id
,
eNB_dlsch_info
[
module_idP
][
CC_id
][
UE_id
].
status
);
if
(
eNB_dlsch_info
[
module_idP
][
CC_id
][
UE_id
].
status
==
S_DL_SCHEDULED
)
{
if
(
eNB_dlsch_info
[
module_idP
][
CC_id
][
UE_id
].
status
==
S_DL_SCHEDULED
)
{
// clear scheduling flag
eNB_dlsch_info
[
module_idP
][
CC_id
][
UE_id
].
status
=
S_DL_WAITING
;
eNB_dlsch_info
[
module_idP
][
CC_id
][
UE_id
].
status
=
S_DL_WAITING
;
rnti
=
UE_RNTI
(
module_idP
,
UE_id
);
if
(
cc
->
tdd_Config
)
harq_pid
=
((
frameP
*
10
)
+
subframeP
)
%
10
;
else
harq_pid
=
((
frameP
*
10
)
+
subframeP
)
&
7
;
if
(
cc
->
tdd_Config
)
harq_pid
=
((
frameP
*
10
)
+
subframeP
)
%
10
;
else
harq_pid
=
((
frameP
*
10
)
+
subframeP
)
&
7
;
nb_rb
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
nb_rb
[
harq_pid
];
/// Synchronizing rballoc with rballoc_sub
for
(
i
=
0
;
i
<
N_RBG
;
i
++
)
{
rballoc_sub
[
i
]
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
]
[
i
];
rballoc_sub
[
i
]
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rballoc_subband
[
harq_pid
][
i
];
}
nfapi_dl_config_request_t
*
DL_req
=
&
RC
.
mac
[
module_idP
]
->
DL_req
[
0
];
nfapi_dl_config_request_t
*
DL_req
=
&
RC
.
mac
[
module_idP
]
->
DL_req
[
0
];
nfapi_dl_config_request_pdu_t
*
dl_config_pdu
;
for
(
i
=
0
;
i
<
DL_req
[
CC_id
].
dl_config_request_body
.
number_pdu
;
i
++
)
{
dl_config_pdu
=
&
DL_req
[
CC_id
].
dl_config_request_body
.
dl_config_pdu_list
[
i
];
if
((
dl_config_pdu
->
pdu_type
==
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
)
&&
(
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti
==
rnti
)
&&
(
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
!=
1
))
{
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
resource_block_coding
=
allocate_prbs_sub
(
nb_rb
,
N_RB_DL
,
N_RBG
,
rballoc_sub
);
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
resource_allocation_type
=
0
;
dl_config_pdu
=
&
DL_req
[
CC_id
].
dl_config_request_body
.
dl_config_pdu_list
[
i
];
if
((
dl_config_pdu
->
pdu_type
==
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
)
&&
(
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti
==
rnti
)
&&
(
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
!=
1
))
{
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
resource_block_coding
=
allocate_prbs_sub
(
nb_rb
,
N_RB_DL
,
N_RBG
,
rballoc_sub
);
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
resource_allocation_type
=
0
;
}
else
if
((
dl_config_pdu
->
pdu_type
==
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
)
&&
(
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
==
rnti
)
&&
(
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
==
0
))
{
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
allocate_prbs_sub
(
nb_rb
,
N_RB_DL
,
N_RBG
,
rballoc_sub
);
if
((
dl_config_pdu
->
pdu_type
==
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
)
&&
(
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
==
rnti
)
&&
(
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
==
0
))
{
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
allocate_prbs_sub
(
nb_rb
,
N_RB_DL
,
N_RBG
,
rballoc_sub
);
}
}
}
...
...
@@ -1634,8 +1473,7 @@ fill_DLSCH_dci(module_id_t module_idP,
}
stop_meas
(
&
eNB
->
fill_DLSCH_dci
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI
,
VCD_FUNCTION_OUT
);
}
//------------------------------------------------------------------------------
...
...
@@ -1652,8 +1490,7 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP,
LOG_D
(
MAC
,
"[eNB %d] CC_id %d Frame %d Get DLSCH sdu for BCCH
\n
"
,
module_idP
,
CC_id
,
frameP
);
return
((
unsigned
char
*
)
&
eNB
->
common_channels
[
CC_id
].
BCCH_pdu
.
payload
[
0
]);
return
((
unsigned
char
*
)
&
eNB
->
common_channels
[
CC_id
].
BCCH_pdu
.
payload
[
0
]);
}
if
(
rntiP
==
P_RNTI
)
{
...
...
@@ -1668,8 +1505,7 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP,
LOG_D
(
MAC
,
"[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d
\n
"
,
module_idP
,
frameP
,
CC_id
,
rntiP
,
UE_id
);
return
((
unsigned
char
*
)
&
eNB
->
UE_list
.
DLSCH_pdu
[
CC_id
][
TBindex
][
UE_id
].
payload
[
0
]);
return
((
unsigned
char
*
)
&
eNB
->
UE_list
.
DLSCH_pdu
[
CC_id
][
TBindex
][
UE_id
].
payload
[
0
]);
}
else
{
LOG_E
(
MAC
,
"[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist
\n
"
,
...
...
@@ -1697,14 +1533,12 @@ update_ul_dci(module_id_t module_idP,
if
(
cc
->
tdd_Config
!=
NULL
)
{
// TDD
for
(
i
=
0
;
i
<
HI_DCI0_req
->
hi_dci0_request_body
.
number_of_dci
+
HI_DCI0_req
->
hi_dci0_request_body
.
number_of_dci
;
i
++
)
{
i
<
HI_DCI0_req
->
hi_dci0_request_body
.
number_of_dci
+
HI_DCI0_req
->
hi_dci0_request_body
.
number_of_dci
;
i
++
)
{
if
((
hi_dci0_pdu
[
i
].
pdu_type
==
NFAPI_HI_DCI0_DCI_PDU_TYPE
)
&&
(
hi_dci0_pdu
[
i
].
dci_pdu
.
dci_pdu_rel8
.
rnti
==
rntiP
))
hi_dci0_pdu
[
i
].
dci_pdu
.
dci_pdu_rel8
.
dl_assignment_index
=
(
daiP
-
1
)
&
3
;
hi_dci0_pdu
[
i
].
dci_pdu
.
dci_pdu_rel8
.
dl_assignment_index
=
(
daiP
-
1
)
&
3
;
}
}
...
...
@@ -1811,7 +1645,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
uint8_t
n_vrb_dl
=
0
;
uint8_t
Lcrbs
=
0
;
uint16_t
rb_bit
=
168
;
/* RB bit number value is unsure */
#endif
#endif
start_meas
(
&
eNB
->
schedule_pch
);
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
4af41d2a
...
...
@@ -74,7 +74,7 @@ extern uint8_t nfapi_mode;
uint8_t
rb_table
[
34
]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
12
,
15
,
16
,
18
,
20
,
24
,
25
,
27
,
30
,
32
,
36
,
40
,
45
,
48
,
50
,
54
,
60
,
64
,
72
,
75
,
80
,
81
,
90
,
96
,
100
};
};
void
rx_sdu
(
const
module_id_t
enb_mod_idP
,
...
...
@@ -132,20 +132,16 @@ rx_sdu(const module_id_t enb_mod_idP,
if
(
sduP
!=
NULL
)
{
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_inactivity_timer
=
0
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_failure_timer
=
0
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_scheduled
&=
(
~
(
1
<<
harq_pid
));
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_scheduled
&=
(
~
(
1
<<
harq_pid
));
/* Update with smoothing: 3/4 of old value and 1/4 of new.
* This is the logic that was done in the function
* lte_est_timing_advance_pusch, maybe it's not necessary?
* maybe it's even not correct at all?
*/
UE_list
->
UE_sched_ctrl
[
UE_id
].
ta_update
=
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ta_update
*
3
+
timing_advance
)
/
4
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
ta_update
=
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ta_update
*
3
+
timing_advance
)
/
4
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
pusch_snr
[
CC_idP
]
=
ul_cqi
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_consecutive_errors
=
0
;
first_rb
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
first_rb_ul
[
harq_pid
];
first_rb
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
first_rb_ul
[
harq_pid
];
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_out_of_sync
>
0
)
{
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_out_of_sync
=
0
;
...
...
@@ -161,14 +157,10 @@ rx_sdu(const module_id_t enb_mod_idP,
ul_cqi
);
// AssertFatal(1==0,"ulsch in error\n");
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
round_UL
[
CC_idP
][
harq_pid
]
==
3
)
{
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_scheduled
&=
(
~
(
1
<<
harq_pid
));
UE_list
->
UE_sched_ctrl
[
UE_id
].
round_UL
[
CC_idP
][
harq_pid
]
=
0
;
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_consecutive_errors
++
==
10
)
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
round_UL
[
CC_idP
][
harq_pid
]
==
3
)
{
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_scheduled
&=
(
~
(
1
<<
harq_pid
));
UE_list
->
UE_sched_ctrl
[
UE_id
].
round_UL
[
CC_idP
][
harq_pid
]
=
0
;
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_consecutive_errors
++
==
10
)
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_failure_timer
=
1
;
}
else
UE_list
->
UE_sched_ctrl
[
UE_id
].
round_UL
[
CC_idP
][
harq_pid
]
++
;
...
...
@@ -199,22 +191,17 @@ rx_sdu(const module_id_t enb_mod_idP,
(
int
)
mac
->
common_channels
[
CC_idP
].
radioResourceConfigCommon
->
rach_ConfigCommon
.
maxHARQ_Msg3Tx
);
if
(
ra
[
RA_id
].
msg3_round
==
mac
->
common_channels
[
CC_idP
].
radioResourceConfigCommon
->
rach_ConfigCommon
.
maxHARQ_Msg3Tx
-
1
)
{
if
(
ra
[
RA_id
].
msg3_round
==
mac
->
common_channels
[
CC_idP
].
radioResourceConfigCommon
->
rach_ConfigCommon
.
maxHARQ_Msg3Tx
-
1
)
{
cancel_ra_proc
(
enb_mod_idP
,
CC_idP
,
frameP
,
current_rnti
);
}
else
{
first_rb
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
first_rb_ul
[
harq_pid
];
first_rb
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
first_rb_ul
[
harq_pid
];
ra
[
RA_id
].
msg3_round
++
;
// prepare handling of retransmission
ra
[
RA_id
].
Msg3_frame
=
(
ra
[
RA_id
].
Msg3_frame
+
((
ra
[
RA_id
].
Msg3_subframe
>
1
)
?
1
:
0
))
%
1024
;
ra
[
RA_id
].
Msg3_subframe
=
(
ra
[
RA_id
].
Msg3_subframe
+
8
)
%
10
;
add_msg3
(
enb_mod_idP
,
CC_idP
,
&
ra
[
RA_id
],
frameP
,
subframeP
);
add_msg3
(
enb_mod_idP
,
CC_idP
,
&
ra
[
RA_id
],
frameP
,
subframeP
);
}
return
;
}
...
...
@@ -224,9 +211,7 @@ rx_sdu(const module_id_t enb_mod_idP,
current_rnti
);
return
;
}
payload_ptr
=
parse_ulsch_header
(
sduP
,
&
num_ce
,
&
num_sdu
,
rx_ces
,
rx_lcids
,
rx_lengths
,
sdu_lenP
);
payload_ptr
=
parse_ulsch_header
(
sduP
,
&
num_ce
,
&
num_sdu
,
rx_ces
,
rx_lcids
,
rx_lengths
,
sdu_lenP
);
T
(
T_ENB_MAC_UE_UL_PDU
,
T_INT
(
enb_mod_idP
),
T_INT
(
CC_idP
),
T_INT
(
current_rnti
),
T_INT
(
frameP
),
T_INT
(
subframeP
),
...
...
@@ -322,38 +307,23 @@ rx_sdu(const module_id_t enb_mod_idP,
payload_ptr
[
0
]
&
0x3f
);
if
(
UE_id
!=
-
1
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
lcgid
]
=
(
payload_ptr
[
0
]
&
0x3f
);
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
lcgid
]
=
(
payload_ptr
[
0
]
&
0x3f
);
// update buffer info
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
lcgid
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
lcgid
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
lcgid
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
lcgid
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
lcgid
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
lcgid
];
RC
.
eNB
[
enb_mod_idP
][
CC_idP
]
->
pusch_stats_bsr
[
UE_id
][(
frameP
*
10
)
+
subframeP
]
=
(
payload_ptr
[
0
]
&
0x3f
);
RC
.
eNB
[
enb_mod_idP
][
CC_idP
]
->
pusch_stats_bsr
[
UE_id
][(
frameP
*
10
)
+
subframeP
]
=
(
payload_ptr
[
0
]
&
0x3f
);
if
(
UE_id
==
UE_list
->
head
)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR
,
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR
,
RC
.
eNB
[
enb_mod_idP
][
CC_idP
]
->
pusch_stats_bsr
[
UE_id
][(
frameP
*
10
)
+
subframeP
]);
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
lcgid
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
ul_buffer_creation_time
[
lcgid
]
=
frameP
;
}
if
(
mac_eNB_get_rrc_status
(
enb_mod_idP
,
UE_RNTI
(
enb_mod_idP
,
UE_id
))
<
RRC_CONNECTED
)
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
lcgid
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
lcgid
]
=
frameP
;
}
if
(
mac_eNB_get_rrc_status
(
enb_mod_idP
,
UE_RNTI
(
enb_mod_idP
,
UE_id
))
<
RRC_CONNECTED
)
LOG_D
(
MAC
,
"[eNB %d] CC_id %d MAC CE_LCID %d : ul_total_buffer = %d (lcg increment %d)
\n
"
,
enb_mod_idP
,
CC_idP
,
rx_ces
[
i
],
...
...
@@ -370,90 +340,44 @@ rx_sdu(const module_id_t enb_mod_idP,
case
LONG_BSR
:
if
(
UE_id
!=
-
1
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID0
]
=
((
payload_ptr
[
0
]
&
0xFC
)
>>
2
);
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID1
]
=
((
payload_ptr
[
0
]
&
0x03
)
<<
4
)
|
((
payload_ptr
[
1
]
&
0xF0
)
>>
4
);
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID2
]
=
((
payload_ptr
[
1
]
&
0x0F
)
<<
2
)
|
((
payload_ptr
[
2
]
&
0xC0
)
>>
6
);
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]
=
(
payload_ptr
[
2
]
&
0x3F
);
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID0
]
=
((
payload_ptr
[
0
]
&
0xFC
)
>>
2
);
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID1
]
=
((
payload_ptr
[
0
]
&
0x03
)
<<
4
)
|
((
payload_ptr
[
1
]
&
0xF0
)
>>
4
);
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID2
]
=
((
payload_ptr
[
1
]
&
0x0F
)
<<
2
)
|
((
payload_ptr
[
2
]
&
0xC0
)
>>
6
);
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]
=
(
payload_ptr
[
2
]
&
0x3F
);
// update buffer info
old_buffer_info
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID0
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID0
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID0
]];
old_buffer_info
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID0
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID0
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID0
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
+=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID0
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
>=
old_buffer_info
)
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
-=
old_buffer_info
;
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
+=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID0
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
>=
old_buffer_info
)
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
-=
old_buffer_info
;
else
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
0
;
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
0
;
old_buffer_info
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID1
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID1
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID1
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
+=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID1
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
>=
old_buffer_info
)
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
-=
old_buffer_info
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID1
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID1
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID1
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
+=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID1
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
>=
old_buffer_info
)
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
-=
old_buffer_info
;
else
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
0
;
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
0
;
old_buffer_info
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID2
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID2
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID2
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
+=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID2
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
>=
old_buffer_info
)
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
-=
old_buffer_info
;
old_buffer_info
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID2
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID2
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID2
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
+=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID2
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
>=
old_buffer_info
)
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
-=
old_buffer_info
;
else
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
0
;
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
0
;
old_buffer_info
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID3
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID3
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
+=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID3
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
>=
old_buffer_info
)
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
-=
old_buffer_info
;
old_buffer_info
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID3
];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID3
]
=
BSR_TABLE
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]];
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
+=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
LCGID3
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
>=
old_buffer_info
)
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
-=
old_buffer_info
;
else
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
0
;
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_total_buffer
=
0
;
LOG_D
(
MAC
,
"[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR LCGID0 = %u LCGID1 = "
...
...
@@ -478,44 +402,28 @@ rx_sdu(const module_id_t enb_mod_idP,
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]);
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID0
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID0
]
=
0
;
}
else
if
(
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
ul_buffer_creation_time
[
LCGID0
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID0
]
=
frameP
;
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID0
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID0
]
=
0
;
}
else
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID0
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID0
]
=
frameP
;
}
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID1
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID1
]
=
0
;
}
else
if
(
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
ul_buffer_creation_time
[
LCGID1
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID1
]
=
frameP
;
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID1
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID1
]
=
0
;
}
else
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID1
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID1
]
=
frameP
;
}
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID2
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID2
]
=
0
;
}
else
if
(
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
ul_buffer_creation_time
[
LCGID2
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID2
]
=
frameP
;
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID2
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID2
]
=
0
;
}
else
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID2
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID2
]
=
frameP
;
}
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID3
]
=
0
;
}
else
if
(
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
ul_buffer_creation_time
[
LCGID3
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID3
]
=
frameP
;
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID3
]
=
0
;
}
else
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID3
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID3
]
=
frameP
;
}
}
...
...
@@ -558,10 +466,8 @@ rx_sdu(const module_id_t enb_mod_idP,
enb_mod_idP
,
CC_idP
,
frameP
,
payload_ptr
[
0
],
payload_ptr
[
1
],
payload_ptr
[
2
],
payload_ptr
[
3
],
payload_ptr
[
4
],
payload_ptr
[
5
],
current_rnti
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC
,
0
);
for
(
ii
=
0
;
ii
<
NB_RA_PROC_MAX
;
ii
++
)
{
RA_t
*
ra
=
&
mac
->
common_channels
[
CC_idP
].
ra
[
ii
];
...
...
@@ -581,8 +487,7 @@ rx_sdu(const module_id_t enb_mod_idP,
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lengths
[
i
],
payload_ptr
-
sduP
);
if
((
UE_id
=
add_new_ue
(
enb_mod_idP
,
CC_idP
,
if
((
UE_id
=
add_new_ue
(
enb_mod_idP
,
CC_idP
,
mac
->
common_channels
[
CC_idP
].
ra
[
ii
].
rnti
,
harq_pid
#ifdef Rel14
...
...
@@ -650,18 +555,10 @@ rx_sdu(const module_id_t enb_mod_idP,
if
(
UE_id
!=
-
1
)
{
// adjust buffer occupancy of the correponding logical channel group
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
>=
rx_lengths
[
i
])
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
-=
rx_lengths
[
i
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
>=
rx_lengths
[
i
])
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
-=
rx_lengths
[
i
];
else
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
=
0
;
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
=
0
;
LOG_D
(
MAC
,
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d
\n
"
,
...
...
@@ -669,11 +566,8 @@ rx_sdu(const module_id_t enb_mod_idP,
rx_lcids
[
i
]);
mac_rlc_data_ind
(
enb_mod_idP
,
current_rnti
,
enb_mod_idP
,
frameP
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
rx_lcids
[
i
],
(
char
*
)
payload_ptr
,
rx_lengths
[
i
],
1
,
NULL
);
//(unsigned int*)crc_status);
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_pdu_rx
[
rx_lcids
[
i
]]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_bytes_rx
[
rx_lcids
[
i
]]
+=
rx_lengths
[
i
];
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_pdu_rx
[
rx_lcids
[
i
]]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_bytes_rx
[
rx_lcids
[
i
]]
+=
rx_lengths
[
i
];
}
...
...
@@ -712,31 +606,19 @@ rx_sdu(const module_id_t enb_mod_idP,
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]);
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
>=
rx_lengths
[
i
])
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
]
[
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
-=
rx_lengths
[
i
];
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
>=
rx_lengths
[
i
])
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
-=
rx_lengths
[
i
];
else
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
=
0
;
if
((
rx_lengths
[
i
]
<
SCH_PAYLOAD_SIZE_MAX
)
&&
(
rx_lengths
[
i
]
>
0
))
{
// MAX SIZE OF transport block
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_info
[
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
lcgidmap
[
rx_lcids
[
i
]]]
=
0
;
if
((
rx_lengths
[
i
]
<
SCH_PAYLOAD_SIZE_MAX
)
&&
(
rx_lengths
[
i
]
>
0
))
{
// MAX SIZE OF transport block
mac_rlc_data_ind
(
enb_mod_idP
,
current_rnti
,
enb_mod_idP
,
frameP
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
rx_lcids
[
i
],
(
char
*
)
payload_ptr
,
rx_lengths
[
i
],
1
,
NULL
);
//(unsigned int*)crc_status);
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_pdu_rx
[
rx_lcids
[
i
]]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_bytes_rx
[
rx_lcids
[
i
]]
+=
rx_lengths
[
i
];
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_pdu_rx
[
rx_lcids
[
i
]]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_bytes_rx
[
rx_lcids
[
i
]]
+=
rx_lengths
[
i
];
//clear uplane_inactivity_timer
UE_list
->
UE_sched_ctrl
[
UE_id
].
uplane_inactivity_timer
=
0
;
}
else
{
/* rx_length[i] */
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_errors_rx
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
num_errors_rx
+=
1
;
LOG_E
(
MAC
,
"[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d "
,
enb_mod_idP
,
CC_idP
,
frameP
,
rx_lcids
[
i
],
...
...
@@ -790,14 +672,12 @@ rx_sdu(const module_id_t enb_mod_idP,
}
else
{
if
(
UE_id
!=
-
1
)
{
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
pdu_bytes_rx
=
sdu_lenP
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
total_pdu_bytes_rx
+=
sdu_lenP
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
total_pdu_bytes_rx
+=
sdu_lenP
;
UE_list
->
eNB_UE_stats
[
CC_idP
][
UE_id
].
total_num_pdus_rx
+=
1
;
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU
,
0
);
stop_meas
(
&
mac
->
rx_ulsch_sdu
);
}
...
...
@@ -820,8 +700,7 @@ void
add_ue_ulsch_info
(
module_id_t
module_idP
,
int
CC_id
,
int
UE_id
,
sub_frame_t
subframeP
,
UE_ULSCH_STATUS
status
)
{
eNB_ulsch_info
[
module_idP
][
CC_id
][
UE_id
].
rnti
=
UE_RNTI
(
module_idP
,
UE_id
);
eNB_ulsch_info
[
module_idP
][
CC_id
][
UE_id
].
rnti
=
UE_RNTI
(
module_idP
,
UE_id
);
eNB_ulsch_info
[
module_idP
][
CC_id
][
UE_id
].
subframe
=
subframeP
;
eNB_ulsch_info
[
module_idP
][
CC_id
][
UE_id
].
status
=
status
;
...
...
@@ -852,8 +731,7 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
if
(
lcid
<
EXTENDED_POWER_HEADROOM
)
{
if
(
not_done
==
0
)
{
// last MAC SDU, length is implicit
mac_header_ptr
++
;
length
=
tb_length
-
(
mac_header_ptr
-
mac_header
)
-
ce_len
;
length
=
tb_length
-
(
mac_header_ptr
-
mac_header
)
-
ce_len
;
for
(
num_sdu_cnt
=
0
;
num_sdu_cnt
<
num_sdus
;
num_sdu_cnt
++
)
{
...
...
@@ -1133,7 +1011,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
}
} */
if
(
drop_ue
==
1
)
{
/* we can't come here, ulsch_scheduler_pre_processor won't put in the list a UE with no PHY context */
/* we can't come here, ulsch_scheduler_pre_processor won't put in the list a UE with no PHY context */
abort
();
/* TODO: this is a hack. Sometimes the UE has no PHY context but
* is still present in the MAC with 'ul_failure_timer' = 0 and
...
...
@@ -1186,8 +1064,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_template
=
&
UE_list
->
UE_template
[
CC_id
][
UE_id
];
UE_sched_ctrl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
harq_pid
=
subframe2harqpid
(
&
cc
[
CC_id
],
sched_frame
,
sched_subframeP
);
harq_pid
=
subframe2harqpid
(
&
cc
[
CC_id
],
sched_frame
,
sched_subframeP
);
round
=
UE_sched_ctrl
->
round_UL
[
CC_id
][
harq_pid
];
AssertFatal
(
round
<
8
,
"round %d > 7 for UE %d/%x
\n
"
,
round
,
UE_id
,
rnti
);
...
...
@@ -1200,9 +1077,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
10
)
+
subframeP
]
=
UE_template
->
ul_total_buffer
;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO
,
RC
.
eNB
[
module_idP
][
CC_id
]
->
pusch_stats_BO
[
UE_id
][(
frameP
*
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO
,
RC
.
eNB
[
module_idP
][
CC_id
]
->
pusch_stats_BO
[
UE_id
][(
frameP
*
10
)
+
subframeP
]);
if
(
UE_is_to_be_scheduled
(
module_idP
,
CC_id
,
UE_id
)
>
0
||
round
>
0
)
// || ((frameP%10)==0))
...
...
@@ -1239,9 +1114,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
// this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
int32_t
framex10psubframe
=
UE_template
->
pusch_tpc_tx_frame
*
10
+
UE_template
->
pusch_tpc_tx_subframe
;
int32_t
framex10psubframe
=
UE_template
->
pusch_tpc_tx_frame
*
10
+
UE_template
->
pusch_tpc_tx_subframe
;
if
(((
framex10psubframe
+
10
)
<=
(
frameP
*
10
+
subframeP
))
||
//normal case
((
framex10psubframe
>
(
frameP
*
10
+
subframeP
))
&&
(((
10240
-
framex10psubframe
+
frameP
*
10
+
subframeP
)
>=
10
))))
//frame wrap-around
{
...
...
@@ -1274,10 +1147,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_template
->
oldNDI_UL
[
harq_pid
]
=
ndi
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
normalized_rx_power
=
normalized_rx_power
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
target_rx_power
=
target_rx_power
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
ulsch_mcs1
=
UE_template
->
pre_assigned_mcs_ul
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
target_rx_power
=
target_rx_power
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
ulsch_mcs1
=
UE_template
->
pre_assigned_mcs_ul
;
UE_template
->
mcs_UL
[
harq_pid
]
=
UE_template
->
pre_assigned_mcs_ul
;
//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
if
(
UE_template
->
pre_allocated_rb_table_index_ul
>=
0
)
{
rb_table_index
=
...
...
@@ -1287,8 +1158,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
rb_table_index
=
5
;
// for PHR
}
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
ulsch_mcs2
=
UE_template
->
mcs_UL
[
harq_pid
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
ulsch_mcs2
=
UE_template
->
mcs_UL
[
harq_pid
];
// buffer_occupancy = UE_template->ul_total_buffer;
...
...
@@ -1299,13 +1169,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
rb_table_index
--
;
}
UE_template
->
TBS_UL
[
harq_pid
]
=
get_TBS_UL
(
UE_template
->
mcs_UL
[
harq_pid
],
UE_template
->
TBS_UL
[
harq_pid
]
=
get_TBS_UL
(
UE_template
->
mcs_UL
[
harq_pid
],
rb_table
[
rb_table_index
]);
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used_rx
+=
rb_table
[
rb_table_index
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
ulsch_TBS
=
UE_template
->
TBS_UL
[
harq_pid
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used_rx
+=
rb_table
[
rb_table_index
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
ulsch_TBS
=
UE_template
->
TBS_UL
[
harq_pid
];
// buffer_occupancy -= TBS;
T
(
T_ENB_MAC_UE_UL_SCHEDULE
,
T_INT
(
module_idP
),
...
...
@@ -1316,8 +1183,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
T_INT
(
rb_table
[
rb_table_index
]),
T_INT
(
UE_template
->
TBS_UL
[
harq_pid
]),
T_INT
(
ndi
));
if
(
mac_eNB_get_rrc_status
(
module_idP
,
rnti
)
<
RRC_CONNECTED
)
if
(
mac_eNB_get_rrc_status
(
module_idP
,
rnti
)
<
RRC_CONNECTED
)
LOG_D
(
MAC
,
"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)
\n
"
,
module_idP
,
harq_pid
,
rnti
,
CC_id
,
frameP
,
...
...
@@ -1329,14 +1195,12 @@ schedule_ulsch_rnti(module_id_t module_idP,
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
//store for possible retransmission
UE_template
->
nb_rb_ul
[
harq_pid
]
=
rb_table
[
rb_table_index
];
UE_template
->
nb_rb_ul
[
harq_pid
]
=
rb_table
[
rb_table_index
];
UE_template
->
first_rb_ul
[
harq_pid
]
=
first_rb
[
CC_id
];
UE_sched_ctrl
->
ul_scheduled
|=
(
1
<<
harq_pid
);
if
(
UE_id
==
UE_list
->
head
)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED
,
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED
,
UE_sched_ctrl
->
ul_scheduled
);
// adjust total UL buffer status by TBS, wait for UL sdus to do final update
...
...
@@ -1345,10 +1209,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
module_idP
,
CC_id
,
UE_id
,
rnti
,
UE_template
->
ul_total_buffer
,
UE_template
->
TBS_UL
[
harq_pid
]);
if
(
UE_template
->
ul_total_buffer
>
UE_template
->
TBS_UL
[
harq_pid
])
UE_template
->
ul_total_buffer
-=
UE_template
->
TBS_UL
[
harq_pid
];
if
(
UE_template
->
ul_total_buffer
>
UE_template
->
TBS_UL
[
harq_pid
])
UE_template
->
ul_total_buffer
-=
UE_template
->
TBS_UL
[
harq_pid
];
else
UE_template
->
ul_total_buffer
=
0
;
LOG_D
(
MAC
,
"ul_total_buffer, new %d
\n
"
,
...
...
@@ -1359,37 +1221,23 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_template
->
cshift
[
harq_pid
]
=
cshift
;
hi_dci0_pdu
=
&
hi_dci0_req_body
->
hi_dci0_pdu_list
[
hi_dci0_req_body
->
number_of_dci
+
hi_dci0_req_body
->
number_of_hi
];
memset
((
void
*
)
hi_dci0_pdu
,
0
,
sizeof
(
nfapi_hi_dci0_request_pdu_t
));
memset
((
void
*
)
hi_dci0_pdu
,
0
,
sizeof
(
nfapi_hi_dci0_request_pdu_t
));
hi_dci0_pdu
->
pdu_type
=
NFAPI_HI_DCI0_DCI_PDU_TYPE
;
hi_dci0_pdu
->
pdu_size
=
2
+
sizeof
(
nfapi_hi_dci0_dci_pdu
);
hi_dci0_pdu
->
pdu_size
=
2
+
sizeof
(
nfapi_hi_dci0_dci_pdu
);
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
tl
.
tag
=
NFAPI_HI_DCI0_REQUEST_DCI_PDU_REL8_TAG
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
dci_format
=
NFAPI_UL_DCI_FORMAT_0
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
aggregation_level
=
aggregation
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
dci_format
=
NFAPI_UL_DCI_FORMAT_0
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
aggregation_level
=
aggregation
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
rnti
=
rnti
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
transmission_power
=
6000
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
resource_block_start
=
first_rb
[
CC_id
];
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
number_of_resource_block
=
rb_table
[
rb_table_index
];
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
mcs_1
=
UE_template
->
mcs_UL
[
harq_pid
];
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
cyclic_shift_2_for_drms
=
cshift
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
frequency_hopping_enabled_flag
=
0
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
new_data_indication_1
=
ndi
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
transmission_power
=
6000
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
resource_block_start
=
first_rb
[
CC_id
];
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
number_of_resource_block
=
rb_table
[
rb_table_index
];
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
mcs_1
=
UE_template
->
mcs_UL
[
harq_pid
];
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
cyclic_shift_2_for_drms
=
cshift
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
frequency_hopping_enabled_flag
=
0
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
new_data_indication_1
=
ndi
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
tpc
=
tpc
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
cqi_csi_request
=
cqi_req
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
dl_assignment_index
=
UE_template
->
DAI_ul
[
sched_subframeP
];
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
cqi_csi_request
=
cqi_req
;
hi_dci0_pdu
->
dci_pdu
.
dci_pdu_rel8
.
dl_assignment_index
=
UE_template
->
DAI_ul
[
sched_subframeP
];
hi_dci0_req_body
->
number_of_dci
++
;
hi_dci0_req_body
->
sfnsf
=
sfnsf_add_subframe
(
frameP
,
subframeP
,
4
);
...
...
@@ -1464,14 +1312,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
memset
((
void
*
)
hi_dci0_pdu
,
0
,
sizeof
(
nfapi_hi_dci0_request_pdu_t
));
hi_dci0_pdu
->
pdu_type
=
NFAPI_HI_DCI0_HI_PDU_TYPE
;
hi_dci0_pdu
->
pdu_size
=
2
+
sizeof
(
nfapi_hi_dci0_hi_pdu
);
hi_dci0_pdu
->
pdu_size
=
2
+
sizeof
(
nfapi_hi_dci0_hi_pdu
);
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
tl
.
tag
=
NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG
;
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
resource_block_start
=
UE_template
->
first_rb_ul
[
harq_pid
];
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
cyclic_shift_2_for_drms
=
UE_template
->
cshift
[
harq_pid
];
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
resource_block_start
=
UE_template
->
first_rb_ul
[
harq_pid
];
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
cyclic_shift_2_for_drms
=
UE_template
->
cshift
[
harq_pid
];
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
hi_value
=
0
;
hi_dci0_req_body
->
number_of_hi
++
;
hi_dci0_req_body
->
sfnsf
=
sfnsf_add_subframe
(
sched_frame
,
sched_subframeP
,
0
);
...
...
This diff is collapsed.
Click to expand it.
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