Commit 97097a8c authored by Raymond Knopp's avatar Raymond Knopp

more debugging for RA procedures for eMTC

parent 71dbefe9
...@@ -290,7 +290,7 @@ void ...@@ -290,7 +290,7 @@ void
generate_mdci_top (PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF) generate_mdci_top (PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF)
{ {
LTE_eNB_MPDCCH *mpdcch= &eNB->mpdcch_vars[subframe&2]; LTE_eNB_MPDCCH *mpdcch= &eNB->mpdcch_vars[subframe&1];
mDCI_ALLOC_t *mdci; mDCI_ALLOC_t *mdci;
int coded_bits; int coded_bits;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
......
...@@ -614,7 +614,9 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -614,7 +614,9 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
eNB->pdcch_vars[subframe&1].num_pdcch_symbols = DL_req->dl_config_request_body.number_pdcch_ofdm_symbols; eNB->pdcch_vars[subframe&1].num_pdcch_symbols = DL_req->dl_config_request_body.number_pdcch_ofdm_symbols;
eNB->pdcch_vars[subframe&1].num_dci = 0; eNB->pdcch_vars[subframe&1].num_dci = 0;
eNB->phich_vars[subframe&1].num_hi = 0; eNB->phich_vars[subframe&1].num_hi = 0;
#ifdef Rel14
eNB->mpdcch_vars[subframe&1].num_dci = 0;
#endif
LOG_I(PHY,"NFAPI: Frame %d, Subframe %d (ul_subframe %d): received %d dl_pdu, %d tx_req, %d hi_dci0_config_req, %d UL_config \n", LOG_I(PHY,"NFAPI: Frame %d, Subframe %d (ul_subframe %d): received %d dl_pdu, %d tx_req, %d hi_dci0_config_req, %d UL_config \n",
frame,subframe,ul_subframe,number_dl_pdu,TX_req->tx_request_body.number_of_pdus,number_hi_dci0_pdu,number_ul_pdu); frame,subframe,ul_subframe,number_dl_pdu,TX_req->tx_request_body.number_of_pdus,number_hi_dci0_pdu,number_ul_pdu);
......
...@@ -917,6 +917,7 @@ typedef struct { ...@@ -917,6 +917,7 @@ typedef struct {
#ifdef Rel14 #ifdef Rel14
uint8_t rach_resource_type; uint8_t rach_resource_type;
uint8_t msg2_mpdcch_repetition_cnt; uint8_t msg2_mpdcch_repetition_cnt;
uint8_t msg2_mpdcch_done;
uint8_t msg4_mpdcch_repetition_cnt; uint8_t msg4_mpdcch_repetition_cnt;
uint8_t msg2_narrowband; uint8_t msg2_narrowband;
uint8_t msg34_narrowband; uint8_t msg34_narrowband;
......
...@@ -251,6 +251,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s ...@@ -251,6 +251,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s
first_rb = narrowband_to_first_rb (&cc[CC_idP], RA_template->msg2_narrowband); first_rb = narrowband_to_first_rb (&cc[CC_idP], RA_template->msg2_narrowband);
if ((RA_template->msg2_mpdcch_repetition_cnt == 0) && (mpdcch_sf_condition (eNB, CC_idP, frameP, subframeP, rmax, TYPE2, -1) > 0)) { if ((RA_template->msg2_mpdcch_repetition_cnt == 0) && (mpdcch_sf_condition (eNB, CC_idP, frameP, subframeP, rmax, TYPE2, -1) > 0)) {
RA_template->msg2_mpdcch_done = 0;
// MPDCCH configuration for RAR // MPDCCH configuration for RAR
LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2 for CE Level %d, Programming MPDCCH %d repetitions\n", module_idP, frameP, subframeP, RA_template->rach_resource_type-1,reps); LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2 for CE Level %d, Programming MPDCCH %d repetitions\n", module_idP, frameP, subframeP, RA_template->rach_resource_type-1,reps);
...@@ -308,7 +309,9 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s ...@@ -308,7 +309,9 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s
if (RA_template->msg2_mpdcch_repetition_cnt > 0) { // we're in a stream of repetitions if (RA_template->msg2_mpdcch_repetition_cnt > 0) { // we're in a stream of repetitions
if (RA_template->msg2_mpdcch_repetition_cnt == reps) { // this is the last mpdcch repetition if ((RA_template->msg2_mpdcch_repetition_cnt == reps)&&
(RA_template->msg2_mpdcch_done == 0)){ // this is the last mpdcch repetition
RA_template->msg2_mpdcch_done = 1;
if (cc[CC_idP].tdd_Config == NULL) { // FDD case if (cc[CC_idP].tdd_Config == NULL) { // FDD case
// wait 2 subframes for PDSCH transmission // wait 2 subframes for PDSCH transmission
if (subframeP > 7) if (subframeP > 7)
...@@ -329,7 +332,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s ...@@ -329,7 +332,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s
if ((RA_template->Msg2_frame == frameP) && (RA_template->Msg2_subframe == subframeP)) { if ((RA_template->Msg2_frame == frameP) && (RA_template->Msg2_subframe == subframeP)) {
// Program PDSCH // Program PDSCH
LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH %d\n", module_idP, frameP, subframeP); LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n", module_idP, frameP, subframeP);
RA_template->generate_rar = 0; RA_template->generate_rar = 0;
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
...@@ -373,6 +376,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s ...@@ -373,6 +376,7 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s
add_msg3 (module_idP, CC_idP, RA_template, frameP, subframeP); add_msg3 (module_idP, CC_idP, RA_template, frameP, subframeP);
fill_rar_br (eNB, CC_idP, RA_template, frameP, subframeP, cc[CC_idP].RAR_pdu.payload, RA_template->rach_resource_type - 1); fill_rar_br (eNB, CC_idP, RA_template, frameP, subframeP, cc[CC_idP].RAR_pdu.payload, RA_template->rach_resource_type - 1);
// DL request // DL request
LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming TX Req %d\n", module_idP, frameP, subframeP);
eNB->TX_req[CC_idP].sfn_sf = (frameP << 4) + subframeP; eNB->TX_req[CC_idP].sfn_sf = (frameP << 4) + subframeP;
TX_req = &eNB->TX_req[CC_idP].tx_request_body.tx_pdu_list[eNB->TX_req[CC_idP].tx_request_body.number_of_pdus]; TX_req = &eNB->TX_req[CC_idP].tx_request_body.tx_pdu_list[eNB->TX_req[CC_idP].tx_request_body.number_of_pdus];
TX_req->pdu_length = 7; // This should be changed if we have more than 1 preamble TX_req->pdu_length = 7; // This should be changed if we have more than 1 preamble
......
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