Commit 3c1c5a15 authored by sharma's avatar sharma

merge in changes from local copy which were made just prior to Orange Research Day demonstration

parent f32355c7
...@@ -2696,18 +2696,19 @@ fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t * dci ...@@ -2696,18 +2696,19 @@ fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t * dci
AssertFatal(1==0,"TDD not supported for eMTC yet\n"); AssertFatal(1==0,"TDD not supported for eMTC yet\n");
} else { } else {
dci_alloc->dci_length = sizeof_DCI6_0A_5MHz_t; dci_alloc->dci_length = sizeof_DCI6_0A_5MHz_t;
((DCI6_0A_10MHz_t *) dci_pdu)->type = 0; ((DCI6_0A_5MHz_t *) dci_pdu)->type = 0;
((DCI6_0A_10MHz_t *) dci_pdu)->hopping = hopping; ((DCI6_0A_5MHz_t *) dci_pdu)->hopping = hopping;
((DCI6_0A_10MHz_t *) dci_pdu)->rballoc = rballoc; ((DCI6_0A_5MHz_t *) dci_pdu)->rballoc = rballoc;
((DCI6_0A_10MHz_t *) dci_pdu)->mcs = mcs; ((DCI6_0A_5MHz_t *) dci_pdu)->narrowband = narrowband;
((DCI6_0A_10MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels; ((DCI6_0A_5MHz_t *) dci_pdu)->mcs = mcs;
((DCI6_0A_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process; ((DCI6_0A_5MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
((DCI6_0A_10MHz_t *) dci_pdu)->ndi = ndi; ((DCI6_0A_5MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
((DCI6_0A_10MHz_t *) dci_pdu)->rv_idx = rel13->redudency_version; ((DCI6_0A_5MHz_t *) dci_pdu)->ndi = ndi;
((DCI6_0A_10MHz_t *) dci_pdu)->TPC = TPC; ((DCI6_0A_5MHz_t *) dci_pdu)->rv_idx = rel13->redudency_version;
((DCI6_0A_10MHz_t *) dci_pdu)->csi_req = cqi_req; ((DCI6_0A_5MHz_t *) dci_pdu)->TPC = TPC;
((DCI6_0A_10MHz_t *) dci_pdu)->srs_req = rel13->srs_request; ((DCI6_0A_5MHz_t *) dci_pdu)->csi_req = cqi_req;
((DCI6_0A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number; ((DCI6_0A_5MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
((DCI6_0A_5MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
} }
...@@ -2721,6 +2722,7 @@ fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t * dci ...@@ -2721,6 +2722,7 @@ fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t * dci
((DCI6_0A_10MHz_t *) dci_pdu)->type = 0; ((DCI6_0A_10MHz_t *) dci_pdu)->type = 0;
((DCI6_0A_10MHz_t *) dci_pdu)->hopping = hopping; ((DCI6_0A_10MHz_t *) dci_pdu)->hopping = hopping;
((DCI6_0A_10MHz_t *) dci_pdu)->rballoc = rballoc; ((DCI6_0A_10MHz_t *) dci_pdu)->rballoc = rballoc;
((DCI6_0A_10MHz_t *) dci_pdu)->narrowband = narrowband;
((DCI6_0A_10MHz_t *) dci_pdu)->mcs = mcs; ((DCI6_0A_10MHz_t *) dci_pdu)->mcs = mcs;
((DCI6_0A_10MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels; ((DCI6_0A_10MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
((DCI6_0A_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process; ((DCI6_0A_10MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
...@@ -2759,6 +2761,7 @@ fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t * dci ...@@ -2759,6 +2761,7 @@ fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, mDCI_ALLOC_t * dci
((DCI6_0A_20MHz_t *) dci_pdu)->type = 0; ((DCI6_0A_20MHz_t *) dci_pdu)->type = 0;
((DCI6_0A_20MHz_t *) dci_pdu)->hopping = hopping; ((DCI6_0A_20MHz_t *) dci_pdu)->hopping = hopping;
((DCI6_0A_20MHz_t *) dci_pdu)->rballoc = rballoc; ((DCI6_0A_20MHz_t *) dci_pdu)->rballoc = rballoc;
((DCI6_0A_20MHz_t *) dci_pdu)->narrowband = narrowband;
((DCI6_0A_20MHz_t *) dci_pdu)->mcs = rel13->mcs; ((DCI6_0A_20MHz_t *) dci_pdu)->mcs = rel13->mcs;
((DCI6_0A_20MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels; ((DCI6_0A_20MHz_t *) dci_pdu)->rep = rel13->pusch_repetition_levels;
((DCI6_0A_20MHz_t *) dci_pdu)->harq_pid = rel13->harq_process; ((DCI6_0A_20MHz_t *) dci_pdu)->harq_pid = rel13->harq_process;
......
...@@ -321,10 +321,12 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, ...@@ -321,10 +321,12 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
} else } else
AssertFatal(1 == 0, "Illegal combination start_symbol %d, a_index %d\n", mdci->start_symbol, a_index); AssertFatal(1 == 0, "Illegal combination start_symbol %d, a_index %d\n", mdci->start_symbol, a_index);
LOG_I(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, i0 %d, ss %d ,coded_bits %d\n", LOG_I(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, transmission type %s, i0 %d, ss %d ,coded_bits %d\n",
i, mdci->dci_length,mdci->rnti, i, mdci->dci_length,mdci->rnti,
mdci->L, mdci->number_of_prb_pairs, mdci->L, mdci->number_of_prb_pairs,
mdci->ce_mode, mdci->i0, mdci->start_symbol, mdci->ce_mode,
mdci->transmission_type == 1? "dist" : "loc",
mdci->i0, mdci->start_symbol,
coded_bits); coded_bits);
// Note: We only have to run this every Nacc subframes during repetitions, data and scrambling are constant, but we do it for now to simplify during testing // Note: We only have to run this every Nacc subframes during repetitions, data and scrambling are constant, but we do it for now to simplify during testing
......
...@@ -56,7 +56,9 @@ struct DCI6_0A_5MHz { ...@@ -56,7 +56,9 @@ struct DCI6_0A_5MHz {
/// Modulation and Coding Scheme and Redundancy Version /// Modulation and Coding Scheme and Redundancy Version
uint32_t mcs:4; uint32_t mcs:4;
/// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits) /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
uint32_t rballoc:7; uint32_t rballoc:5;
/// narrowband index log2(floor(N_RB_DL/6))) bits
uint32_t narrowband:2;
/// Hopping flag /// Hopping flag
uint32_t hopping:1; uint32_t hopping:1;
/// type = 0 => DCI Format 0, type = 1 => DCI Format 1A /// type = 0 => DCI Format 0, type = 1 => DCI Format 1A
...@@ -90,7 +92,7 @@ struct DCI6_1A_5MHz { ...@@ -90,7 +92,7 @@ struct DCI6_1A_5MHz {
uint32_t mcs:4; uint32_t mcs:4;
/// Resource block assignment (assignment flag = 0 for 5 MHz, ceil(log2(floor(N_RB_DL/6)))+5) /// Resource block assignment (assignment flag = 0 for 5 MHz, ceil(log2(floor(N_RB_DL/6)))+5)
uint32_t rballoc:5; uint32_t rballoc:5;
/// narroband index log2(floor(N_RB_DL/6))) bits /// narrowband index log2(floor(N_RB_DL/6))) bits
uint32_t narrowband:2; uint32_t narrowband:2;
/// Frequency hopping flag /// Frequency hopping flag
uint32_t hopping:1; uint32_t hopping:1;
...@@ -125,7 +127,7 @@ struct DCI6_0A_10MHz { ...@@ -125,7 +127,7 @@ struct DCI6_0A_10MHz {
uint32_t mcs:4; uint32_t mcs:4;
/// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits) /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
uint32_t rballoc:5; uint32_t rballoc:5;
/// narroband index log2(floor(N_RB_DL/6))) bits /// narrowband index log2(floor(N_RB_DL/6))) bits
uint32_t narrowband:3; uint32_t narrowband:3;
/// Hopping flag /// Hopping flag
uint32_t hopping:1; uint32_t hopping:1;
...@@ -160,7 +162,7 @@ struct DCI6_1A_10MHz { ...@@ -160,7 +162,7 @@ struct DCI6_1A_10MHz {
uint32_t mcs:4; uint32_t mcs:4;
/// Resource block assignment /// Resource block assignment
uint32_t rballoc:5; uint32_t rballoc:5;
/// narroband index log2(floor(N_RB_DL/6))) bits /// narrowband index log2(floor(N_RB_DL/6))) bits
uint32_t narrowband:3; uint32_t narrowband:3;
/// Frequency hopping flag /// Frequency hopping flag
uint32_t hopping:1; uint32_t hopping:1;
...@@ -195,7 +197,7 @@ struct DCI6_0A_20MHz { ...@@ -195,7 +197,7 @@ struct DCI6_0A_20MHz {
uint32_t mcs:4; uint32_t mcs:4;
/// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits) /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
uint32_t rballoc:5; uint32_t rballoc:5;
/// narroband index log2(floor(N_RB_DL/6))) bits /// narrowband index log2(floor(N_RB_DL/6))) bits
uint32_t narrowband:4; uint32_t narrowband:4;
/// Hopping flag /// Hopping flag
uint32_t hopping:1; uint32_t hopping:1;
...@@ -230,7 +232,7 @@ struct DCI6_1A_20MHz { ...@@ -230,7 +232,7 @@ struct DCI6_1A_20MHz {
uint32_t mcs:4; uint32_t mcs:4;
/// Resource block assignment (assignment flag = 0 for 20 MHz, ceil(log2(floor(N_RB_DL/6)))+5) /// Resource block assignment (assignment flag = 0 for 20 MHz, ceil(log2(floor(N_RB_DL/6)))+5)
uint32_t rballoc:5; uint32_t rballoc:5;
/// narroband index log2(floor(N_RB_DL/6))) bits /// narrowband index log2(floor(N_RB_DL/6))) bits
uint32_t narrowband:4; uint32_t narrowband:4;
/// Frequency hopping flag /// Frequency hopping flag
uint32_t hopping:1; uint32_t hopping:1;
......
...@@ -2431,9 +2431,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -2431,9 +2431,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
} // aa } // aa
LOG_I(PHY,"PUCCH 1a/b: SFN.SF %d.%d : stat %d,%d (pos %d)\n", LOG_I(PHY,"PUCCH 1a/b: SFN.SF %d.%d : stat %d,%d (pos %d), n1_pucch %d\n",
frame,subframe,stat_re,stat_im, frame,subframe,stat_re,stat_im,
(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])); (subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]),n1_pucch);
LOG_D(PHY,"PUCCH 1a/b: SFN.SF %d.%d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",frame,subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_D(PHY,"PUCCH 1a/b: SFN.SF %d.%d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",frame,subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re); eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
...@@ -2448,7 +2448,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -2448,7 +2448,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
if (fmt==pucch_format1b) if (fmt==pucch_format1b)
*(1+payload) = (stat_im<0) ? 1 : 2; *(1+payload) = (stat_im<0) ? 1 : 2;
} else { // insufficient energy on PUCCH so NAK } else { // insufficient energy on PUCCH so NAK
LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_I(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d => DTX (n1_pucch %d)\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres,n1_pucch);
*payload = 4; // DTX *payload = 4; // DTX
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re); ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im); ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
......
...@@ -654,7 +654,11 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -654,7 +654,11 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
if (ul_subframe<10) { // This means that there is an ul_subframe that can be configured here if (ul_subframe<10) { // This means that there is an ul_subframe that can be configured here
LOG_D(PHY,"NFAPI: Clearing dci allocations for potential UL\n"); LOG_D(PHY,"NFAPI: Clearing dci allocations for potential UL\n");
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
if (eNB->ulsch[i]->ue_type == 0)
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
else
harq_pid = 0;
// clear DCI allocation maps for new subframe // clear DCI allocation maps for new subframe
......
...@@ -328,7 +328,13 @@ phy_procedures_eNB_TX (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, relaying_type ...@@ -328,7 +328,13 @@ phy_procedures_eNB_TX (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, relaying_type
/* save old HARQ information needed for PHICH generation */ /* save old HARQ information needed for PHICH generation */
if (ul_subframe < 10) { // This means that there is a potential UL subframe that will be scheduled here if (ul_subframe < 10) { // This means that there is a potential UL subframe that will be scheduled here
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
harq_pid = subframe2harq_pid (fp, ul_frame, ul_subframe); #ifdef Rel14
if (eNB->ulsch[i]->ue_type >0) harq_pid = 0;
else
#endif
harq_pid = subframe2harq_pid (fp, ul_frame, ul_subframe);
if (eNB->ulsch[i]) { if (eNB->ulsch[i]) {
ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid]; ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid];
...@@ -410,6 +416,13 @@ phy_procedures_eNB_TX (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, relaying_type ...@@ -410,6 +416,13 @@ phy_procedures_eNB_TX (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc, relaying_type
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]->frame > frame) { // remote stale DLSCH
LOG_W(PHY,"Removing stale DLSCH\n");
dlsch0->active = 0;
dlsch0->harq_processes[harq_pid]->status = SCH_IDLE;
dlsch0->harq_mask &= ~(1 << harq_pid);
}*/
} }
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);
...@@ -525,7 +538,7 @@ prach_procedures (PHY_VARS_eNB * eNB, ...@@ -525,7 +538,7 @@ prach_procedures (PHY_VARS_eNB * eNB,
eNB->preamble_list_br[ind].preamble_rel8.rnti = 1 + subframe + (60*(eNB->prach_vars_br.first_frame[ce_level] % 40)); eNB->preamble_list_br[ind].preamble_rel8.rnti = 1 + subframe + (60*(eNB->prach_vars_br.first_frame[ce_level] % 40));
eNB->preamble_list_br[ind].instance_length = 0; //don't know exactly what this is eNB->preamble_list_br[ind].instance_length = 0; //don't know exactly what this is
eNB->preamble_list_br[ind].preamble_rel13.rach_resource_type = 1 + ce_level; // CE Level eNB->preamble_list_br[ind].preamble_rel13.rach_resource_type = 1 + ce_level; // CE Level
LOG_D (PHY, "Filling NFAPI indication for RACH %d CELevel %d (mask %x) : TA %d, Preamble %d, rnti %x, rach_resource_type %d\n", LOG_I (PHY, "Filling NFAPI indication for RACH %d CELevel %d (mask %x) : TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
ind, ind,
ce_level, ce_level,
prach_mask, prach_mask,
...@@ -541,7 +554,7 @@ prach_procedures (PHY_VARS_eNB * eNB, ...@@ -541,7 +554,7 @@ prach_procedures (PHY_VARS_eNB * eNB,
#endif #endif
{ {
if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0 + 200)) { if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0 + 2000)) {
LOG_D (PHY, "[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", LOG_D (PHY, "[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
eNB->Mod_id, eNB->CC_id, frame, subframe, max_preamble[0], max_preamble_energy[0] / 10, max_preamble_energy[0] % 10, max_preamble_delay[0]); eNB->Mod_id, eNB->CC_id, frame, subframe, max_preamble[0], max_preamble_energy[0] / 10, max_preamble_energy[0] % 10, max_preamble_delay[0]);
...@@ -704,7 +717,7 @@ uci_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) ...@@ -704,7 +717,7 @@ uci_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc)
} }
case HARQ: case HARQ:
if (fp->frame_type == FDD) { if (fp->frame_type == FDD) {
LOG_D (PHY, "Frame %d Subframe %d Demodulating PUCCH (UCI %d) for ACK/NAK (uci->pucch_fmt %d,uci->type %d.uci->frame %d, uci->subframe %d): n1_pucch0 %d SR_payload %d\n", LOG_I (PHY, "Frame %d Subframe %d Demodulating PUCCH (UCI %d) for ACK/NAK (uci->pucch_fmt %d,uci->type %d.uci->frame %d, uci->subframe %d): n1_pucch0 %d SR_payload %d\n",
frame, subframe, i, uci->pucch_fmt, uci->type, uci->frame, uci->subframe, uci->n_pucch_1[0][0], SR_payload); frame, subframe, i, uci->pucch_fmt, uci->type, uci->frame, uci->subframe, uci->n_pucch_1[0][0], SR_payload);
metric[0] = rx_pucch (eNB, uci->pucch_fmt, i, uci->n_pucch_1[0][0], 0, //n2_pucch metric[0] = rx_pucch (eNB, uci->pucch_fmt, i, uci->n_pucch_1[0][0], 0, //n2_pucch
...@@ -736,7 +749,7 @@ uci_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) ...@@ -736,7 +749,7 @@ uci_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc)
} }
LOG_D (PHY, "[eNB %d][PDSCH %x] Frame %d subframe %d pucch1a (FDD) payload %d (metric %d)\n", eNB->Mod_id, uci->rnti, frame, subframe, pucch_b0b1[0][0], metric[0]); LOG_I (PHY, "[eNB %d][PDSCH %x] Frame %d subframe %d pucch1a (FDD) payload %d (metric %d)\n", eNB->Mod_id, uci->rnti, frame, subframe, pucch_b0b1[0][0], metric[0]);
uci->stat = metric[0]; uci->stat = metric[0];
fill_uci_harq_indication (eNB, uci, frame, subframe, pucch_b0b1[0], 0, 0xffff); fill_uci_harq_indication (eNB, uci, frame, subframe, pucch_b0b1[0], 0, 0xffff);
...@@ -1122,26 +1135,19 @@ pusch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) ...@@ -1122,26 +1135,19 @@ pusch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc)
//compute the expected ULSCH RX power (for the stats) //compute the expected ULSCH RX power (for the stats)
ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB (eNB, i, harq_pid, 0); // 0 means bw_factor is not considered ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB (eNB, i, harq_pid, 0); // 0 means bw_factor is not considered
if (ulsch_harq->cqi_crc_status == 1) {
#ifdef DEBUG_PHY_PROC
//if (((frame%10) == 0) || (frame < 50))
print_CQI (ulsch_harq->o, ulsch_harq->uci_format, 0, fp->N_RB_DL);
#endif
fill_ulsch_cqi_indication (eNB, frame, subframe, ulsch_harq, ulsch->rnti);
}
if (ret == (1 + MAX_TURBO_ITERATIONS)) { if (ret == (1 + MAX_TURBO_ITERATIONS)) {
T (T_ENB_PHY_ULSCH_UE_NACK, T_INT (eNB->Mod_id), T_INT (frame), T_INT (subframe), T_INT (ulsch->rnti), T_INT (harq_pid)); T (T_ENB_PHY_ULSCH_UE_NACK, T_INT (eNB->Mod_id), T_INT (frame), T_INT (subframe), T_INT (ulsch->rnti), T_INT (harq_pid));
fill_crc_indication (eNB, i, frame, subframe, 1); // indicate NAK to MAC fill_crc_indication (eNB, i, frame, subframe, 1); // indicate NAK to MAC
fill_rx_indication (eNB, i, frame, subframe); // indicate SDU to MAC fill_rx_indication (eNB, i, frame, subframe); // indicate SDU to MAC
LOG_I (PHY, "[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n", /*LOG_I (PHY, "[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n",
eNB->Mod_id, harq_pid, frame, subframe, i, ulsch_harq->round - 1, ulsch->Mlimit, ulsch_harq->o_ACK[0], ulsch_harq->o_ACK[1]); eNB->Mod_id, harq_pid, frame, subframe, i, ulsch_harq->round - 1, ulsch->Mlimit, ulsch_harq->o_ACK[0], ulsch_harq->o_ACK[1]);
dump_ulsch(eNB,frame,subframe,i); dump_ulsch(eNB,frame,subframe,i);
exit(-1); exit(-1);
*/
if (ulsch_harq->round >= 3) { if (ulsch_harq->round >= 3) {
ulsch_harq->status = SCH_IDLE; ulsch_harq->status = SCH_IDLE;
ulsch_harq->handled = 0; ulsch_harq->handled = 0;
...@@ -1190,6 +1196,15 @@ pusch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) ...@@ -1190,6 +1196,15 @@ pusch_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc)
LOG_D (PHY, "[eNB %d] Frame %d subframe %d: received ULSCH harq_pid %d for UE %d, ret = %d, CQI CRC Status %d, ACK %d,%d, ulsch_errors %d/%d\n", LOG_D (PHY, "[eNB %d] Frame %d subframe %d: received ULSCH harq_pid %d for UE %d, ret = %d, CQI CRC Status %d, ACK %d,%d, ulsch_errors %d/%d\n",
eNB->Mod_id, frame, subframe, eNB->Mod_id, frame, subframe,
harq_pid, i, ret, ulsch_harq->cqi_crc_status, ulsch_harq->o_ACK[0], ulsch_harq->o_ACK[1], eNB->UE_stats[i].ulsch_errors[harq_pid], eNB->UE_stats[i].ulsch_decoding_attempts[harq_pid][0]); harq_pid, i, ret, ulsch_harq->cqi_crc_status, ulsch_harq->o_ACK[0], ulsch_harq->o_ACK[1], eNB->UE_stats[i].ulsch_errors[harq_pid], eNB->UE_stats[i].ulsch_decoding_attempts[harq_pid][0]);
if (ulsch_harq->cqi_crc_status == 1) {
#ifdef DEBUG_PHY_PROC
//if (((frame%10) == 0) || (frame < 50))
print_CQI (ulsch_harq->o, ulsch_harq->uci_format, 0, fp->N_RB_DL);
#endif
fill_ulsch_cqi_indication (eNB, frame, subframe, ulsch_harq, ulsch->rnti);
}
} // if ((ulsch) && } // if ((ulsch) &&
// (ulsch->rnti>0) && // (ulsch->rnti>0) &&
// (ulsch_harq->status == ACTIVE)) // (ulsch_harq->status == ACTIVE))
......
...@@ -650,6 +650,10 @@ typedef struct { ...@@ -650,6 +650,10 @@ typedef struct {
uint8_t mcs_UL[8]; uint8_t mcs_UL[8];
/// TBS from last UL scheduling /// TBS from last UL scheduling
uint8_t TBS_UL[8]; uint8_t TBS_UL[8];
/// CQI_req from last scheduling
uint8_t oldCQI_UL[8];
/// TPC from last scheduling
uint8_t oldTPC_UL[8];
/// Flag to indicate UL has been scheduled at least once /// Flag to indicate UL has been scheduled at least once
boolean_t ul_active; boolean_t ul_active;
/// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received) /// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
...@@ -816,6 +820,7 @@ typedef struct { ...@@ -816,6 +820,7 @@ typedef struct {
int32_t phr_received; int32_t phr_received;
uint8_t periodic_ri_received[NFAPI_CC_MAX]; uint8_t periodic_ri_received[NFAPI_CC_MAX];
uint8_t aperiodic_ri_received[NFAPI_CC_MAX]; uint8_t aperiodic_ri_received[NFAPI_CC_MAX];
uint32_t pucch_tpc_accumulated[NFAPI_CC_MAX];
uint8_t pucch1_cqi_update[NFAPI_CC_MAX]; uint8_t pucch1_cqi_update[NFAPI_CC_MAX];
uint8_t pucch1_snr[NFAPI_CC_MAX]; uint8_t pucch1_snr[NFAPI_CC_MAX];
uint8_t pucch2_cqi_update[NFAPI_CC_MAX]; uint8_t pucch2_cqi_update[NFAPI_CC_MAX];
......
...@@ -533,7 +533,10 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame ...@@ -533,7 +533,10 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
schedule_SR(module_idP,frameP,subframeP); schedule_SR(module_idP,frameP,subframeP);
// This schedules UCI_CSI in subframeP // This schedules UCI_CSI in subframeP
schedule_CSI(module_idP, frameP, subframeP); schedule_CSI(module_idP, frameP, subframeP);
#ifdef Rel14
// This schedules DLSCH in subframeP
schedule_ue_spec_br(module_idP,frameP,subframeP);
#endif
// This schedules DLSCH in subframeP // This schedules DLSCH in subframeP
schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
......
This diff is collapsed.
This diff is collapsed.
...@@ -3072,6 +3072,9 @@ void extract_harq(module_id_t mod_idP,int CC_idP,int UE_id,frame_t frameP,sub_fr ...@@ -3072,6 +3072,9 @@ void extract_harq(module_id_t mod_idP,int CC_idP,int UE_id,frame_t frameP,sub_fr
uint8_t harq_pid = ((10*frameP) + subframeP + 10236)&7; uint8_t harq_pid = ((10*frameP) + subframeP + 10236)&7;
// use 1 HARQ proces of BL/CE UE for now
if (UE_list->UE_template[pCCid][UE_id].rach_resource_type > 0) harq_pid = 0;
switch (harq_indication_fdd->mode) { switch (harq_indication_fdd->mode) {
case 0: // Format 1a/b (10.1.2.1) case 0: // Format 1a/b (10.1.2.1)
AssertFatal(numCC==1,"numCC %d > 1, should not be using Format1a/b\n",numCC); AssertFatal(numCC==1,"numCC %d > 1, should not be using Format1a/b\n",numCC);
......
This diff is collapsed.
...@@ -2503,7 +2503,7 @@ do_RRCConnectionSetup_BR( ...@@ -2503,7 +2503,7 @@ do_RRCConnectionSetup_BR(
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex = 18;//ue_context_pP->local_uid; physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex = 18;//ue_context_pP->local_uid;
if (carrier->sib1->tdd_Config == NULL) { // FDD if (carrier->sib1->tdd_Config == NULL) { // FDD
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 5+(ue_context_pP->local_uid%10); // Isr = 5 (every 10 subframes, offset=2+UE_id mod3) physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 76+(ue_context_pP->local_uid%10); // Isr = 76 (every 80 subframes, offset=2+UE_id mod3)
} else { } else {
switch (carrier->sib1->tdd_Config->subframeAssignment) { switch (carrier->sib1->tdd_Config->subframeAssignment) {
case 1: case 1:
......
...@@ -332,7 +332,7 @@ rrc_rx_tx( ...@@ -332,7 +332,7 @@ rrc_rx_tx(
// check for UL failure // check for UL failure
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) { RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) {
LOG_I(RRC,"SFN.SN %d.%d => release timer %d/%d\n",ctxt_pP->frame,ctxt_pP->subframe, LOG_D(RRC,"SFN.SN %d.%d => release timer %d/%d\n",ctxt_pP->frame,ctxt_pP->subframe,
ue_context_p->ue_context.ue_release_timer,ue_context_p->ue_context.ue_release_timer_thres); ue_context_p->ue_context.ue_release_timer,ue_context_p->ue_context.ue_release_timer_thres);
if ((ctxt_pP->frame == 0) && (ctxt_pP->subframe==0)) { if ((ctxt_pP->frame == 0) && (ctxt_pP->subframe==0)) {
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) { if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) {
......
...@@ -1154,7 +1154,7 @@ rrc_eNB_generate_RRCConnectionRelease( ...@@ -1154,7 +1154,7 @@ rrc_eNB_generate_RRCConnectionRelease(
// set release timer // set release timer
ue_context_pP->ue_context.ue_release_timer=1; ue_context_pP->ue_context.ue_release_timer=1;
// remove UE after 10 frames after RRCConnectionRelease is triggered // remove UE after 10 frames after RRCConnectionRelease is triggered
ue_context_pP->ue_context.ue_release_timer_thres=100; ue_context_pP->ue_context.ue_release_timer_thres=1000;
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate RRCConnectionRelease (bytes %d)\n", PROTOCOL_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate RRCConnectionRelease (bytes %d)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
...@@ -3890,8 +3890,8 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -3890,8 +3890,8 @@ rrc_eNB_generate_RRCConnectionSetup(
// activate release timer, if RRCSetupComplete not received after 10 frames, remove UE // activate release timer, if RRCSetupComplete not received after 10 frames, remove UE
ue_context_pP->ue_context.ue_release_timer=1; ue_context_pP->ue_context.ue_release_timer=1;
// remove UE after 10 frames after RRCConnectionRelease is triggered // remove UE after 100 frames after RRCConnectionRelease is triggered
ue_context_pP->ue_context.ue_release_timer_thres=100; ue_context_pP->ue_context.ue_release_timer_thres=1000;
} }
......
USRP_OBJ += $(OPENAIR_TARGETS)/ARCH/USRP/USERSPACE/LIB/usrp_lib.o
USRP_FILE_OBJ += $(OPENAIR_TARGETS)/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
USRP_CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/COMMON -I$(OPENAIR_TARGETS)/ARCH/USRP/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/COMMON
This diff is collapsed.
...@@ -1237,7 +1237,7 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) { ...@@ -1237,7 +1237,7 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq; cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq; cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
cfg->tx_gain[i] = (double)fp->att_tx; cfg->tx_gain[i] = 10.0;//(double)fp->att_tx;
cfg->rx_gain[i] = ru->max_rxgain-(double)fp->att_rx; cfg->rx_gain[i] = ru->max_rxgain-(double)fp->att_rx;
cfg->configFilename = rf_config_file; cfg->configFilename = rf_config_file;
......
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