Commit 1253aaf5 authored by Daniel0326's avatar Daniel0326

Testing

parent 72a1b227
...@@ -64,15 +64,15 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_ ...@@ -64,15 +64,15 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
int HARQ_delay=0; int HARQ_delay=0;
uint32_t data_size; 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; //logical_chan_id_t logical_channel; //
uint32_t subheader_length=2; uint32_t subheader_length=2;
//uint32_t payload_offset; //uint32_t payload_offset; //
uint32_t search_space_end_sf, h_temp, f_temp, sf_temp; uint32_t search_space_end_sf, h_temp, f_temp, sf_temp;
...@@ -122,6 +122,16 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_ ...@@ -122,6 +122,16 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
if(UE_info_sim[ue_index].tc_rnti==UE_info->rnti) if(UE_info_sim[ue_index].tc_rnti==UE_info->rnti)
data_size = UE_info_sim[ue_index].data_size; data_size = UE_info_sim[ue_index].data_size;
}*/ }*/
/*
mac_sdu_size = mac_rlc_data_req_eNB_NB_IoT(module_id, UE_info->rnti, 0, frame_start, 0, DCCH0_NB_IoT, sdu_temp);
//Generate header
payload_offset = generate_dlsch_header_NB_IoT(UE_info->DLSCH_pdu.payload, 1, &logical_channel, &mac_sdu_size, 0, 0, TBS);
//Complete MAC PDU
memcpy(UE_info->DLSCH_pdu.payload+payload_offset, sdu_temp, mac_sdu_size);
UE_info->DLSCH_pdu.pdu_size=TBS;
*/
} }
/*Retransmission*/ /*Retransmission*/
else else
...@@ -191,7 +201,12 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_ ...@@ -191,7 +201,12 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
if(search_space_end_sf<NPDCCH_info->sf_end+get_scheduling_delay(I_delay, UE_info->R_max)+5) if(search_space_end_sf<NPDCCH_info->sf_end+get_scheduling_delay(I_delay, UE_info->R_max)+5)
{ {
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); 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);
//Have available resource int x;
for (x=0;x<data_size;x++){
printf("%02x ",UE_info->DLSCH_pdu.payload[x]);
}
printf("\n");
//Have available resource
/*Check HARQ resource*/ /*Check HARQ resource*/
if(end_flagSCH!=-1) if(end_flagSCH!=-1)
{ {
...@@ -553,8 +568,8 @@ void generate_scheduling_result_DL(uint32_t NPDCCH_sf_end, uint32_t NPDCCH_sf_st ...@@ -553,8 +568,8 @@ void generate_scheduling_result_DL(uint32_t NPDCCH_sf_end, uint32_t NPDCCH_sf_st
NPDSCH_result->output_subframe = NPDSCH_sf_start; NPDSCH_result->output_subframe = NPDSCH_sf_start;
NPDSCH_result->end_subframe = NPDSCH_sf_end; NPDSCH_result->end_subframe = NPDSCH_sf_end;
NPDSCH_result->sdu_length = TBS; NPDSCH_result->sdu_length = TBS;
//NPDSCH_result->DLSCH_pdu = DLSCH_pdu; NPDSCH_result->DLSCH_pdu = DLSCH_pdu;
NPDSCH_result->DLSCH_pdu = NULL; //NPDSCH_result->DLSCH_pdu = NULL;
NPDSCH_result->direction = 1; NPDSCH_result->direction = 1;
NPDSCH_result->rnti_type = 3; NPDSCH_result->rnti_type = 3;
NPDSCH_result->DCI_pdu = (void*)DCI_pdu; NPDSCH_result->DCI_pdu = (void*)DCI_pdu;
......
...@@ -1426,6 +1426,11 @@ boolean_t pdcp_data_req_NB_IoT( ...@@ -1426,6 +1426,11 @@ boolean_t pdcp_data_req_NB_IoT(
(unsigned char*)&pdcp_pdu_p->data[0], (unsigned char*)&pdcp_pdu_p->data[0],
sdu_buffer_sizeP); sdu_buffer_sizeP);
#endif #endif
int x;
for (x=0;x<sdu_buffer_sizeP;x++){
printf("%02x ",pdcp_pdu_p->data[x]);
}
printf("\n");
rlc_status = rlc_data_req_NB_IoT(ctxt_pP, srb_flagP, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p); rlc_status = rlc_data_req_NB_IoT(ctxt_pP, srb_flagP, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p);
//MP: if all ok rlc_status = RLC_OP_STATUS_OK //MP: if all ok rlc_status = RLC_OP_STATUS_OK
...@@ -2571,6 +2576,12 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP, ...@@ -2571,6 +2576,12 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
#ifdef DEBUG_RLC_DATA_REQ #ifdef DEBUG_RLC_DATA_REQ
LOG_D(RLC,"RLC_MODE_AM\n"); LOG_D(RLC,"RLC_MODE_AM\n");
#endif #endif
int x;
for (x=0;x<sdu_sizeP;x++){
printf("%02x ",sdu_pP->data[x]);
}
printf("\n");
new_sdu_p = get_free_mem_block (sdu_sizeP + sizeof (struct rlc_am_data_req_alloc), __func__); new_sdu_p = get_free_mem_block (sdu_sizeP + sizeof (struct rlc_am_data_req_alloc), __func__);
if (new_sdu_p != NULL) { if (new_sdu_p != NULL) {
......
...@@ -864,6 +864,12 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS( ...@@ -864,6 +864,12 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
* switch UL or DL NAS message without RRC piggybacked to SRB2 if active. * switch UL or DL NAS message without RRC piggybacked to SRB2 if active.
*/ */
/* Transfer data to PDCP */ /* Transfer data to PDCP */
int x;
for (x=0;x<length;x++){
printf("%02x ",buffer[x]);
}
printf("\n");
rrc_data_req ( rrc_data_req (
&ctxt, &ctxt,
srb_id, srb_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment