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
7e61b602
Commit
7e61b602
authored
Jul 21, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle retransmission
parent
1aa3f901
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
0 deletions
+67
-0
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+67
-0
No files found.
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
7e61b602
...
...
@@ -581,6 +581,62 @@ static int fixed_size(int lcid)
return
lcid
>=
27
;
}
/* TODO: deal with MCS 29-31 in the PHY layer
* in the meantime, this array stores the latest mcs used for each rnti/harq_pid
*/
static
unsigned
char
latest_mcs
[
65536
][
10
];
/* TODO: deal with more than one transport block */
static
void
fapi_schedule_retransmission_ue
(
int
module_id
,
int
CC_id
,
int
frame
,
int
subframe
,
struct
BuildDataListElement_s
*
d
)
{
int
header_size
;
int
payload_size
;
int
padding_size
;
int
tbs
;
int
i
;
mac_rlc_status_resp_t
rlc_status
;
unsigned
char
dlsch_buffer
[
MAX_DLSCH_PAYLOAD_BYTES
];
int
dlsch_filled
=
0
;
int
output_length
;
int
UE_id
;
eNB_MAC_INST
*
eNB
=
&
eNB_mac_inst
[
module_id
];
UE_list_t
*
UE_list
=
&
eNB
->
UE_list
;
int
num_sdus
;
unsigned
short
sdu_lengths
[
MAX_RLC_PDU_LIST
];
unsigned
char
sdu_lcids
[
MAX_RLC_PDU_LIST
];
int
offset
;
DCI_PDU
*
dci_pdu
=
&
eNB
->
common_channels
[
CC_id
].
DCI_pdu
;
DCI_ALLOC_t
*
a
=
&
dci_pdu
->
dci_alloc
[
dci_pdu
->
Num_common_dci
];
/* generate DCI */
if
(
dci_pdu
->
Num_common_dci
>=
NUM_DCI_MAX
)
{
printf
(
"%s:%d:%s: too much DCIs
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
/* we can increment Num_common_dci or Num_ue_spec_dci, there is no difference */
dci_pdu
->
Num_common_dci
++
;
/* TODO: deal with MCS 29-31 in the PHY layer
* in the meantime, let's replace with the last used MCS
*/
d
->
dci
.
mcs
[
0
]
=
latest_mcs
[
d
->
rnti
][
d
->
dci
.
harqProcess
];
fapi_convert_dl_dci
(
module_id
,
CC_id
,
&
d
->
dci
,
a
);
printf
(
"RUN fapi_schedule_retransmission_ue
\n
"
);
if
(
d
->
nr_rlcPDU_List
[
0
]
!=
0
)
{
printf
(
"%s:%d:%s: error?
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
if
(
d
->
nr_rlcPDU_List
[
1
]
!=
0
)
{
printf
(
"%s:%d:%s: TODO
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
if
(
d
->
ceBitmap
[
0
])
{
printf
(
"%s:%d:%s: TODO
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
if
(
d
->
ceBitmap
[
1
])
{
printf
(
"%s:%d:%s: TODO
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
if
(
d
->
servCellIndex
!=
0
)
{
printf
(
"%s:%d:%s: TODO
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
UE_id
=
find_UE_id
(
module_id
,
d
->
rnti
);
add_ue_dlsch_info
(
module_id
,
CC_id
,
UE_id
,
subframe
,
/* S_DL_SCHEDULED */
S_DL_WAITING
);
}
/* TODO: deal with more than one transport block */
static
void
fapi_schedule_ue
(
int
module_id
,
int
CC_id
,
int
frame
,
int
subframe
,
struct
BuildDataListElement_s
*
d
)
{
...
...
@@ -603,6 +659,12 @@ static void fapi_schedule_ue(int module_id, int CC_id, int frame, int subframe,
DCI_PDU
*
dci_pdu
=
&
eNB
->
common_channels
[
CC_id
].
DCI_pdu
;
DCI_ALLOC_t
*
a
=
&
dci_pdu
->
dci_alloc
[
dci_pdu
->
Num_common_dci
];
/* retransmission? */
if
(
d
->
dci
.
mcs
[
0
]
>=
29
&&
d
->
dci
.
mcs
[
0
]
<=
31
)
{
fapi_schedule_retransmission_ue
(
module_id
,
CC_id
,
frame
,
subframe
,
d
);
return
;
}
/* generate DCI */
if
(
dci_pdu
->
Num_common_dci
>=
NUM_DCI_MAX
)
{
printf
(
"%s:%d:%s: too much DCIs
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
...
...
@@ -618,6 +680,11 @@ printf("RUN fapi_schedule_ue\n");
if
(
d
->
ceBitmap
[
1
])
{
printf
(
"%s:%d:%s: TODO
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
if
(
d
->
servCellIndex
!=
0
)
{
printf
(
"%s:%d:%s: TODO
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
abort
();
}
/* TODO: deal with MCS 29-31
* in the meantime, we store the latest used mcs for each rnti/harq_pid
*/
latest_mcs
[
d
->
rnti
][
d
->
dci
.
harqProcess
]
=
d
->
dci
.
mcs
[
0
];
tbs
=
d
->
dci
.
tbsSize
[
0
]
/
8
;
num_sdus
=
0
;
...
...
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