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
promise
OpenXG-RAN
Commits
cd6ebe2d
Commit
cd6ebe2d
authored
Nov 13, 2019
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temp add the primitives
parent
cd92c78f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
13 deletions
+29
-13
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
+27
-12
openair2/LAYER2/RLC/rlc_mac.c
openair2/LAYER2/RLC/rlc_mac.c
+2
-1
No files found.
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
View file @
cd6ebe2d
...
...
@@ -64,9 +64,9 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
int
HARQ_delay
=
0
;
uint32_t
data_size
;
//
uint32_t mac_sdu_size; //
uint32_t
mac_sdu_size
;
//
//
uint8_t sdu_temp[SCH_PAYLOAD_SIZE_MAX_NB_IoT]; //
uint8_t
sdu_temp
[
SCH_PAYLOAD_SIZE_MAX_NB_IoT
];
//
//logical_chan_id_t logical_channel; //
...
...
@@ -112,7 +112,21 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
DCCH0_NB_IoT
,
0
);
data_size
=
rlc_status
.
bytes_in_buffer
;
LOG_N
(
MAC
,
"[NB-IoT] RLC indicate to MAC that the data size is : %d
\n
"
,
data_size
);
mac_sdu_size
=
mac_rlc_data_req
(
module_id
,
UE_info
->
rnti
,
0
,
frame_start
,
1
,
0
,
DCCH0_NB_IoT
,
TBS
,
//not used
(
char
*
)
&
sdu_temp
[
0
]);
LOG_I
(
MAC
,
"[NB-IoT][DCCH] Got %d bytes from RLC
\n
"
,
mac_sdu_size
);
// for testing
/*data_size = 200;
data_size=0;
...
...
@@ -202,7 +216,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
{
end_flagSCH
=
check_resource_NPDSCH_NB_IoT
(
mac_inst
,
NPDSCH_info
,
NPDCCH_info
->
sf_end
,
I_delay
,
UE_info
->
R_max
,
UE_sched_ctrl_info
->
R_dl_data
,
n_sf
);
int
x
;
for
(
x
=
0
;
x
<
data_size
;
x
++
){
for
(
x
=
0
;
x
<
10
;
x
++
){
printf
(
"%02x "
,
UE_info
->
DLSCH_pdu
.
payload
[
x
]);
}
printf
(
"
\n
"
);
...
...
@@ -226,6 +240,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
UE_info
->
oldNDI_DL
=
(
UE_info
->
oldNDI_DL
+
1
)
%
2
;
//New transmission need to request data from RLC and generate new MAC PDU
UE_info
->
I_mcs_dl
=
I_mcs
;
/*.......
//Request data from RLC layer
rlc_status = mac_rlc_status_ind(
...
...
@@ -264,16 +279,16 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
UE_sched_ctrl_info
->
dci_n1_index_ack_nack
=
HARQ_info
->
ACK_NACK_resource_field
;
UE_sched_ctrl_info
->
total_data_size_dl
=
data_size
;
}
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Complete scheduling with data size %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
data_size
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Complete scheduling with data size %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
data_size
);
//LOG_D(MAC,"[%04d][DLSchedulerUSS] RNTI %d\n", mac_inst->current_subframe, UE_info->rnti);
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Allocate NPDCCH subframe %d to subframe %d candidate index %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDCCH_info
->
sf_start
,
NPDCCH_info
->
sf_end
,
cdd_num
);
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Scheduling delay index: %d value: %d + 4
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
I_delay
,
get_scheduling_delay
(
I_delay
,
UE_info
->
R_max
));
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Allocate NPDSCH subframe %d to subframe %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDSCH_info
->
sf_start
,
NPDSCH_info
->
sf_end
);
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Allocate HARQ feedback subframe %d to subframe %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
HARQ_info
->
sf_start
,
HARQ_info
->
sf_end
);
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d] Allocate NPDCCH subframe %d to subframe %d candidate index %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDCCH_info
->
sf_start
,
NPDCCH_info
->
sf_end
,
cdd_num
);
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d] Scheduling delay index: %d value: %d + 4
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
I_delay
,
get_scheduling_delay
(
I_delay
,
UE_info
->
R_max
));
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d] Allocate NPDSCH subframe %d to subframe %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDSCH_info
->
sf_start
,
NPDSCH_info
->
sf_end
);
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS][%d] Allocate HARQ feedback subframe %d to subframe %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
HARQ_info
->
sf_start
,
HARQ_info
->
sf_end
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Allocate NPDCCH subframe %d to subframe %d candidate index %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDCCH_info
->
sf_start
,
NPDCCH_info
->
sf_end
,
cdd_num
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Scheduling delay index: %d value: %d + 4
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
I_delay
,
get_scheduling_delay
(
I_delay
,
UE_info
->
R_max
));
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Allocate NPDSCH subframe %d to subframe %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDSCH_info
->
sf_start
,
NPDSCH_info
->
sf_end
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Allocate HARQ feedback subframe %d to subframe %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
HARQ_info
->
sf_start
,
HARQ_info
->
sf_end
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d] Allocate NPDCCH subframe %d to subframe %d candidate index %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDCCH_info
->
sf_start
,
NPDCCH_info
->
sf_end
,
cdd_num
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d] Scheduling delay index: %d value: %d + 4
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
I_delay
,
get_scheduling_delay
(
I_delay
,
UE_info
->
R_max
));
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d] Allocate NPDSCH subframe %d to subframe %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDSCH_info
->
sf_start
,
NPDSCH_info
->
sf_end
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS][%d] Allocate HARQ feedback subframe %d to subframe %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
HARQ_info
->
sf_start
,
HARQ_info
->
sf_end
);
//Store PDU in UE template for retransmission
//fill_DCI_N1(DCI_N1, UE_info, I_delay, I_sf, HARQ_info->ACK_NACK_resource_field);
//LOG_D(MAC,"[%04d][DLSchedulerUSS] HARQ index %d\n", HARQ_info->ACK_NACK_resource_field);
...
...
openair2/LAYER2/RLC/rlc_mac.c
View file @
cd6ebe2d
...
...
@@ -136,7 +136,7 @@ tbs_size_t mac_rlc_data_req(
rlc_union_t
*
rlc_union_p
=
NULL
;
hash_key_t
key
=
HASHTABLE_NOT_A_KEY_VALUE
;
hashtable_rc_t
h_rc
;
srb_flag_t
srb_flag
=
(
channel_idP
<=
2
)
?
SRB_FLAG_YES
:
SRB_FLAG_NO
;
srb_flag_t
srb_flag
=
(
channel_idP
<=
3
)
?
SRB_FLAG_YES
:
SRB_FLAG_NO
;
tbs_size_t
ret_tb_size
=
0
;
protocol_ctxt_t
ctxt
;
...
...
@@ -174,6 +174,7 @@ tbs_size_t mac_rlc_data_req(
}
}
else
{
key
=
RLC_COLL_KEY_LCID_VALUE
(
module_idP
,
rntiP
,
enb_flagP
,
channel_idP
,
srb_flag
);
//key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, 1);
}
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
...
...
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