Commit 3a002e2c authored by Nick Ho's avatar Nick Ho

Finish the debug of src in MAC

parent 4269152f
......@@ -1424,6 +1424,7 @@ set (MAC_SRC
#${PHY_INTERFACE_DIR}/phy_stub_UE.c
${PHY_INTERFACE_DIR}/IF_Module.c
${MAC_DIR}/main.c
${MAC_DIR}/main_NB_IoT.c
#${MAC_DIR}/main_ue.c
#${MAC_DIR}/ue_procedures.c
#${MAC_DIR}/ra_procedures.c
......@@ -1431,16 +1432,23 @@ set (MAC_SRC
${MAC_DIR}/rar_tools.c
#${MAC_DIR}/rar_tools_ue.c
${MAC_DIR}/eNB_scheduler.c
${MAC_DIR}/eNB_scheduler_NB_IoT.c
${MAC_DIR}/eNB_scheduler_dlsch.c
${MAC_DIR}/eNB_scheduler_dlsch_NB_IoT.c
${MAC_DIR}/eNB_scheduler_ulsch.c
${MAC_DIR}/eNB_scheduler_ulsch_NB_IoT.c
${MAC_DIR}/eNB_scheduler_mch.c
${MAC_DIR}/eNB_scheduler_bch.c
${MAC_DIR}/eNB_scheduler_bch_NB_IoT.c
${MAC_DIR}/eNB_scheduler_primitives.c
${MAC_DIR}/eNB_scheduler_RA.c
${MAC_DIR}/eNB_scheduler_RA_NB_IoT.c
${MAC_DIR}/eNB_scheduler_fairRR.c
${MAC_DIR}/eNB_scheduler_phytest.c
${MAC_DIR}/pre_processor.c
${MAC_DIR}/config.c
${MAC_DIR}/config_NB_IoT.c
${MAC_DIR}/schedule_tool_NB_IoT.c
#${MAC_DIR}/config_ue.c
)
......
......@@ -404,7 +404,7 @@ void rrc_mac_config_req_NB_IoT(
mac_inst->npdcch_config_common[0].R_max = rmax[nprach_parameter->npdcch_NumRepetitions_RA_r13];
mac_inst->npdcch_config_common[0].G = gvalue[nprach_parameter->npdcch_StartSF_CSS_RA_r13];
mac_inst->npdcch_config_common[0].a_offset = pdcchoffset[nprach_parameter->npdcch_Offset_RA_r13];
LOG_I(MAC,"NPRACH CE 0 setting: Rmax: %lu G: %lf a: %lf\n",mac_inst->npdcch_config_common[0].R_max,mac_inst->npdcch_config_common[0].G,mac_inst->npdcch_config_common[0].a_offset);
LOG_I(MAC,"NPRACH CE 0 setting: Rmax: %u G: %lf a: %lf\n",mac_inst->npdcch_config_common[0].R_max,mac_inst->npdcch_config_common[0].G,mac_inst->npdcch_config_common[0].a_offset);
}
//CE level 1
if ( radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[1] != NULL)
......@@ -418,7 +418,7 @@ void rrc_mac_config_req_NB_IoT(
mac_inst->npdcch_config_common[1].R_max = rmax[nprach_parameter->npdcch_NumRepetitions_RA_r13];
mac_inst->npdcch_config_common[1].G = gvalue[nprach_parameter->npdcch_StartSF_CSS_RA_r13];
mac_inst->npdcch_config_common[1].a_offset = pdcchoffset[nprach_parameter->npdcch_Offset_RA_r13];
LOG_I(MAC,"NPRACH CE 1 setting: Rmax: %lu G: %lf a: %lf\n",mac_inst->npdcch_config_common[1].R_max,mac_inst->npdcch_config_common[1].G,mac_inst->npdcch_config_common[1].a_offset);
LOG_I(MAC,"NPRACH CE 1 setting: Rmax: %u G: %lf a: %lf\n",mac_inst->npdcch_config_common[1].R_max,mac_inst->npdcch_config_common[1].G,mac_inst->npdcch_config_common[1].a_offset);
}
//CE level 2
if ( radioResourceConfigCommon->nprach_Config_r13.nprach_ParametersList_r13.list.array[2] != NULL)
......@@ -432,7 +432,7 @@ void rrc_mac_config_req_NB_IoT(
mac_inst->npdcch_config_common[2].R_max = rmax[nprach_parameter->npdcch_NumRepetitions_RA_r13];
mac_inst->npdcch_config_common[2].G = gvalue[nprach_parameter->npdcch_StartSF_CSS_RA_r13];
mac_inst->npdcch_config_common[2].a_offset = pdcchoffset[nprach_parameter->npdcch_Offset_RA_r13];
LOG_I(MAC,"NPRACH CE 2 setting: Rmax: %lu G: %lf a: %lf\n",mac_inst->npdcch_config_common[2].R_max,mac_inst->npdcch_config_common[2].G,mac_inst->npdcch_config_common[2].a_offset);
LOG_I(MAC,"NPRACH CE 2 setting: Rmax: %u G: %lf a: %lf\n",mac_inst->npdcch_config_common[2].R_max,mac_inst->npdcch_config_common[2].G,mac_inst->npdcch_config_common[2].a_offset);
}
config_sib2_fapi_NB_IoT(carrier->physCellId,radioResourceConfigCommon);
......
......@@ -183,7 +183,7 @@ void schedule_rar_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe){
uint32_t Iru = 0, mcs, Nru;
uint32_t Nrep_UL = 0; // need a table here
uint32_t mappedMcsIndex = 4; // assume all ue supported multi-tone
//uint32_t mappedMcsIndex = 4; // assume all ue supported multi-tone
//mcs = mapped_mcs[msg2_nodes->ce_level][mappedMcsIndex]; // assume all ue supported multi-tone
mcs = 2;
Nrep_UL = ULrep[rep];
......
......@@ -183,7 +183,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
unsigned char rx_ces[5], num_ce = 0, num_sdu = 0, *payload_ptr, i; // MAX Control element
unsigned char rx_lcids[5];//for NB_IoT-IoT, NB_IoT_RB_MAX should be fixed to 5 (2 DRB+ 3SRB)
unsigned short rx_lengths[5];
//int UE_id = 0;
int UE_id = 0;
int BSR_index=0;
int DVI_index = 0;
int PHR = 0;
......@@ -253,12 +253,12 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
module_id,
CC_id,
frame,subframe,
UE_id,
rnti,
CCCH,
(uint8_t*)payload_ptr,
rx_lengths[i],
1,
module_id,
0,
0);
LOG_D(MAC,"rx_lengths : %d\n", rx_lengths[i]);
msg4_rrc_pdu = mac_rrc_msg3_ind_NB_IoT(payload_ptr,rnti,rx_lengths[i]);
......
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