Commit 2d97eb4b authored by Raymond Knopp's avatar Raymond Knopp

more debugging of RA procedure for eMTC

parent 97097a8c
...@@ -1065,7 +1065,7 @@ fill_dci_and_dlsch (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, DCI_ALLOC_t * dc ...@@ -1065,7 +1065,7 @@ fill_dci_and_dlsch (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, DCI_ALLOC_t * dc
dlsch0->subframe_tx[subframe] = 1; dlsch0->subframe_tx[subframe] = 1;
if (dlsch0->rnti != rel8->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry if (dlsch0->rnti != rel8->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry
dlsch0_harq->round = 0; dlsch0_harq->round = 0;
dlsch0->harq_mask = 0; dlsch0->harq_mask =0;
} }
if ((dlsch0->harq_mask & (1 << rel8->harq_process)) > 0) { if ((dlsch0->harq_mask & (1 << rel8->harq_process)) > 0) {
if (rel8->new_data_indicator_1 != dlsch0_harq->ndi) if (rel8->new_data_indicator_1 != dlsch0_harq->ndi)
...@@ -2353,30 +2353,42 @@ fill_mdci_and_dlsch (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t * ...@@ -2353,30 +2353,42 @@ fill_mdci_and_dlsch (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t *
dlsch0_harq->dl_power_off = 1; dlsch0_harq->dl_power_off = 1;
dlsch0->active = 1;
dlsch0->harq_mask |= (1 << rel13->harq_process);
dlsch0->subframe_tx[subframe] = 1;
if (dlsch0->rnti != rel13->rnti) { // if rnti of dlsch is not the same as in the config, this is a new entry
dlsch0_harq->round = 0;
dlsch0->harq_mask =0;
}
if ((dlsch0->harq_mask & (1 << rel13->harq_process)) > 0) {
if (rel13->new_data_indicator != dlsch0_harq->ndi)
dlsch0_harq->round = 0;
} else { // process is inactive, so activate and set round to 0
dlsch0_harq->round = 0;
}
dlsch0_harq->ndi = rel13->new_data_indicator;
if (dlsch0_harq->round == 0) { if (dlsch0_harq->round == 0) {
dlsch0_harq->status = ACTIVE; dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",rel8->harq_process);
// MCS and TBS don't change across HARQ rounds // MCS and TBS don't change across HARQ rounds
dlsch0_harq->mcs = rel13->mcs;
dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1]; dlsch0_harq->TBS = TBStable[get_I_TBS (dlsch0_harq->mcs)][dlsch0_harq->nb_rb - 1];
} }
dlsch0->active = 1;
dlsch0->harq_mask |= (1 << rel13->harq_process);
dlsch0->harq_ids[(subframe + 2) % 10] = rel13->harq_process; dlsch0->harq_ids[(subframe + 2) % 10] = rel13->harq_process;
dlsch0_harq->frame = (subframe >= 8) ? ((frame + 1) & 1023) : frame; dlsch0_harq->frame = (subframe >= 8) ? ((frame + 1) & 1023) : frame;
dlsch0_harq->subframe = (subframe + 2) % 10; dlsch0_harq->subframe = (subframe + 2) % 10;
dlsch0->harq_ids[dlsch0_harq->subframe] = rel13->harq_process;
dlsch0_harq->pdsch_start = rel13->start_symbol; dlsch0_harq->pdsch_start = rel13->start_symbol;
LOG_I(PHY,"Setting DLSCH harq %d to active for %d.%d\n",rel13->harq_process,dlsch0_harq->frame,dlsch0_harq->subframe); LOG_I(PHY,"Setting DLSCH harq %d to active for %d.%d\n",rel13->harq_process,dlsch0_harq->frame,dlsch0_harq->subframe);
dlsch0->rnti = rel13->rnti; dlsch0->rnti = rel13->rnti;
dlsch0_harq->Qm = get_Qm(rel13->mcs);
......
This diff is collapsed.
...@@ -214,7 +214,10 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -214,7 +214,10 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
dlsch0->i0 = 0xFFFF; dlsch0->i0 = 0xFFFF;
#endif #endif
dlsch0->active = 1;
harq_pid = dlsch0->harq_ids[proc->subframe_tx]; harq_pid = dlsch0->harq_ids[proc->subframe_tx];
dlsch0->harq_mask |= (1<<harq_pid);
AssertFatal((harq_pid>=0) && (harq_pid<8),"harq_pid %d not in 0...7\n",harq_pid); AssertFatal((harq_pid>=0) && (harq_pid<8),"harq_pid %d not in 0...7\n",harq_pid);
dlsch0_harq = dlsch0->harq_processes[harq_pid]; dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid]; dlsch1_harq = dlsch1->harq_processes[harq_pid];
...@@ -232,8 +235,11 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -232,8 +235,11 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
computeRhoB_eNB(&eNB->pdsch_config_dedicated[UE_id],&(eNB->frame_parms.pdsch_config_common),eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off); computeRhoB_eNB(&eNB->pdsch_config_dedicated[UE_id],&(eNB->frame_parms.pdsch_config_common),eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off);
} }
#ifndef Rel14
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols; dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
#else
dlsch0_harq->pdsch_start = rel10->pdsch_start;
#endif
if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU
AssertFatal(sdu!=NULL,"NFAPI: frame %d, subframe %d: programming dlsch for round 0, rnti %x, UE_id %d, harq_pid %d : sdu is null for pdu_index %d\n", AssertFatal(sdu!=NULL,"NFAPI: frame %d, subframe %d: programming dlsch for round 0, rnti %x, UE_id %d, harq_pid %d : sdu is null for pdu_index %d\n",
proc->frame_tx,proc->subframe_tx,rel8->rnti,UE_id,harq_pid, proc->frame_tx,proc->subframe_tx,rel8->rnti,UE_id,harq_pid,
...@@ -618,7 +624,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -618,7 +624,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
eNB->mpdcch_vars[subframe&1].num_dci = 0; eNB->mpdcch_vars[subframe&1].num_dci = 0;
#endif #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_D(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);
...@@ -638,7 +644,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -638,7 +644,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
} }
for (i=0;i<number_dl_pdu;i++) { for (i=0;i<number_dl_pdu;i++) {
dl_config_pdu = &DL_req->dl_config_request_body.dl_config_pdu_list[i]; dl_config_pdu = &DL_req->dl_config_request_body.dl_config_pdu_list[i];
LOG_I(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type); LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type);
switch (dl_config_pdu->pdu_type) { switch (dl_config_pdu->pdu_type) {
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE: case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
handle_nfapi_dci_dl_pdu(eNB,proc,dl_config_pdu); handle_nfapi_dci_dl_pdu(eNB,proc,dl_config_pdu);
......
...@@ -407,26 +407,29 @@ phy_procedures_eNB_TX (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, relaying_type ...@@ -407,26 +407,29 @@ phy_procedures_eNB_TX (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, relaying_type
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
dlsch0 = eNB->dlsch[(uint8_t) UE_id][0]; dlsch0 = eNB->dlsch[(uint8_t) UE_id][0];
dlsch1 = eNB->dlsch[(uint8_t) UE_id][1]; dlsch1 = eNB->dlsch[(uint8_t) UE_id][1];
//if (dlsch0 && (dlsch0->rnti > 0) && (dlsch0->rnti!=0xFFFF))
if ((dlsch0) && (dlsch0->rnti > 0) && (dlsch0->active == 1)) { if ((dlsch0) && (dlsch0->rnti > 0) && (dlsch0->active == 1)) {
// get harq_pid // get harq_pid
harq_pid = dlsch0->harq_ids[subframe]; harq_pid = dlsch0->harq_ids[subframe];
AssertFatal (harq_pid >= 0, "harq_pid is negative\n"); if (harq_pid >=0 && harq_pid < 8) {
// generate pdsch // generate pdsch
LOG_I(PHY,"SFN %d.%d: DLSCH for rnti %x is active, harq_pid %d => SFN %d.%d\n", if ((dlsch0->rnti !=0xFFFF)) {
LOG_I(PHY,"SFN %d.%d: DLSCH %d for rnti %x is active, harq_pid %d => SFN %d.%d\n",
frame, frame,
subframe, subframe,
UE_id,
dlsch0->rnti, dlsch0->rnti,
harq_pid, harq_pid,
dlsch0->harq_processes[harq_pid]->frame, dlsch0->harq_processes[harq_pid]->frame,
dlsch0->harq_processes[harq_pid]->subframe); dlsch0->harq_processes[harq_pid]->subframe);
}
if ((dlsch0->harq_processes[harq_pid]->status == ACTIVE) && (dlsch0->harq_processes[harq_pid]->frame == frame) && (dlsch0->harq_processes[harq_pid]->subframe == subframe)) if ((dlsch0->harq_processes[harq_pid]->status == ACTIVE) && (dlsch0->harq_processes[harq_pid]->frame == frame) && (dlsch0->harq_processes[harq_pid]->subframe == subframe))
pdsch_procedures (eNB, proc, harq_pid, dlsch0, dlsch1, &eNB->UE_stats[(uint32_t) UE_id], 0); pdsch_procedures (eNB, proc, harq_pid, dlsch0, dlsch1, &eNB->UE_stats[(uint32_t) UE_id], 0);
} }
}
else if ((dlsch0) && (dlsch0->rnti > 0) && (dlsch0->active == 0)) { else if ((dlsch0) && (dlsch0->rnti > 0) && (dlsch0->active == 0)) {
...@@ -1078,7 +1081,7 @@ pusch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) ...@@ -1078,7 +1081,7 @@ pusch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc)
ulsch->cyclicShift = (ulsch_harq->n_DMRS2 + fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift + nPRS) % 12; ulsch->cyclicShift = (ulsch_harq->n_DMRS2 + fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift + nPRS) % 12;
LOG_D (PHY, LOG_I (PHY,
"[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, Qm %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, nprs %d), O_ACK %d, beta_cqi %d \n", "[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, Qm %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, nprs %d), O_ACK %d, beta_cqi %d \n",
eNB->Mod_id, harq_pid, frame, subframe, eNB->Mod_id, harq_pid, frame, subframe,
ulsch_harq->dci_alloc, ulsch_harq->dci_alloc,
...@@ -1103,7 +1106,7 @@ pusch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) ...@@ -1103,7 +1106,7 @@ pusch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc)
stop_meas (&eNB->ulsch_decoding_stats); stop_meas (&eNB->ulsch_decoding_stats);
LOG_D (PHY, "[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d\n", eNB->Mod_id, harq_pid, frame, subframe, ulsch->rnti, dB_fixed (eNB->pusch_vars[i]->ulsch_power[0]), dB_fixed (eNB->pusch_vars[i]->ulsch_power[1]), 20, //eNB->measurements.n0_power_dB[0], LOG_I (PHY, "[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d\n", eNB->Mod_id, harq_pid, frame, subframe, ulsch->rnti, dB_fixed (eNB->pusch_vars[i]->ulsch_power[0]), dB_fixed (eNB->pusch_vars[i]->ulsch_power[1]), 20, //eNB->measurements.n0_power_dB[0],
20, //eNB->measurements.n0_power_dB[1], 20, //eNB->measurements.n0_power_dB[1],
ulsch_harq->o_ACK[0], ulsch_harq->o_ACK[1], ret); ulsch_harq->o_ACK[0], ulsch_harq->o_ACK[1], ret);
......
...@@ -85,9 +85,9 @@ add_msg3 (module_id_t module_idP, int CC_id, RA_TEMPLATE * RA_template, frame_t ...@@ -85,9 +85,9 @@ add_msg3 (module_id_t module_idP, int CC_id, RA_TEMPLATE * RA_template, frame_t
#ifdef Rel14 #ifdef Rel14
if (RA_template->rach_resource_type > 0) { if (RA_template->rach_resource_type > 0) {
LOG_D (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n", LOG_I (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n",
module_idP, frameP, subframeP, CC_id, RA_template->rach_resource_type - 1, RA_template->Msg3_frame, RA_template->Msg3_subframe); module_idP, frameP, subframeP, CC_id, RA_template->rach_resource_type - 1, RA_template->Msg3_frame, RA_template->Msg3_subframe);
LOG_D (MAC, "Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d)\n", LOG_I (MAC, "Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d)\n",
frameP, subframeP, RA_template->Msg3_frame, RA_template->Msg3_subframe, RA_template->msg3_nb_rb, RA_template->msg3_round); frameP, subframeP, RA_template->Msg3_frame, RA_template->Msg3_subframe, RA_template->msg3_nb_rb, RA_template->msg3_round);
ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus]; ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus];
...@@ -371,10 +371,10 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s ...@@ -371,10 +371,10 @@ generate_Msg2 (module_id_t module_idP, int CC_idP, frame_t frameP, sub_frame_t s
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.drms_table_flag = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.drms_table_flag = 0;
dl_req->number_pdu++; dl_req->number_pdu++;
// Program UL processing for Msg3, same as regular LTE fill_rar_br (eNB, CC_idP, RA_template, frameP, subframeP, cc[CC_idP].RAR_pdu.payload, RA_template->rach_resource_type - 1) ;
// Program UL processing for Msg3, same as regular LTE
get_Msg3alloc (&cc[CC_idP], subframeP, frameP, &RA_template->Msg3_frame, &RA_template->Msg3_subframe); get_Msg3alloc (&cc[CC_idP], subframeP, frameP, &RA_template->Msg3_frame, &RA_template->Msg3_subframe);
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);
// 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); 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;
......
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