Commit 3a2f4c79 authored by sharma's avatar sharma

debugging of Msg4

parent 500e826c
......@@ -2168,9 +2168,6 @@ fill_mdci_and_dlsch (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t *
dci_alloc->dmrs_scrambling_init = rel13->drms_scrambling_init;
dci_alloc->i0 = rel13->initial_transmission_sf_io;
dci_alloc->ra_flag = 0;
if (rel13->rnti_type == 2)
dci_alloc->ra_flag = 1;
UE_id = find_dlsch (rel13->rnti, eNB, SEARCH_EXIST_OR_FREE);
AssertFatal (UE_id != -1, "no free or exiting dlsch_context\n");
......@@ -2178,6 +2175,14 @@ fill_mdci_and_dlsch (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t *
dlsch0 = eNB->dlsch[UE_id][0];
dlsch0_harq = dlsch0->harq_processes[rel13->harq_process];
dci_alloc->ra_flag = 0;
dlsch0->ra_flag = 0;
if (rel13->rnti_type == 2) {
dci_alloc->ra_flag = 1;
dlsch0->ra_flag = 1;
}
AssertFatal (fp->frame_type == FDD, "TDD is not supported yet for eMTC\n");
AssertFatal (fp->N_RB_DL == 25 || fp->N_RB_DL == 50 || fp->N_RB_DL == 100, "eMTC only with N_RB_DL = 25,50,100\n");
......@@ -2400,10 +2405,10 @@ fill_mdci_and_dlsch (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t *
dlsch0->active = 1;
dlsch0->harq_mask |= (1 << rel13->harq_process);
dlsch0->harq_ids[(subframe + 2) % 10] = rel13->harq_process;
dlsch0_harq->frame = (subframe >= 8) ? ((frame + 1) & 1023) : frame;
dlsch0_harq->subframe = (subframe + 2) % 10;
LOG_I(PHY,"Setting DLSCH harq_ids[%d] to %d\n",dlsch0_harq->subframe,dlsch0->harq_ids[dlsch0_harq->subframe]);
dlsch0->harq_ids[dlsch0_harq->subframe] = rel13->harq_process;
dlsch0_harq->pdsch_start = rel13->start_symbol;
......
......@@ -273,6 +273,8 @@ typedef struct {
uint16_t rnti;
/// Active flag for baseband transmitter processing
uint8_t active;
/// flag to indicate that this DLSCH is for RAR
uint8_t ra_flag;
/// HARQ process mask, indicates which processes are currently active
uint16_t harq_mask;
/// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK.
......
......@@ -388,9 +388,10 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
((int16_t *) & yIQ)[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
e_ptr++;
txF[mpdcchtab[i]] = yIQ;
/*
LOG_D(PHY,"Frame %d, subframe %d: mpdcch pos %d (%d,%d) => (%d,%d)\n",
frame,subframe,i,mpdcchtab[i]+re_offset,mpdcchtab[i]/fp->ofdm_symbol_size,
((int16_t *) & yIQ)[0],((int16_t *) & yIQ)[1]);
((int16_t *) & yIQ)[0],((int16_t *) & yIQ)[1]);*/
}
if (mdci->transmission_type == 1) w=0; // distributed
......@@ -461,11 +462,11 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
else
txF[off+(5*mprime)] = yIQ*w[3-lprime];
}
/*
LOG_I(PHY, "mpdcch_dmrs pos (dist %d, l %d,nprb %d,mprime %d) %d => (%d,%d)\n",
mdci->transmission_type, soffset[lprime],nprb,mprime,
re_offset + fp->ofdm_symbol_size*soffset[lprime]+(5*mprime),
((int16_t *) & yIQ)[0], ((int16_t *) & yIQ)[1]);
((int16_t *) & yIQ)[0], ((int16_t *) & yIQ)[1]);*/
} // narrowband condition
} // RE (m') loop
} // nprb loop
......
......@@ -218,7 +218,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
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),"subframe %d: harq_pid %d not in 0...7\n",proc->subframe_tx,harq_pid);
dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid];
AssertFatal(dlsch0_harq!=NULL,"dlsch_harq is null\n");
......@@ -381,7 +381,7 @@ void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_co
uci->n_pucch_3[0] = harq_information->harq_information_rel9_fdd.n_pucch_1_0;
uci->n_pucch_3[1] = harq_information->harq_information_rel11.n_pucch_2_0;
}
else AssertFatal(1==0,"unsupported HARQ mode %d\n",harq_information->harq_information_rel9_fdd.ack_nack_mode);
else AssertFatal(1==0,"unsupported FDD HARQ mode %d size %d\n",harq_information->harq_information_rel9_fdd.ack_nack_mode,harq_information->harq_information_rel9_fdd.harq_size);
}
else { // TDD
uci->num_pucch_resources = harq_information->harq_information_rel10_tdd.number_of_pucch_resources;
......
......@@ -265,9 +265,9 @@ pdsch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, int harq_pid, LTE_
stop_meas (&eNB->dlsch_modulation_stats);
dlsch->active = 0;
dlsch_harq->round++;
if (dlsch->rnti == 0xFFFF)
dlsch->harq_mask = 0;
if (dlsch->rnti == 0xFFFF || dlsch->ra_flag == 1) dlsch->harq_mask = 0; // clear the harq mask for SI and RA-RNTI
else dlsch_harq->round++; //increment the round index for CRNTI and t-CRNTI
}
......
......@@ -914,13 +914,16 @@ typedef struct {
int msg4_TBsize;
/// MCS used for Msg4
int msg4_mcs;
/// size off piggybacked RRC SDU
uint8_t msg4_rrc_sdu_length;
#ifdef Rel14
uint8_t rach_resource_type;
uint8_t msg2_mpdcch_repetition_cnt;
uint8_t msg2_mpdcch_done;
uint8_t msg4_mpdcch_repetition_cnt;
uint8_t msg4_mpdcch_done;
uint8_t msg2_narrowband;
uint8_t msg34_narrowband;
uint32_t msg34_narrowband;
#endif
} RA_TEMPLATE;
......
This diff is collapsed.
......@@ -139,8 +139,8 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
uint8_t *rar = (uint8_t *)(dlsch_buffer+1);
int i;
uint8_t rballoc,reps;
uint8_t mcs,TPC,ULdelay,cqireq,mpdcch_nb_index;
uint32_t rballoc,reps;
uint32_t mcs,TPC,ULdelay,cqireq,mpdcch_nb_index;
int input_buffer_length;
......@@ -178,7 +178,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
mpdcch_nb_index = 0;
rballoc = mac_computeRIV(6,RA_template->msg3_first_rb,RA_template->msg3_nb_rb);
unsigned int buffer = 0;
uint32_t buffer = 0;
buffer |= RA_template->msg34_narrowband << (16 + (4 - N_NB_index));
buffer |= ((rballoc & 0xFF) << (12 + (4 - N_NB_index)));
buffer |= ((reps & 0x03) << (10 + (4 - N_NB_index)));
......
......@@ -3778,6 +3778,7 @@ rrc_eNB_generate_RRCConnectionSetup(
SRB_configList = &ue_context_pP->ue_context.SRB_configList;
#ifdef Rel14
if (is_mtc) {
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size =
do_RRCConnectionSetup_BR(ctxt_pP,
ue_context_pP,
CC_id,
......
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