Commit 737ed3fc authored by fnabet's avatar fnabet

remove NR_DEMO flag in L2 and fix L1 warnings

parent c066955d
......@@ -353,7 +353,7 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
int result,result2;
int sync_out[3] = {0,0,0},sync_out2[3] = {0,0,0};
int tmp[3] = {0,0,0};
int length = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_subframe>>1;
int length = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti>>1;
//msg("[SYNC TIME] Calling sync_time.\n");
if (sync_corr_ue0 == NULL) {
......
......@@ -285,14 +285,14 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
frame_parms->frame_type=FDD;
init_frame_parms(frame_parms,1);
/*
write_output("rxdata0.m","rxd0",ue->common_vars.rxdata[0],10*frame_parms->samples_per_subframe,1,1);
write_output("rxdata0.m","rxd0",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
exit(-1);
*/
sync_pos = lte_sync_time(ue->common_vars.rxdata,
frame_parms,
(int *)&ue->common_vars.eNb_id);
// write_output("rxdata1.m","rxd1",ue->common_vars.rxdata[0],10*frame_parms->samples_per_subframe,1,1);
// write_output("rxdata1.m","rxd1",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
if (sync_pos >= frame_parms->nb_prefix_samples)
sync_pos2 = sync_pos - frame_parms->nb_prefix_samples;
else
......@@ -326,7 +326,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
init_frame_parms(&ue->frame_parms,1);
lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
ret = pbch_detection(ue,mode);
// write_output("rxdata2.m","rxd2",ue->common_vars.rxdata[0],10*frame_parms->samples_per_subframe,1,1);
// write_output("rxdata2.m","rxd2",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I(PHY,"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
......@@ -373,7 +373,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
init_frame_parms(&ue->frame_parms,1);
lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
ret = pbch_detection(ue,mode);
// write_output("rxdata3.m","rxd3",ue->common_vars.rxdata[0],10*frame_parms->samples_per_subframe,1,1);
// write_output("rxdata3.m","rxd3",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I(PHY,"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
......@@ -396,7 +396,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
sync_pos2 = sync_pos + FRAME_LENGTH_COMPLEX_SAMPLES - frame_parms->nb_prefix_samples;
// PSS is hypothesized in 2nd symbol of third slot in Frame (S-subframe)
sync_pos_slot = frame_parms->samples_per_subframe +
sync_pos_slot = frame_parms->samples_per_tti +
(frame_parms->ofdm_symbol_size<<1) +
frame_parms->nb_prefix_samples0 +
(frame_parms->nb_prefix_samples);
......@@ -416,7 +416,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
ret = pbch_detection(ue,mode);
// write_output("rxdata4.m","rxd4",ue->common_vars.rxdata[0],10*frame_parms->samples_per_subframe,1,1);
// write_output("rxdata4.m","rxd4",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I(PHY,"TDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
......@@ -436,7 +436,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
sync_pos2 = sync_pos + FRAME_LENGTH_COMPLEX_SAMPLES - frame_parms->nb_prefix_samples;
// PSS is hypothesized in 2nd symbol of third slot in Frame (S-subframe)
sync_pos_slot = frame_parms->samples_per_subframe + (frame_parms->ofdm_symbol_size<<1) + (frame_parms->nb_prefix_samples<<1);
sync_pos_slot = frame_parms->samples_per_tti + (frame_parms->ofdm_symbol_size<<1) + (frame_parms->nb_prefix_samples<<1);
if (sync_pos2 >= sync_pos_slot)
ue->rx_offset = sync_pos2 - sync_pos_slot;
......@@ -453,7 +453,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
ret = pbch_detection(ue,mode);
// write_output("rxdata5.m","rxd5",ue->common_vars.rxdata[0],10*frame_parms->samples_per_subframe,1,1);
// write_output("rxdata5.m","rxd5",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I(PHY,"TDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
frame_parms->Nid_cell,metric_tdd_ecp,phase_tdd_ecp,flip_tdd_ecp,ret);
......
......@@ -1132,11 +1132,11 @@ void rx_phich(PHY_VARS_UE *ue,
nseq_PHICH = ((ulsch->harq_processes[harq_pid]->first_rb/Ngroup_PHICH) +
ulsch->harq_processes[harq_pid]->n_DMRS)%(2*NSF_PHICH);
} else {
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d pusch_tti %d PHICH RX %s\n",
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d nr_tti_rx %d PHICH RX %s\n",
ue->Mod_id,
harq_pid,
proc->frame_rx,
pusch_tti,
nr_tti_rx,
(ulsch->harq_processes[harq_pid]->status==SCH_IDLE? "SCH_IDLE" :
(ulsch->harq_processes[harq_pid]->status==ACTIVE? "ACTIVE" :
(ulsch->harq_processes[harq_pid]->status==CBA_ACTIVE? "CBA_ACTIVE":
......
......@@ -1135,7 +1135,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
for (aa=0; aa<nb_ant_rx; aa++) {
prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_subframe-eNB->N_TA_offset];
prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset];
}
// First compute physical root sequence
......
......@@ -89,7 +89,7 @@ int slot_fep(PHY_VARS_UE *ue,
subframe_offset = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_tti * (Ns>>1);
slot_offset = frame_parms->ofdm_symbol_size * (frame_parms->symbols_per_tti>>1) * (Ns%2);
} else {
subframe_offset = frame_parms->samples_per_subframe * (Ns>>1);
subframe_offset = frame_parms->samples_per_tti * (Ns>>1);
slot_offset = (frame_parms->samples_per_tti>>1) * (Ns%2);
}
......@@ -303,7 +303,7 @@ int front_end_fft(PHY_VARS_UE *ue,
subframe_offset = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_tti * (Ns>>1);
slot_offset = frame_parms->ofdm_symbol_size * (frame_parms->symbols_per_tti>>1) * (Ns%2);
} else {
subframe_offset = frame_parms->samples_per_subframe * (Ns>>1);
subframe_offset = frame_parms->samples_per_tti * (Ns>>1);
slot_offset = (frame_parms->samples_per_tti>>1) * (Ns%2);
}
......
......@@ -1045,7 +1045,7 @@ typedef struct {
frame_t txFrame;
/// TX subframe counter
sub_frame_t txSubframe;
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
/// NR numerology index [0..5] as specified in 38.211 Section 4 (mu). 0=15khZ SCS, 1=30khZ, 2=60kHz, etc
uint8_t numerology_index;
/// NR number of ttis per subframe deduced from numerology (cf 38.211): 1, 2, 4, 8(not supported),16(not supported),32(not supported)
......@@ -1058,7 +1058,7 @@ typedef struct {
nr_tti_t rxNRTti;
/// TX last absolute subframe
uint32_t txLastAbsSubframe;
#endif
//#endif
/// C-RNTI of UE
uint16_t crnti;
/// C-RNTI of UE before HO
......
......@@ -1861,10 +1861,10 @@ ue_scheduler(
instance_t instance;
int result;
#endif
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
boolean_t isNewTxSubframe = (UE_mac_inst[module_idP].txLastAbsSubframe != (txFrameP*10 + txSubframeP));
UE_mac_inst[module_idP].txLastAbsSubframe = (txFrameP*10 + txSubframeP);
#endif
//#endif
#if UE_TIMING_TRACE
start_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
......@@ -1907,10 +1907,10 @@ ue_scheduler(
//Rrc_xface->Frame_index=Mac_rlc_xface->frameP;
//if (subframe%5 == 0)
//LG#ifdef EXMIMO
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
// call pdcp_run every subframe on TTI0. To check later if OK
if (isNewTxSubframe)
#endif
//#endif
{
pdcp_run(&ctxt);
}
......@@ -1919,10 +1919,10 @@ ue_scheduler(
UE_mac_inst[module_idP].txSubframe = txSubframeP;
UE_mac_inst[module_idP].rxFrame = rxFrameP;
UE_mac_inst[module_idP].rxSubframe = rxSubframeP;
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
UE_mac_inst[module_idP].txNRTti = txNRTtiP;
UE_mac_inst[module_idP].rxNRTti = rxNRTtiP;
#endif
//#endif
#ifdef CELLULAR
rrc_rx_tx(module_idP, txFrameP, 0, eNB_indexP);
......@@ -1987,10 +1987,10 @@ ue_scheduler(
//return(RRC_OK);
}
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
// NR: update and check contention resolution only on every new subframe (TTI0). To check later
if (isNewTxSubframe)
#endif
//#endif
{
LOG_I(MAC,"Frame %d: Contention resolution timer %d/%ld\n",txFrameP,UE_mac_inst[module_idP].RA_contention_resolution_cnt,
((1+rach_ConfigCommon->ra_SupervisionInfo.mac_ContentionResolutionTimer)<<3));
......@@ -2045,10 +2045,10 @@ ue_scheduler(
// First check ReTxBSR Timer because it is always configured
// Decrement ReTxBSR Timer if it is running and not null
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
// NR: update only on every new subframe (TTI0). To check later
if (isNewTxSubframe)
#endif
//#endif
{
if ((UE_mac_inst[module_idP].scheduling_info.retxBSR_SF != MAC_UE_BSR_TIMER_NOT_RUNNING)
&& (UE_mac_inst[module_idP].scheduling_info.retxBSR_SF != 0)){
......@@ -2105,12 +2105,12 @@ ue_scheduler(
UE_mac_inst[module_idP].PHR_reporting_active = 1;
UE_mac_inst[module_idP].PHR_reconfigured = 0;
}
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
// NR: Only check Power headroom and update PHR timers every subframe. To check
else if (isNewTxSubframe)
#else
else
#endif
//#else
// else
//#endif
{
//LOG_D(MAC,"PHR normal operation %d active %d \n", UE_mac_inst[module_idP].scheduling_info.periodicPHR_SF, UE_mac_inst[module_idP].PHR_reporting_active);
if ((UE_mac_inst[module_idP].scheduling_info.prohibitPHR_SF <= 0) &&
......
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