Commit 3555a021 authored by Nick Ho's avatar Nick Ho

Debug with Scheduler

parent 9e5c636f
...@@ -72,7 +72,7 @@ int32_t get_uldl_offset_NB_IoT(int eutra_band) { ...@@ -72,7 +72,7 @@ int32_t get_uldl_offset_NB_IoT(int eutra_band) {
return(-eutra_bandtable[eutra_band].dl_min + eutra_bandtable[eutra_band].ul_min); return(-eutra_bandtable[eutra_band].dl_min + eutra_bandtable[eutra_band].ul_min);
} }
uint32_t to_earfcn(int eutra_bandP,uint32_t dl_CarrierFreq, float m_dl) { uint32_t to_earfcn_NB_IoT(int eutra_bandP,uint32_t dl_CarrierFreq, float m_dl) {
uint32_t dl_CarrierFreq_by_100k = dl_CarrierFreq/100000; uint32_t dl_CarrierFreq_by_100k = dl_CarrierFreq/100000;
...@@ -198,7 +198,7 @@ void config_mib_fapi_NB_IoT( ...@@ -198,7 +198,7 @@ void config_mib_fapi_NB_IoT(
* 1) takes a random number from the offset of category NB1 and NB2 based on the operating mode (we assume always the usage of anchor carrier) * 1) takes a random number from the offset of category NB1 and NB2 based on the operating mode (we assume always the usage of anchor carrier)
* 2)evaluate the EARFCN value based on the corresponding formula * 2)evaluate the EARFCN value based on the corresponding formula
*/ */
config_INFO->cfg->nfapi_config.earfcn.value = to_earfcn(eutra_band,dl_CarrierFreq, m_dl); config_INFO->cfg->nfapi_config.earfcn.value = to_earfcn_NB_IoT(eutra_band,dl_CarrierFreq, m_dl);
} }
......
...@@ -233,7 +233,7 @@ typedef struct{ ...@@ -233,7 +233,7 @@ typedef struct{
typedef struct { typedef struct {
/// DCI template and MAC connection parameters for UEs /// DCI template and MAC connection parameters for UEs
UE_TEMPLATE_NB_IoT UE_template_NB_IoT[NUMBER_OF_UE_MAX_NB_IoT]; UE_TEMPLATE_NB_IoT UE_template_NB_IoT[MAX_NUMBER_OF_UE_MAX_NB_IoT];
/// NPDCCH Period and searching space info /// NPDCCH Period and searching space info
NPDCCH_config_dedicated_NB_IoT_t NPDCCH_config_dedicated; NPDCCH_config_dedicated_NB_IoT_t NPDCCH_config_dedicated;
......
...@@ -480,6 +480,8 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst){ ...@@ -480,6 +480,8 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst){
schedule_result_t *msg4_result; schedule_result_t *msg4_result;
schedule_result_t *harq_result; schedule_result_t *harq_result;
msg4_node = (available_resource_DL_t *)0;
//print_available_resource_DL(); //print_available_resource_DL();
while((RA_TEMPLATE_NB_IoT *)0 != msg4_nodes){ while((RA_TEMPLATE_NB_IoT *)0 != msg4_nodes){
......
...@@ -97,7 +97,7 @@ void convert_system_number(uint32_t source_sf,uint32_t *hyperSF, uint32_t *frame ...@@ -97,7 +97,7 @@ void convert_system_number(uint32_t source_sf,uint32_t *hyperSF, uint32_t *frame
uint32_t convert_system_number_sf(uint32_t hyperSF, uint32_t frame, uint32_t subframe); uint32_t convert_system_number_sf(uint32_t hyperSF, uint32_t frame, uint32_t subframe);
uint32_t to_earfcn(int eutra_bandP,uint32_t dl_CarrierFreq, float m_dl); uint32_t to_earfcn_NB_IoT(int eutra_bandP,uint32_t dl_CarrierFreq, float m_dl);
uint32_t from_earfcn_NB_IoT(int eutra_bandP,uint32_t dl_earfcn, float m_dl); uint32_t from_earfcn_NB_IoT(int eutra_bandP,uint32_t dl_earfcn, float m_dl);
......
...@@ -179,11 +179,10 @@ void Initialize_Resource(void){ ...@@ -179,11 +179,10 @@ void Initialize_Resource(void){
// extend subframe align to si-period // extend subframe align to si-period
void extend_available_resource_DL(eNB_MAC_INST_NB_IoT *mac_inst, int max_subframe){ // assume max_subframe is found. void extend_available_resource_DL(eNB_MAC_INST_NB_IoT *mac_inst, int max_subframe){ // assume max_subframe is found.
available_resource_DL_t *pt, *new_node; available_resource_DL_t *new_node;
//int temp; //int temp;
uint32_t i, i_div_si_window; uint32_t i, i_div_si_window;
//uint32_t si_period_div_window; //uint32_t si_period_div_window;
pt = available_resource_DL;
printf("%d %d\n", max_subframe, mac_inst->schedule_subframe_DL); printf("%d %d\n", max_subframe, mac_inst->schedule_subframe_DL);
......
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