Commit 17cc03b8 authored by Nick Ho's avatar Nick Ho

disable fix scheduler

parent cf85aebd
......@@ -325,7 +325,7 @@ int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB,
printf("DCI PDU content:");
for (tmp =0;tmp<3;tmp++)
printf("%02x ",DCI_tmp[tmp]);
printf("%d ",DCI_tmp[tmp]);
printf("\n");
/*
* TS 36.213 ch 16.4.1.5
......
......@@ -205,6 +205,16 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
eNB->ndlsch_RAR->active = 1;
eNB->ndlsch_RAR->harq_process->TBS = rel13->length;
/*uint8_t tab_rar[7];
tab_rar[0]=64;
tab_rar[1]=0;
tab_rar[2]=9;
tab_rar[3]=96;
tab_rar[4]=64;
tab_rar[5]=255; // 16
tab_rar[6]=242; // 5
eNB->ndlsch_RAR->harq_process->pdu = tab_rar;*/
eNB->ndlsch_RAR->harq_process->pdu = sdu;
......@@ -212,7 +222,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
int fori = 0;
for(fori=0;fori<7;fori++)
{
printf("%02x ",eNB->ndlsch_RAR->harq_process->pdu[fori]);
printf("%d ",eNB->ndlsch_RAR->harq_process->pdu[fori]);
}
printf("\n");
......
......@@ -35,7 +35,7 @@
#include "openair2/RRC/LITE/proto_NB_IoT.h"
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
#define fixed_scheduling 1
#define fixed_scheduling 0
int delay_time=0;
int rar_transmit = 0;
......@@ -95,7 +95,7 @@ int fixed_scheduler(uint32_t frame, uint32_t subframe, Sched_Rsp_NB_IoT_t *SCHED
SCHED_info->DL_req->dl_config_request_body.number_pdu = 1;
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = 2+sizeof(nfapi_dl_config_ndlsch_pdu_rel13_t);
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.length = 7;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.length = 56;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.pdu_index = 1;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.rnti_type = 1;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.rnti = RARNTI; // RA-RNTI
......@@ -269,7 +269,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
// not consider the case transmitting 2 DCIs for the moment also not consider N2 now
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_NPDCCH_PDU_TYPE;
dl_config_pdu->pdu_size = 2+sizeof(nfapi_dl_config_npdcch_pdu_rel13_t);
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.length = schedule_result_list_DL->sdu_length;
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.length = (schedule_result_list_DL->sdu_length)*8;
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.pdu_index = 1;
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.ncce_index = 0;
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.aggregation_level = 1;
......@@ -322,7 +322,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
SCHED_info->DL_req->dl_config_request_body.number_pdu = 1;
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = 2+sizeof(nfapi_dl_config_ndlsch_pdu_rel13_t);
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.length = schedule_result_list_DL->sdu_length;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.length = (schedule_result_list_DL->sdu_length)*8;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.pdu_index = 1;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.rnti_type = 1;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.rnti = schedule_result_list_DL->rnti; // C-RNTI
......@@ -334,6 +334,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
if(schedule_result_list_DL->rnti==SI_RNTI)
{
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.number_of_subframes_for_resource_assignment =((DCIFormatN1_t *)DCI_pdu)->ResAssign;
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.length = schedule_result_list_DL->sdu_length;
LOG_D(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill SIBs\n",hypersfn,frame,subframe);
}else
......
......@@ -47,8 +47,8 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
enable_preamble_simulation(UL_INFO,0);
if(preamble_trigger==0)
{
//if(preamble_trigger==0)
//{
//If there is a preamble, do the initiate RA procedure
if(UL_INFO->nrach_ind.number_of_initial_scs_detected>0)
{
......@@ -60,19 +60,19 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
//(UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc
//(UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.timing_advance
LOG_D(MAC,"Init_RA_NB_IoT in, index of sc = %d\n",(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc);
/*init_RA_NB_IoT(mac_inst,
init_RA_NB_IoT(mac_inst,
(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc,
(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.nrach_ce_level,
UL_INFO->frame,
//timing_offset = Timing_advance * 16
(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.timing_advance*16
);*/
);
LOG_D(MAC,"Init_RA_NB_IoT Out\n");
preamble_trigger=1;
preamble_sfn = UL_INFO->frame;
}
}
}
//}
UL_INFO->nrach_ind.number_of_initial_scs_detected = 0;
......
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