Commit c066955d authored by fnabet's avatar fnabet

merge from ue_nr_tti_changes

parents b95e8b79 0ba158b6
......@@ -54,17 +54,17 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
frame_parms->nb_prefix_samples0=512;
frame_parms->nb_prefix_samples = 512;
frame_parms->symbols_per_tti = 12;
#ifdef UE_NR_PHY_DEMO
// Only numerology 2 is supported for Extended Cyclic Prefix
frame_parms->numerology_index = 2;
frame_parms->ttis_per_subframe = 4;
frame_parms->ttis_per_subframe = 1;
frame_parms->slots_per_tti = 2; //only slot config 1 is supported
#endif
} else {
frame_parms->nb_prefix_samples0 = 160;
frame_parms->nb_prefix_samples = 144;
frame_parms->symbols_per_tti = 14;
frame_parms->numerology_index = 0;
frame_parms->ttis_per_subframe = 1;
frame_parms->slots_per_tti = 2; //only slot config 1 is supported
}
......@@ -113,11 +113,11 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
else {
frame_parms->ofdm_symbol_size = 2048;
frame_parms->samples_per_tti = 30720;
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
frame_parms->samples_per_subframe = 30720 * frame_parms->ttis_per_subframe;
#else
frame_parms->samples_per_subframe = 30720;
#endif
//#else
// frame_parms->samples_per_subframe = 30720;
//#endif
frame_parms->first_carrier_offset = 2048-600;
}
frame_parms->N_RBGS = 4;
......
......@@ -34,7 +34,7 @@
void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_UE *ue,
unsigned char eNB_id,
uint8_t subframe,
uint8_t nr_tti_rx,
unsigned char clear,
short coef)
{
......@@ -51,7 +51,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
ncoef = 32767 - coef;
#ifdef DEBUG_PHY
LOG_D(PHY,"AbsSubframe %d.%d: rx_offset (before) = %d\n",ue->proc.proc_rxtx[0].frame_rx%1024,subframe,ue->rx_offset);
LOG_D(PHY,"AbsSubframe %d.%d: rx_offset (before) = %d\n",ue->proc.proc_rxtx[0].frame_rx%1024,nr_tti_rx,ue->rx_offset);
#endif //DEBUG_PHY
......@@ -60,8 +60,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
temp += (Re*Re/2) + (Im*Im/2);
}
......@@ -80,7 +80,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
// do not filter to have proactive timing adjustment
max_pos_fil = max_pos;
if(subframe == 6)
if(nr_tti_rx == 6)
{
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
......@@ -119,9 +119,9 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
#ifdef DEBUG_PHY
LOG_D(PHY,"AbsSubframe %d.%d: ThreadId %d diff =%i rx_offset (final) = %i : clear %d,max_pos = %d,max_pos_fil = %d (peak %d) max_val %d target_pos %d \n",
ue->proc.proc_rxtx[ue->current_thread_id[subframe]].frame_rx,
subframe,
ue->current_thread_id[subframe],
ue->proc.proc_rxtx[ue->current_thread_id[nr_tti_rx]].frame_rx,
nr_tti_rx,
ue->current_thread_id[nr_tti_rx],
diff,
ue->rx_offset,
clear,
......
......@@ -38,7 +38,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
unsigned short rb,nb_rb=0;
unsigned char aarx,l,lprime,nsymb,skip_half=0,sss_symb,pss_symb=0,rb_alloc_ind,harq_pid,uespec_pilots=0;
int beamforming_mode, ch_offset;
uint8_t subframe;
uint8_t nr_tti_rx;
int8_t uespec_nushift, uespec_poffset=0, pil_offset=0;
uint8_t pilot0,pilot1,pilot2,pilot3;
......@@ -75,7 +75,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
uespec_nushift = frame_parms->Nid_cell%3;
subframe = Ns>>1;
nr_tti_rx = Ns>>1;
//generate ue specific pilots
......@@ -263,18 +263,18 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
rb_alloc_ind = 0;
// PBCH
if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
if ((nr_tti_rx==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
rb_alloc_ind = 0;
}
//PBCH subframe 0, symbols nsymb>>1 ... nsymb>>1 + 3
if ((subframe==0) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
if ((nr_tti_rx==0) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
skip_half=1;
else if ((subframe==0) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
else if ((nr_tti_rx==0) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
skip_half=2;
//SSS
if (((subframe==0)||(subframe==5)) &&
if (((nr_tti_rx==0)||(nr_tti_rx==5)) &&
(rb>((frame_parms->N_RB_DL>>1)-3)) &&
(rb<((frame_parms->N_RB_DL>>1)+3)) &&
(l==sss_symb) ) {
......@@ -282,28 +282,28 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
}
//SSS
if (((subframe==0)||(subframe==5)) &&
if (((nr_tti_rx==0)||(nr_tti_rx==5)) &&
(rb==((frame_parms->N_RB_DL>>1)-3)) &&
(l==sss_symb))
skip_half=1;
else if (((subframe==0)||(subframe==5)) &&
else if (((nr_tti_rx==0)||(nr_tti_rx==5)) &&
(rb==((frame_parms->N_RB_DL>>1)+3)) &&
(l==sss_symb))
skip_half=2;
//PSS in subframe 0/5 if FDD
if (frame_parms->frame_type == FDD) { //FDD
if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
}
if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb))
if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb))
skip_half=1;
else if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb))
else if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb))
skip_half=2;
}
if ((frame_parms->frame_type == TDD) && ((subframe==1)||(subframe==6))) { //TDD Subframe 1 and 6
if ((frame_parms->frame_type == TDD) && ((nr_tti_rx==1)||(nr_tti_rx==6))) { //TDD Subframe 1 and 6
if ((rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
}
......@@ -416,23 +416,23 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
rb_alloc_ind = 0;
// PBCH
if ((subframe==0) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
if ((nr_tti_rx==0) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
rb_alloc_ind = 0;
}
//SSS
if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) {
if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) {
rb_alloc_ind = 0;
}
if (frame_parms->frame_type == FDD) {
//PSS
if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
}
}
if ((frame_parms->frame_type == TDD) && ((subframe==1)||(subframe==6))) {
if ((frame_parms->frame_type == TDD) && ((nr_tti_rx==1)||(nr_tti_rx==6))) {
//PSS
if ((rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
......@@ -518,41 +518,41 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
rb_alloc_ind = 0;
// PBCH
if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=nsymb>>1) && (l<((nsymb>>1) + 4))) {
if ((nr_tti_rx==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=nsymb>>1) && (l<((nsymb>>1) + 4))) {
rb_alloc_ind = 0;
}
//PBCH subframe 0, symbols nsymb>>1 ... nsymb>>1 + 3
if ((subframe==0) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
if ((nr_tti_rx==0) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
skip_half=1;
else if ((subframe==0) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
else if ((nr_tti_rx==0) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
skip_half=2;
//SSS
if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) {
if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) {
rb_alloc_ind = 0;
}
//SSS
if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l==sss_symb))
if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l==sss_symb))
skip_half=1;
else if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb))
else if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb))
skip_half=2;
if (frame_parms->frame_type == FDD) {
//PSS
if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
}
//PSS
if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb))
if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb))
skip_half=1;
else if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb))
else if (((nr_tti_rx==0)||(nr_tti_rx==5)) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb))
skip_half=2;
}
if ((frame_parms->frame_type == TDD) && ((subframe==1)||(subframe==6))) { //TDD Subframe 1 and 6
if ((frame_parms->frame_type == TDD) && ((nr_tti_rx==1)||(nr_tti_rx==6))) { //TDD Subframe 1 and 6
if ((rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
}
......
......@@ -663,13 +663,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
//LOG_I(PHY,"Interpolate s0-->s4 to get s1 s2 and s3 Ns %d \n", Ns);
if (ue->frame_parms.Ncp==0) {// pilot spacing 4 symbols (1/4,1/2,3/4 combination)
uint8_t previous_subframe;
uint8_t previous_tti;
if(Ns>>1 == 0)
previous_subframe = 9;
previous_tti = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.ttis_per_subframe-1;
else
previous_subframe = ((Ns>>1) - 1 )%9;
previous_tti = ((Ns>>1) - 1 )%(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.ttis_per_subframe-1);
if((subframe_select(&ue->frame_parms,previous_subframe) == SF_UL))
if((subframe_select(&ue->frame_parms,previous_tti) == SF_UL))
{
multadd_complex_vector_real_scalar(dl_ch_prev,328,dl_ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),1,ue->frame_parms.ofdm_symbol_size);
......
......@@ -29,7 +29,7 @@
int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
uint8_t eNB_id,
uint8_t eNB_offset,
int subframe,
int nr_tti_rx,
unsigned char l)
{
......@@ -44,8 +44,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// unsigned int n;
// int i;
int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[0];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF;
ch_offset = (l*(ue->frame_parms.ofdm_symbol_size));
symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
......@@ -55,7 +55,7 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
if ((l==2)||(l==6)||(l==10)) {
lte_dl_mbsfn_rx(ue,
&pilot[0],
subframe,
nr_tti_rx,
l>>2);
} // if symbol==2, return 0 else if symbol = 6, return 1, else if symbol=10 return 2
......@@ -734,31 +734,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// do ifft of channel estimate
for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) {
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa]) {
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_offset][aa]) {
switch (ue->frame_parms.N_RB_DL) {
case 6:
idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_offset][aa],
1);
break;
case 25:
idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_offset][aa],
1);
break;
case 50:
idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_offset][aa],
1);
break;
case 75:
idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_offset][aa],
1);
break;
case 100:
idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_offset][aa],
1);
break;
default:
......
This diff is collapsed.
This diff is collapsed.
......@@ -161,7 +161,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
LTE_UE_DLSCH_t *dlsch,
LTE_DL_UE_HARQ_t *harq_process,
uint32_t frame,
uint8_t subframe,
uint8_t nr_tti_rx,
uint8_t harq_pid,
uint8_t is_crnti,
uint8_t llr8_flag)
......@@ -239,14 +239,14 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return(dlsch->max_turbo_iterations);
}
if (subframe>9) {
printf("dlsch_decoding.c: Illegal subframe index %d\n",subframe);
if (nr_tti_rx> (10*frame_parms->ttis_per_subframe-1)) {
printf("dlsch_decoding.c: Illegal subframe index %d\n",nr_tti_rx);
return(dlsch->max_turbo_iterations);
}
if (dlsch->harq_ack[subframe].ack != 2) {
if (dlsch->harq_ack[nr_tti_rx].ack != 2) {
LOG_D(PHY, "[UE %d] DLSCH @ SF%d : ACK bit is %d instead of DTX even before PDSCH is decoded!\n",
phy_vars_ue->Mod_id, subframe, dlsch->harq_ack[subframe].ack);
phy_vars_ue->Mod_id, nr_tti_rx, dlsch->harq_ack[nr_tti_rx].ack);
}
if (llr8_flag == 0) {
......@@ -486,7 +486,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats);
#endif
LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1);
LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,nr_tti_rx,r,harq_process->C-1);
ret = tc
(&harq_process->d[r][96],
harq_process->c[r],
......@@ -658,27 +658,27 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
if ((err_flag == 0) && (ret>=(1+dlsch->max_turbo_iterations))) {// a Code segment is in error so break;
LOG_D(PHY,"AbsSubframe %d.%d CRC failed, segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1);
LOG_D(PHY,"AbsSubframe %d.%d CRC failed, segment %d/%d \n",frame%1024,nr_tti_rx,r,harq_process->C-1);
err_flag = 1;
}
}
int32_t frame_rx_prev = frame;
int32_t subframe_rx_prev = subframe - 1;
if (subframe_rx_prev < 0) {
int32_t tti_rx_prev = nr_tti_rx - 1;
if (tti_rx_prev < 0) {
frame_rx_prev--;
subframe_rx_prev += 10;
tti_rx_prev += 10*frame_parms->ttis_per_subframe;
}
frame_rx_prev = frame_rx_prev%1024;
if (err_flag == 1) {
#if UE_DEBUG_TRACE
LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
phy_vars_ue->Mod_id, frame, subframe, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
phy_vars_ue->Mod_id, frame, nr_tti_rx, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
#endif
dlsch->harq_ack[subframe].ack = 0;
dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1;
dlsch->harq_ack[nr_tti_rx].ack = 0;
dlsch->harq_ack[nr_tti_rx].harq_id = harq_pid;
dlsch->harq_ack[nr_tti_rx].send_harq_status = 1;
harq_process->errors[harq_process->round]++;
harq_process->round++;
......@@ -690,28 +690,28 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
}
if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, pid status %d, round %d/Max %d, TBS %d)\n",
phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->status,harq_process->round,dlsch->Mdlharq,harq_process->TBS);
LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for nr_tti_rx %d (pid %d, pid status %d, round %d/Max %d, TBS %d)\n",
phy_vars_ue->Mod_id,nr_tti_rx,harq_pid,harq_process->status,harq_process->round,dlsch->Mdlharq,harq_process->TBS);
}
return((1+dlsch->max_turbo_iterations));
} else {
#if UE_DEBUG_TRACE
LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d TBS %d mcs %d nb_rb %d\n",
phy_vars_ue->Mod_id,subframe,harq_process->TBS,harq_process->mcs,harq_process->nb_rb);
LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for nr_tti_rx %d TBS %d mcs %d nb_rb %d\n",
phy_vars_ue->Mod_id,nr_tti_rx,harq_process->TBS,harq_process->mcs,harq_process->nb_rb);
#endif
harq_process->status = SCH_IDLE;
harq_process->round = 0;
dlsch->harq_ack[subframe].ack = 1;
dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1;
dlsch->harq_ack[nr_tti_rx].ack = 1;
dlsch->harq_ack[nr_tti_rx].harq_id = harq_pid;
dlsch->harq_ack[nr_tti_rx].send_harq_status = 1;
//LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d)\n",
// phy_vars_ue->Mod_id, frame, subframe, harq_pid, harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs);
if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS);
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for nr_tti_rx %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,nr_tti_rx,harq_pid,harq_process->round,harq_process->TBS);
}
//LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
......@@ -898,7 +898,7 @@ int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], ui
}
uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
uint8_t subframe,
uint8_t nr_tti_rx,
PDSCH_t dlsch_id,
uint8_t eNB_id)
{
......@@ -924,7 +924,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
mac_xface->macphy_exit("Could not find attached eNB for DLSCH emulation");
}
LOG_D(PHY,"[UE] dlsch_decoding_emul : subframe %d, eNB_id %d, dlsch_id %d\n",subframe,eNB_id2,dlsch_id);
LOG_D(PHY,"[UE] dlsch_decoding_emul : nr_tti_rx %d, eNB_id %d, dlsch_id %d\n",nr_tti_rx,eNB_id2,dlsch_id);
// printf("dlsch_eNB_ra->harq_processes[0] %p\n",PHY_vars_eNB_g[eNB_id]->dlsch_eNB_ra->harq_processes[0]);
......
......@@ -700,7 +700,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
short *dlsch_llr,
uint8_t num_pdcch_symbols,
uint16_t nb_rb,
uint8_t subframe,
uint8_t nr_tti_rx,
uint16_t mod_order_0,
uint32_t rb_alloc)
{
......@@ -736,7 +736,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
amp_tmp=amp_tmp<<1; // to compensate for >> 1 shift in modulation
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,2,subframe,symbol);
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,2,nr_tti_rx,symbol);
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
if (frame_parms->mode1_flag==0)
......@@ -939,7 +939,7 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
uint8_t num_pdcch_symbols,
int32_t **dl_ch_mag,
uint16_t nb_rb,
uint8_t subframe,
uint8_t nr_tti_rx,
uint16_t mod_order_0,
uint32_t rb_alloc)
{
......@@ -965,7 +965,7 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,4,subframe,symbol);
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,4,nr_tti_rx,symbol);
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
amp_tmp=0x1fff;//dlsch0->sqrt_rho_b; already taken into account
......@@ -1217,7 +1217,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
int32_t **dl_ch_mag,
int32_t **dl_ch_magb,
uint16_t nb_rb,
uint8_t subframe,
uint8_t nr_tti_rx,
uint16_t mod_order_0,
uint32_t rb_alloc)
{
......@@ -1245,7 +1245,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,6,subframe,symbol);
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,6,nr_tti_rx,symbol);
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
amp_tmp = 0x1fff;//dlsch0->sqrt_rho_b; already taken into account
......
......@@ -38,7 +38,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
UE_rxtx_proc_t *proc,
uint8_t eNB_id,
short amp,
unsigned int subframe,
unsigned int nr_tti_rx,
unsigned int first_rb,
unsigned int nb_rb,
uint8_t ant)
......@@ -46,7 +46,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
uint16_t k,l,Msc_RS,Msc_RS_idx,rb,drs_offset;
uint16_t * Msc_idx_ptr;
int subframe_offset,re_offset,symbol_offset;
int tti_offset,re_offset,symbol_offset;
//uint32_t phase_shift; // phase shift for cyclic delay in DM RS
//uint8_t alpha_ind;
......@@ -58,22 +58,22 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int32_t *txdataF = ue->common_vars.txdataF[ant];
uint32_t u,v,alpha_ind;
uint32_t u0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[subframe<<1];
uint32_t u1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(subframe<<1)];
uint32_t v0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[subframe<<1];
uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
uint32_t u0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[nr_tti_rx<<1];
uint32_t u1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(nr_tti_rx<<1)];
uint32_t v0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[nr_tti_rx<<1];
uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(nr_tti_rx<<1)];
int32_t ref_re,ref_im;
uint8_t harq_pid = subframe2harq_pid(frame_parms,proc->frame_tx,subframe);
uint8_t harq_pid = subframe2harq_pid(frame_parms,proc->frame_tx,nr_tti_rx);
cyclic_shift0 = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
ue->ulsch[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]+
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[nr_tti_rx<<1]+
((ue->ulsch[0]->cooperation_flag==2)?10:0)+
ant*6) % 12;
// printf("PUSCH.cyclicShift %d, n_DMRS2 %d, nPRS %d\n",frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift,ue->ulsch[eNB_id]->n_DMRS2,ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]);
// printf("PUSCH.cyclicShift %d, n_DMRS2 %d, nPRS %d\n",frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift,ue->ulsch[eNB_id]->n_DMRS2,ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[nr_tti_rx<<1]);
cyclic_shift1 = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
ue->ulsch[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+1]+
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(nr_tti_rx<<1)+1]+
((ue->ulsch[0]->cooperation_flag==2)?10:0)+
ant*6) % 12;
......@@ -114,12 +114,12 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
re_offset = frame_parms->first_carrier_offset;
subframe_offset = subframe*frame_parms->symbols_per_tti*frame_parms->ofdm_symbol_size;
symbol_offset = subframe_offset + frame_parms->ofdm_symbol_size*l;
tti_offset = nr_tti_rx*frame_parms->symbols_per_tti*frame_parms->ofdm_symbol_size;
symbol_offset = tti_offset + frame_parms->ofdm_symbol_size*l;
#ifdef DEBUG_DRS
printf("generate_drs_pusch: symbol_offset %d, subframe offset %d, cyclic shift %d\n",symbol_offset,subframe_offset,cyclic_shift);
printf("generate_drs_pusch: symbol_offset %d, subframe offset %d, cyclic shift %d\n",symbol_offset,tti_offset,cyclic_shift);
#endif
alpha_ind = 0;
......
......@@ -146,7 +146,7 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
}
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol)
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t nr_tti_rx,uint8_t symbol)
{
int rb,re_pbch_sss=0;
......@@ -154,14 +154,14 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
nsymb = (frame_parms->Ncp==NORMAL) ? 14 : 12;
// printf("adjust_G2 : symbol %d, subframe %d\n",symbol,subframe);
if ((subframe!=0) && (subframe!=5) && (subframe!=6)) // if not PBCH/SSS or SSS
// printf("adjust_G2 : symbol %d, nr_tti_rx %d\n",symbol,nr_tti_rx);
if ((nr_tti_rx!=0) && (nr_tti_rx!=5) && (nr_tti_rx!=6)) // if not PBCH/SSS or SSS
return(0);
//first half of slot and TDD (no adjustments in first slot except for subframe 6 - PSS)
//first half of slot and TDD (no adjustments in first slot except for nr_tti_rx 6 - PSS)
if ((symbol<(nsymb>>1))&&
(frame_parms->frame_type == TDD)&&
(subframe!=6))
(nr_tti_rx!=6))
return(0);
// after PBCH
......@@ -170,20 +170,20 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
(symbol!=(nsymb-1))) ///SSS
return(0);
if ((subframe==5) && (symbol!=(nsymb-1))) ///SSS
if ((nr_tti_rx==5) && (symbol!=(nsymb-1))) ///SSS
return(0);
if ((subframe==6) && (symbol!=2)) /// PSS
if ((nr_tti_rx==6) && (symbol!=2)) /// PSS
return(0);
} else { // FDD
if ((symbol>((nsymb>>1)+3)) ||
(symbol<((nsymb>>1)-2)))
return(0);
if ((subframe==5) && (symbol!=((nsymb>>1)-1))&& (symbol!=((nsymb>>1)-2)))
if ((nr_tti_rx==5) && (symbol!=((nsymb>>1)-1))&& (symbol!=((nsymb>>1)-2)))
return(0);
if (subframe==6)
if (nr_tti_rx==6)
return(0);
}
......@@ -238,13 +238,13 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
return(re_pbch_sss);
}
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe)
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t nr_tti_rx)
{
int rb,re_pbch_sss=0;
uint8_t rb_alloc_ind;
if ((subframe!=0) && (subframe!=5) && (subframe!=6)) // if not PBCH/SSS/PSS or SSS/PSS
if ((nr_tti_rx!=0) && (nr_tti_rx!=5) && (nr_tti_rx!=6)) // if not PBCH/SSS/PSS or SSS/PSS
return(0);
......@@ -296,7 +296,7 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
}
// printf("re_pbch_sss %d\n",re_pbch_sss);
if (subframe==0) { //PBCH+SSS+PSS
if (nr_tti_rx==0) { //PBCH+SSS+PSS
if (frame_parms->frame_type == TDD) { // TDD
if (frame_parms->mode1_flag==0)
//2ant so PBCH 3+2/3 symbols, SSS 1 symbol * REs => (14/3)*re_pbch_sss for normal CP,
......@@ -317,22 +317,22 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
return((-frame_parms->Ncp+35)*re_pbch_sss * mod_order/6);
}
} else if (subframe == 5) // SSS+PSS for FDD, SSS for TDD
} else if (nr_tti_rx == 5) // SSS+PSS for FDD, SSS for TDD
return(((frame_parms->frame_type==FDD)?2:1)*re_pbch_sss * 1 * mod_order);
else if ((subframe == 6)&&(frame_parms->frame_type == TDD)) // PSS for TDD
else if ((nr_tti_rx == 6)&&(frame_parms->frame_type == TDD)) // PSS for TDD
return(re_pbch_sss * 1 * mod_order);
return(0);
}
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t nr_tti_rx,uint8_t beamforming_mode)
{
int G_adj;
if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
G_adj= adjust_G(frame_parms,rb_alloc,mod_order,subframe);
if (is_pmch_subframe(frame,nr_tti_rx,frame_parms) == 0) {
G_adj= adjust_G(frame_parms,rb_alloc,mod_order,nr_tti_rx);
//printf("get_G subframe %d mod_order %d, nb_rb %d: rb_alloc %x,%x,%x,%x, G_adj %d\n",subframe,mod_order,nb_rb,rb_alloc[3],rb_alloc[2],rb_alloc[1],rb_alloc[0], G_adj);
//printf("get_G nr_tti_rx %d mod_order %d, nb_rb %d: rb_alloc %x,%x,%x,%x, G_adj %d\n",nr_tti_rx,mod_order,nb_rb,rb_alloc[3],rb_alloc[2],rb_alloc[1],rb_alloc[0], G_adj);
if (frame_parms->Ncp==NORMAL) { // normal prefix
// PDDDPDD PDDDPDD - 13 PDSCH symbols, 10 full, 3 w/ pilots = 10*12 + 3*8
// PCDDPDD PDDDPDD - 12 PDSCH symbols, 9 full, 3 w/ pilots = 9*12 + 3*8
......@@ -354,7 +354,7 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
else //SISO
return(((int)nb_rb * mod_order * ((9-num_pdcch_symbols)*12 + 3*10)) - G_adj);
}
} else { // This is an MBSFN subframe
} else { // This is an MBSFN nr_tti_rx
return((int)frame_parms->N_RB_DL * mod_order * 102);
}
}
......
......@@ -75,7 +75,7 @@ void generate_pcfich_reg_mapping(LTE_DL_FRAME_PARMS *frame_parms)
}
void pcfich_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t subframe,
uint8_t nr_tti_rx,
uint8_t *b,
uint8_t *bt)
{
......@@ -85,7 +85,7 @@ void pcfich_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
reset = 1;
// x1 is set in lte_gold_generic
x2 = ((((2*frame_parms->Nid_cell)+1)*(1+subframe))<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.7.1
x2 = ((((2*frame_parms->Nid_cell)+1)*(1+nr_tti_rx))<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.7.1
for (i=0; i<32; i++) {
if ((i&0x1f)==0) {
......@@ -100,7 +100,7 @@ void pcfich_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
}
void pcfich_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t subframe,
uint8_t nr_tti_rx,
int16_t *d)
{
......@@ -110,7 +110,7 @@ void pcfich_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
reset = 1;
// x1 is set in lte_gold_generic
x2 = ((((2*frame_parms->Nid_cell)+1)*(1+subframe))<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.7.1
x2 = ((((2*frame_parms->Nid_cell)+1)*(1+nr_tti_rx))<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.7.1
for (i=0; i<32; i++) {
if ((i&0x1f)==0) {
......@@ -136,7 +136,7 @@ void generate_pcfich(uint8_t num_pdcch_symbols,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
int32_t **txdataF,
uint8_t subframe)
uint8_t nr_tti_rx)
{
uint8_t pcfich_bt[32],nsymb,pcfich_quad;
......@@ -153,7 +153,7 @@ void generate_pcfich(uint8_t num_pdcch_symbols,
// scrambling
if ((num_pdcch_symbols>0) && (num_pdcch_symbols<4))
pcfich_scrambling(frame_parms,subframe,pcfich_b[num_pdcch_symbols-1],pcfich_bt);
pcfich_scrambling(frame_parms,nr_tti_rx,pcfich_b[num_pdcch_symbols-1],pcfich_bt);
// modulation
if (frame_parms->mode1_flag==1)
......@@ -191,7 +191,7 @@ void generate_pcfich(uint8_t num_pdcch_symbols,
// mapping
nsymb = (frame_parms->Ncp==0) ? 14:12;
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(subframe*nsymb);
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(nr_tti_rx*nsymb);
re_offset = frame_parms->first_carrier_offset;
// loop over 4 quadruplets and lookup REGs
......@@ -220,7 +220,7 @@ void generate_pcfich(uint8_t num_pdcch_symbols,
uint8_t rx_pcfich(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t subframe,
uint8_t nr_tti_rx,
LTE_UE_PDCCH *lte_ue_pdcch_vars,
MIMO_mode_t mimo_mode)
{
......@@ -288,7 +288,7 @@ uint8_t rx_pcfich(LTE_DL_FRAME_PARMS *frame_parms,
// pcfhich unscrambling
pcfich_unscrambling(frame_parms,subframe,pcfich_d);
pcfich_unscrambling(frame_parms,nr_tti_rx,pcfich_d);
// pcfich detection
......
This diff is collapsed.
This diff is collapsed.
......@@ -202,7 +202,7 @@ uint32_t ulsch_encoding(uint8_t *a,
PHY_VARS_UE *ue,
uint8_t harq_pid,
uint8_t eNB_id,
uint8_t subframe_rx,
uint8_t nr_tti_rx,
uint8_t tmode,
uint8_t control_only_flag,
uint8_t Nbundled)
......@@ -262,7 +262,7 @@ uint32_t ulsch_encoding(uint8_t *a,
// fill CQI/PMI information
if (ulsch->O>0) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI, VCD_FUNCTION_IN);
rnti = ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->crnti;
rnti = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->crnti;
fill_CQI(ulsch,meas,0,harq_pid,ue->frame_parms.N_RB_DL,rnti, tmode,ue->sinr_eff);
LOG_D(PHY,"ULSCH Encoding rnti %x \n", rnti);
......
......@@ -368,7 +368,7 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
void ulsch_modulation(int32_t **txdataF,
short amp,
uint32_t frame,
uint32_t subframe,
uint32_t nr_tti_rx,
LTE_DL_FRAME_PARMS *frame_parms,
LTE_UE_ULSCH_t *ulsch)
{
......@@ -382,8 +382,8 @@ void ulsch_modulation(int32_t **txdataF,
DevAssert(frame_parms);
int re_offset,re_offset0,i,Msymb,j,k,nsymb,Msc_PUSCH,l;
// uint8_t harq_pid = (rag_flag == 1) ? 0 : subframe2harq_pid_tdd(frame_parms->tdd_config,subframe);
uint8_t harq_pid = subframe2harq_pid(frame_parms,frame,subframe);
// uint8_t harq_pid = (rag_flag == 1) ? 0 : subframe2harq_pid_tdd(frame_parms->tdd_config,nr_tti_rx);
uint8_t harq_pid = subframe2harq_pid(frame_parms,frame,nr_tti_rx);
uint8_t Q_m;
int32_t *txptr;
uint32_t symbol_offset;
......@@ -400,7 +400,7 @@ void ulsch_modulation(int32_t **txdataF,
}
// x1 is set in lte_gold_generic
x2 = (ulsch->rnti<<14) + (subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1
x2 = (ulsch->rnti<<14) + (nr_tti_rx<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1
if (harq_pid>=8) {
printf("ulsch_modulation.c: Illegal harq_pid %d\n",harq_pid);
......@@ -411,12 +411,12 @@ void ulsch_modulation(int32_t **txdataF,
nb_rb = ulsch->harq_processes[harq_pid]->nb_rb;
if (nb_rb == 0) {
printf("ulsch_modulation.c: Frame %d, Subframe %d Illegal nb_rb %d\n",frame,subframe,nb_rb);
printf("ulsch_modulation.c: Frame %d, nr_tti_rx %d Illegal nb_rb %d\n",frame,nr_tti_rx,nb_rb);
return;
}
if (first_rb > frame_parms->N_RB_UL) {
printf("ulsch_modulation.c: Frame %d, Subframe %d Illegal first_rb %d\n",frame,subframe,first_rb);
printf("ulsch_modulation.c: Frame %d, nr_tti_rx %d Illegal first_rb %d\n",frame,nr_tti_rx,first_rb);
return;
}
......@@ -432,8 +432,8 @@ void ulsch_modulation(int32_t **txdataF,
Msc_PUSCH = ulsch->harq_processes[harq_pid]->nb_rb*12;
#ifdef DEBUG_ULSCH_MODULATION
LOG_D(PHY,"ulsch_modulation.c: Doing modulation (rnti %x,x2 %x) for G=%d bits, harq_pid %d , nb_rb %d, Q_m %d, Nsymb_pusch %d (nsymb %d), subframe %d\n",
ulsch->rnti,x2,G,harq_pid,ulsch->harq_processes[harq_pid]->nb_rb,Q_m, ulsch->Nsymb_pusch,nsymb,subframe);
LOG_D(PHY,"ulsch_modulation.c: Doing modulation (rnti %x,x2 %x) for G=%d bits, harq_pid %d , nb_rb %d, Q_m %d, Nsymb_pusch %d (nsymb %d), nr_tti_rx %d\n",
ulsch->rnti,x2,G,harq_pid,ulsch->harq_processes[harq_pid]->nb_rb,Q_m, ulsch->Nsymb_pusch,nsymb,nr_tti_rx);
#endif
// scrambling (Note the placeholding bits are handled in ulsch_coding.c directly!)
......@@ -745,9 +745,9 @@ void ulsch_modulation(int32_t **txdataF,
// printf("txdataF %p\n",&txdataF[0][0]);
for (j=0,l=0; l<(nsymb-ulsch->srs_active); l++) {
re_offset = re_offset0;
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(subframe*nsymb));
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(nr_tti_rx*nsymb));
#ifdef DEBUG_ULSCH_MODULATION
printf("ulsch_mod (SC-FDMA) symbol %d (subframe %d): symbol_offset %d\n",l,subframe,symbol_offset);
printf("ulsch_mod (SC-FDMA) symbol %d (nr_tti_rx %d): symbol_offset %d\n",l,nr_tti_rx,symbol_offset);
#endif
txptr = &txdataF[0][symbol_offset];
......
......@@ -27,7 +27,7 @@
int slot_fep_mbsfn(PHY_VARS_UE *ue,
unsigned char l,
int subframe,
int nr_tti_rx,
int sample_offset,
int no_prefix)
{
......@@ -40,7 +40,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
unsigned char frame_type = frame_parms->frame_type; // Frame Type: 0 - FDD, 1 - TDD;
unsigned int nb_prefix_samples = frame_parms->ofdm_symbol_size>>2;//(no_prefix ? 0 : frame_parms->nb_prefix_samples);
unsigned int nb_prefix_samples0 = frame_parms->ofdm_symbol_size>>2;//(no_prefix ? 0 : frame_parms->nb_prefix_samples0);
unsigned int subframe_offset;
unsigned int tti_offset;
// int i;
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
......@@ -78,10 +78,10 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
}
if (no_prefix) {
subframe_offset = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_tti * subframe;
tti_offset = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_tti * nr_tti_rx;
} else {
subframe_offset = frame_parms->samples_per_tti * subframe;
tti_offset = frame_parms->samples_per_tti * nr_tti_rx;
}
......@@ -91,34 +91,34 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
return(-1);
}
if (((subframe == 0) || (subframe == 5) || // SFn 0,4,5,9;
(subframe == 4) || (subframe == 9))
if (((nr_tti_rx == 0) || (nr_tti_rx == 5) || // SFn 0,4,5,9;
(nr_tti_rx == 4) || (nr_tti_rx == 9))
&& (frame_type==FDD) ) { //check for valid MBSFN subframe
msg("slot_fep_mbsfn: Subframe must be 1,2,3,6,7,8 for FDD, Got %d \n",subframe);
msg("slot_fep_mbsfn: nr_tti_rx must be 1,2,3,6,7,8 for FDD, Got %d \n",nr_tti_rx);
return(-1);
} else if (((subframe == 0) || (subframe == 1) || (subframe==2) || // SFn 0,4,5,9;
(subframe == 5) || (subframe == 6))
} else if (((nr_tti_rx == 0) || (nr_tti_rx == 1) || (nr_tti_rx==2) || // SFn 0,4,5,9;
(nr_tti_rx == 5) || (nr_tti_rx == 6))
&& (frame_type==TDD) ) { //check for valid MBSFN subframe
msg("slot_fep_mbsfn: Subframe must be 3,4,7,8,9 for TDD, Got %d \n",subframe);
msg("slot_fep_mbsfn: nr_tti_rx must be 3,4,7,8,9 for TDD, Got %d \n",nr_tti_rx);
return(-1);
}
#ifdef DEBUG_FEP
msg("slot_fep_mbsfn: subframe %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, subframe_offset %d, sample_offset %d\n", subframe, l, nb_prefix_samples,nb_prefix_samples0,subframe_offset,
msg("slot_fep_mbsfn: nr_tti_rx %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, tti_offset %d, sample_offset %d\n", nr_tti_rx, l, nb_prefix_samples,nb_prefix_samples0,tti_offset,
sample_offset);
#endif
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
memset(&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],0,frame_parms->ofdm_symbol_size*sizeof(int));
memset(&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],0,frame_parms->ofdm_symbol_size*sizeof(int));
if (l==0) {
#if UE_TIMING_TRACE
start_meas(&ue->rx_dft_stats);
#endif
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
nb_prefix_samples0 +
subframe_offset -
tti_offset -
SOFFSET) % frame_length_samples],
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
#if UE_TIMING_TRACE
stop_meas(&ue->rx_dft_stats);
#endif
......@@ -126,7 +126,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
if ((sample_offset +
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
subframe_offset-
tti_offset-
SOFFSET) > (frame_length_samples - frame_parms->ofdm_symbol_size))
memcpy((short *)&common_vars->rxdata[aa][frame_length_samples],
(short *)&common_vars->rxdata[aa][0],
......@@ -138,9 +138,9 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
subframe_offset-
tti_offset-
SOFFSET) % frame_length_samples],
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
#if UE_TIMING_TRACE
stop_meas(&ue->rx_dft_stats);
#endif
......@@ -155,19 +155,19 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
if (ue->perfect_ce == 0) {
#ifdef DEBUG_FEP
msg("Channel estimation eNB %d, aatx %d, subframe %d, symbol %d\n",eNB_id,aa,subframe,l);
msg("Channel estimation eNB %d, aatx %d, nr_tti_rx %d, symbol %d\n",eNB_id,aa,nr_tti_rx,l);
#endif
lte_dl_mbsfn_channel_estimation(ue,
eNB_id,
0,
subframe,
nr_tti_rx,
l);
/* for (i=0;i<ue->PHY_measurements.n_adj_cells;i++) {
lte_dl_mbsfn_channel_estimation(ue,
eNB_id,
i+1,
subframe,
nr_tti_rx,
l);
lte_dl_channel_estimation(ue,eNB_id,0,
Ns,
......
......@@ -481,7 +481,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
PHY_VARS_UE *phy_vars_ue,
int eNB_id,
int UE_id,
uint8_t subframe)
uint8_t nr_tti_rx)
{
int i,arx,atx,ind,k;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms;
......@@ -514,35 +514,35 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->current_harq_pid;
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->current_harq_pid;
if (harq_pid>=8)
return;
mcs = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->mcs;
mcs = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->mcs;
// Button 0
if(!phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
if(!phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
// we are in TM5
fl_show_object(form->button_0);
}
}
if (phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]!=NULL) {
num_pdcch_symbols = phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->num_pdcch_symbols;
if (phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]!=NULL) {
num_pdcch_symbols = phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols;
}
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) {
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]!=NULL) {
coded_bits_per_codeword = get_G(frame_parms,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs),
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Nl,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,
frame,
subframe,
nr_tti_rx,
beamforming_mode);
} else {
coded_bits_per_codeword = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
......@@ -563,16 +563,16 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
bit_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float));
rxsig_t = (int16_t**) phy_vars_ue->common_vars.rxdata;
chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id];
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id];
chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_id];
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id];
pbch_llr = (int8_t*) phy_vars_ue->pbch_vars[eNB_id]->llr;
pbch_comp = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0];
pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr;
pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp[0];
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr[0]; // stream 0
pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->llr;
pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_comp[0];
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->llr[0]; // stream 0
// pdsch_llr = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]->llr[0]; // stream 0
pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0];
pdsch_mag = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0];
pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_comp0[0];
pdsch_mag = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->dl_ch_mag0[0];
// Received signal in time domain of receive antenna 0
if (rxsig_t != NULL) {
......
......@@ -433,7 +433,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
PHY_VARS_UE *phy_vars_ue,
int eNB_id,
int UE_id,
uint8_t subframe){
uint8_t nr_tti_rx){
int i,arx,atx,ind,k;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms;
int nsymb_ce = frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti;
......@@ -465,11 +465,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int mcs1=0;
unsigned char harq_pid = 0;
int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->current_harq_pid;
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->current_harq_pid;
if (harq_pid>=8)
return;
mcs0 = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->mcs;
mcs0 = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->mcs;
// Button 0
/*
if(!phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
......@@ -479,41 +479,41 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
*/
}
fl_show_object(form->button_0);
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]!=NULL) {
harq_pid = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]->current_harq_pid;
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][1]!=NULL) {
harq_pid = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][1]->current_harq_pid;
if (harq_pid>=8)
return;
mcs1 = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]->harq_processes[harq_pid]->mcs;
mcs1 = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][1]->harq_processes[harq_pid]->mcs;
}
if (phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]!=NULL) {
num_pdcch_symbols = phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->num_pdcch_symbols;
if (phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]!=NULL) {
num_pdcch_symbols = phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols;
}
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) {
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]!=NULL) {
mod0 = get_Qm(mcs0);
coded_bits_per_codeword0 = get_G(frame_parms,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs0),
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Nl,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,
frame,
subframe,
nr_tti_rx,
beamforming_mode);
} else {
coded_bits_per_codeword0 = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
mod0=0;
}
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]!=NULL) {
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][1]!=NULL) {
mod1 = get_Qm(mcs1);
coded_bits_per_codeword1 = get_G(frame_parms,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][1]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs1),
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]->harq_processes[harq_pid]->Nl,
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id][1]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,
frame,
subframe,
nr_tti_rx,
beamforming_mode);
} else {
coded_bits_per_codeword1 = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
......@@ -533,23 +533,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
llr_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float)); // init to zero
bit_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float));
rxsig_t = (int16_t**) phy_vars_ue->common_vars.rxdata;
chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id];
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id];
chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[nr_tti_rx]].dl_ch_estimates_time[eNB_id];
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id];
pbch_llr = (int8_t*) phy_vars_ue->pbch_vars[eNB_id]->llr;
pbch_comp = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0];
pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr;
pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp[0];
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr[0]; // stream 0
pdsch_llr1 = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr[1]; // stream 1
pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0];
//pdsch_comp = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_ext[0];
//pdsch_comp1 = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_ext[1];
pdsch_comp1 = (int16_t*) (phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp1[0][0])[0];
pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->llr;
pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_comp[0];
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->llr[0]; // stream 0
pdsch_llr1 = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->llr[1]; // stream 1
pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_comp0[0];
//pdsch_comp = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_ext[0];
//pdsch_comp1 = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_ext[1];
pdsch_comp1 = (int16_t*) (phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_comp1[0][0])[0];
//pdsch_comp1 = (int16_t*) (phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[0][0])[0];
pdsch_mag0 = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0];
pdsch_mag1 = (int16_t*) (phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag1[0][0])[0];
pdsch_magb0 = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_magb0[0];
pdsch_magb1 = (int16_t*) (phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_magb1[0][0])[0];
pdsch_mag0 = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->dl_ch_mag0[0];
pdsch_mag1 = (int16_t*) (phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->dl_ch_mag1[0][0])[0];
pdsch_magb0 = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->dl_ch_magb0[0];
pdsch_magb1 = (int16_t*) (phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[nr_tti_rx]][eNB_id]->dl_ch_magb1[0][0])[0];
fl_freeze_form(form->lte_phy_scope_ue);
// Received signal in time domain of receive antenna 0
if (rxsig_t != NULL) {
......
......@@ -197,6 +197,12 @@ typedef struct {
uint8_t CC_id;
/// timestamp transmitted to HW
openair0_timestamp timestamp_tx;
//#ifdef UE_NR_PHY_DEMO
/// NR TTI index within subframe_tx [0 .. ttis_per_subframe - 1] to act upon for transmission
int nr_tti_tx;
/// NR TTI index within subframe_rx [0 .. ttis_per_subframe - 1] to act upon for reception
int nr_tti_rx;
//#endif
/// subframe to act upon for transmission
int subframe_tx;
/// subframe to act upon for reception
......@@ -375,12 +381,12 @@ typedef struct {
uint8_t CC_id;
/// timestamp transmitted to HW
openair0_timestamp timestamp_tx;
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
/// NR TTI index within subframe_tx [0 .. ttis_per_subframe - 1] to act upon for transmission
int nr_tti_tx;
/// NR TTI index within subframe_rx [0 .. ttis_per_subframe - 1] to act upon for reception
int nr_tti_rx;
#endif
//#endif
/// subframe to act upon for transmission
int subframe_tx;
/// subframe to act upon for reception
......
......@@ -555,14 +555,14 @@ typedef struct {
uint16_t dl_symbols_in_S_subframe;
/// Number of SC-FDMA symbols in UL portion of S-subframe
uint16_t ul_symbols_in_S_subframe;
#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)
uint8_t ttis_per_subframe;
/// NR number of slots per tti . Assumption only 2 Slot per TTI is supported (Slot Config 1 in 38.211)
uint8_t slots_per_tti;
#endif
//#endif
/// Number of Physical transmit antennas in node
uint8_t nb_antennas_tx;
/// Number of Receive antennas in node
......
......@@ -115,11 +115,11 @@
* @{
*/
#define NUMBER_OF_OFDM_CARRIERS (frame_parms->ofdm_symbol_size)
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
#define NUMBER_OF_SYMBOLS_PER_FRAME (frame_parms->symbols_per_tti*(frame_parms->ttis_per_subframe)*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)
#else
#define NUMBER_OF_SYMBOLS_PER_FRAME (frame_parms->symbols_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)
#endif
//#else
//#define NUMBER_OF_SYMBOLS_PER_FRAME (frame_parms->symbols_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)
//#endif
#define NUMBER_OF_USEFUL_CARRIERS (12*frame_parms->N_RB_DL)
#define NUMBER_OF_ZERO_CARRIERS (NUMBER_OF_OFDM_CARRIERS-NUMBER_OF_USEFUL_CARRIERS)
#define NUMBER_OF_USEFUL_CARRIERS_BYTES (NUMBER_OF_USEFUL_CARRIERS>>2)
......@@ -156,11 +156,11 @@
#define OFDM_SYMBOL_SIZE_BYTES0 (OFDM_SYMBOL_SIZE_SAMPLES0*2)
#define OFDM_SYMBOL_SIZE_BYTES_NO_PREFIX (OFDM_SYMBOL_SIZE_SAMPLES_NO_PREFIX*2)
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
#define SLOT_LENGTH_BYTES ((frame_parms->samples_per_subframe << 2) / frame_parms->slots_per_tti) // 4 bytes * samples_per_subframe/slots_per_tti
#else
#define SLOT_LENGTH_BYTES (frame_parms->samples_per_subframe<<1) // 4 bytes * samples_per_subframe/2
#endif
//#else
//#define SLOT_LENGTH_BYTES (frame_parms->samples_per_subframe<<1) // 4 bytes * samples_per_subframe/2
//#endif
#define SLOT_LENGTH_BYTES_NO_PREFIX (OFDM_SYMBOL_SIZE_BYTES_NO_PREFIX * NUMBER_OF_OFDM_SYMBOLS_PER_SLOT)
#define FRAME_LENGTH_COMPLEX_SAMPLES (frame_parms->samples_per_subframe*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -35,7 +35,7 @@
#include "PHY/LTE_TRANSPORT/proto.h"
#include "PHY/extern.h"
int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,uint8_t eNB_id,PUCCH_FMT_t pucch_fmt)
int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t nr_tti_rx,uint8_t eNB_id,PUCCH_FMT_t pucch_fmt)
{
int16_t Po_PUCCH;
......@@ -45,7 +45,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
//
//if ((pucch_fmt == pucch_format1a) ||
// (pucch_fmt == pucch_format1b)) { // Update g_pucch based on TPC/delta_PUCCH received in PDCCH for this process
//harq_pid = ue->dlsch[eNB_id][0]->harq_ack[subframe].harq_id;
//harq_pid = ue->dlsch[eNB_id][0]->harq_ack[nr_tti_rx].harq_id;
//this is now done in dci_tools
//ue->g_pucch[eNB_id] += ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->delta_PUCCH;
//}
......@@ -95,7 +95,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
if (pucch_fmt!=pucch_format1) {
LOG_D(PHY,"[UE %d][PDSCH %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB, g_pucch %d dB\n",
ue->Mod_id,
ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti,proc->frame_tx%1024,subframe,
ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti,proc->frame_tx%1024,nr_tti_rx,
Po_PUCCH,
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
get_PL(ue->Mod_id,ue->CC_id,eNB_id),
......@@ -103,7 +103,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
} else {
LOG_D(PHY,"[UE %d][SR %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB g_pucch %d dB\n",
ue->Mod_id,
ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti,proc->frame_tx%1024,subframe,
ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti,proc->frame_tx%1024,nr_tti_rx,
Po_PUCCH,
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
get_PL(ue->Mod_id,ue->CC_id,eNB_id),
......
......@@ -68,11 +68,11 @@ typedef int32_t sdu_size_t;
typedef uint32_t frame_t;
typedef int32_t sframe_t;
typedef uint32_t sub_frame_t;
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
/* NR tti corresponding to 2 consecutive slots(or 1 slot if SlotConfig0) for the smaller configured numerology granularity */
/* tti = 1ms for numerology 0, = 0.5ms for numerology 1, = 0.250 ms for numerology 2, etc ...*/
typedef uint8_t nr_tti_t;
#endif
//#endif
typedef uint8_t module_id_t;
typedef uint8_t eNB_index_t;
typedef uint16_t ue_id_t;
......
......@@ -551,7 +551,7 @@ int phy_stats_exist(module_id_t Mod_id, int rnti);
\param[in] eNB_index instance of eNB
@returns L2 state (CONNETION_OK or CONNECTION_LOST or PHY_RESYNCH)
*/
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
UE_L2_STATE_t ue_scheduler(
const module_id_t module_idP,
const frame_t rxFrameP,
......@@ -563,7 +563,7 @@ UE_L2_STATE_t ue_scheduler(
const lte_subframe_t direction,
const uint8_t eNB_index,
const int CC_id);
#else
/*#else
UE_L2_STATE_t ue_scheduler(
const module_id_t module_idP,
const frame_t rxFrameP,
......@@ -574,6 +574,7 @@ UE_L2_STATE_t ue_scheduler(
const uint8_t eNB_index,
const int CC_id);
#endif
*/
/*! \fn int cba_access(module_id_t module_idP,frame_t frameP,sub_frame_t subframe, uint8_t eNB_index,uint16_t buflen);
\brief determine whether to use cba resource to transmit or not
......
......@@ -1819,7 +1819,7 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid
// 3. Perform SR/BSR procedures for scheduling feedback
// 4. Perform PHR procedures
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
UE_L2_STATE_t
ue_scheduler(
const module_id_t module_idP,
......@@ -1832,7 +1832,7 @@ ue_scheduler(
const lte_subframe_t directionP,
const uint8_t eNB_indexP,
const int CC_id)
#else
/*#else
UE_L2_STATE_t
ue_scheduler(
const module_id_t module_idP,
......@@ -1843,7 +1843,7 @@ ue_scheduler(
const lte_subframe_t directionP,
const uint8_t eNB_indexP,
const int CC_id)
#endif
#endif*/
//------------------------------------------------------------------------------
{
int lcid; // lcid index
......@@ -1992,21 +1992,21 @@ ue_scheduler(
if (isNewTxSubframe)
#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));
UE_mac_inst[module_idP].RA_contention_resolution_cnt++;
if (UE_mac_inst[module_idP].RA_contention_resolution_cnt ==
((1+rach_ConfigCommon->ra_SupervisionInfo.mac_ContentionResolutionTimer)<<3)) {
UE_mac_inst[module_idP].RA_active = 0;
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
// Signal PHY to quit RA procedure
LOG_E(MAC,"Module id %u Contention resolution timer expired, RA failed\n", module_idP);
mac_xface->ra_failed(module_idP,0,eNB_indexP);
}
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));
UE_mac_inst[module_idP].RA_contention_resolution_cnt++;
if (UE_mac_inst[module_idP].RA_contention_resolution_cnt ==
((1+rach_ConfigCommon->ra_SupervisionInfo.mac_ContentionResolutionTimer)<<3)) {
UE_mac_inst[module_idP].RA_active = 0;
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
// Signal PHY to quit RA procedure
LOG_E(MAC,"Module id %u Contention resolution timer expired, RA failed\n", module_idP);
mac_xface->ra_failed(module_idP,0,eNB_indexP);
}
}
}
// Get RLC status info and update Bj for all lcids that are active
......@@ -2050,16 +2050,16 @@ ue_scheduler(
if (isNewTxSubframe)
#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)){
UE_mac_inst[module_idP].scheduling_info.retxBSR_SF --;
}
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)){
UE_mac_inst[module_idP].scheduling_info.retxBSR_SF --;
}
// Decrement Periodic Timer if it is running and not null
if ((UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF != MAC_UE_BSR_TIMER_NOT_RUNNING)
&& (UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF != 0)){
UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF--;
}
// Decrement Periodic Timer if it is running and not null
if ((UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF != MAC_UE_BSR_TIMER_NOT_RUNNING)
&& (UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF != 0)){
UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF--;
}
}
//Check whether Regular BSR is triggered
......
......@@ -179,11 +179,11 @@ typedef struct {
void (*dl_phy_sync_success) (module_id_t Mod_id,frame_t frameP, uint8_t CH_index,uint8_t first_sync);
/// Only calls the PDCP for now
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
UE_L2_STATE_t (*ue_scheduler)(module_id_t Mod_id, frame_t rxFrameP,sub_frame_t rxSubframe, nr_tti_t rxNRTti, frame_t txFrameP,sub_frame_t txSubframe, nr_tti_t txNRTti, lte_subframe_t direction, uint8_t eNB_id, int CC_id);
#else
UE_L2_STATE_t (*ue_scheduler)(module_id_t Mod_id, frame_t rxFrameP,sub_frame_t rxSubframe, frame_t txFrameP,sub_frame_t txSubframe, lte_subframe_t direction, uint8_t eNB_id, int CC_id);
#endif
//#else
// UE_L2_STATE_t (*ue_scheduler)(module_id_t Mod_id, frame_t rxFrameP,sub_frame_t rxSubframe, frame_t txFrameP,sub_frame_t txSubframe, lte_subframe_t direction, uint8_t eNB_id, int CC_id);
//#endif
/// PHY-Config-Dedicated UE
void (*phy_config_dedicated_ue)(module_id_t Mod_id,int CC_id,uint8_t CH_index,
......
......@@ -1279,12 +1279,12 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;
#ifdef UE_NR_PHY_DEMO
//#ifdef UE_NR_PHY_DEMO
// NR: Init to legacy LTE 20Mhz params
frame_parms[CC_id]->numerology_index = 0;
frame_parms[CC_id]->ttis_per_subframe = 1;
frame_parms[CC_id]->slots_per_tti = 2;
#endif
//#endif
downlink_frequency[CC_id][0] = 2680000000; // Use float to avoid issue with frequency over 2^31.
downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0];
......
This diff is collapsed.
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