Merge branch 'develop_integration_w30' into 'develop'
Summary of changes: - UE: new thread idx - UE: Pdcch optim - UE: slot0 slot1 parallelization - bugfixes for RLC AM (see gitlab issue 250) - fix bug "unknown UE_id for rnti" Note: due to the new UE threading architecture, oaisim and the phy simulators may not work properly anymore. Adaptation in the code has been done, automatic tests seem to pass, but it may not be enough. See merge request !215
This commit is contained in:
@@ -764,6 +764,7 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated )
|
||||
{
|
||||
|
||||
static uint8_t first_dedicated_configuration = 0;
|
||||
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
|
||||
|
||||
phy_vars_ue->total_TBS[eNB_id]=0;
|
||||
@@ -954,9 +955,13 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
get_cqipmiri_params(phy_vars_ue,eNB_id);
|
||||
|
||||
// disable MIB SIB decoding once we are on connected mode
|
||||
LOG_I(PHY,"Disabling SIB MIB decoding \n");
|
||||
phy_vars_ue->decode_SIB = 0;
|
||||
phy_vars_ue->decode_MIB = 0;
|
||||
first_dedicated_configuration ++;
|
||||
if(first_dedicated_configuration > 1)
|
||||
{
|
||||
LOG_I(PHY,"Disable SIB MIB decoding \n");
|
||||
phy_vars_ue->decode_SIB = 0;
|
||||
phy_vars_ue->decode_MIB = 0;
|
||||
}
|
||||
//phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
|
||||
if(phy_vars_ue->pdcch_vars[0][eNB_id]->crnti == 0x1234)
|
||||
phy_vars_ue->pdcch_vars[0][eNB_id]->crnti = phy_vars_ue->pdcch_vars[1][eNB_id]->crnti;
|
||||
@@ -1084,6 +1089,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
|
||||
LTE_UE_COMMON* const common_vars = &ue->common_vars;
|
||||
LTE_UE_PDSCH** const pdsch_vars_SI = ue->pdsch_vars_SI;
|
||||
LTE_UE_PDSCH** const pdsch_vars_ra = ue->pdsch_vars_ra;
|
||||
LTE_UE_PDSCH** const pdsch_vars_p = ue->pdsch_vars_p;
|
||||
LTE_UE_PDSCH** const pdsch_vars_mch = ue->pdsch_vars_MCH;
|
||||
LTE_UE_PDSCH* (*pdsch_vars_th)[][NUMBER_OF_CONNECTED_eNB_MAX+1] = &ue->pdsch_vars;
|
||||
LTE_UE_PDCCH* (*pdcch_vars_th)[][NUMBER_OF_CONNECTED_eNB_MAX] = &ue->pdcch_vars;
|
||||
@@ -1179,6 +1185,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
|
||||
|
||||
pdsch_vars_SI[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
|
||||
pdsch_vars_ra[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
|
||||
pdsch_vars_p[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
|
||||
pdsch_vars_mch[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
|
||||
prach_vars[eNB_id] = (LTE_UE_PRACH *)malloc16_clear(sizeof(LTE_UE_PRACH));
|
||||
pbch_vars[eNB_id] = (LTE_UE_PBCH *)malloc16_clear(sizeof(LTE_UE_PBCH));
|
||||
@@ -1242,6 +1249,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
|
||||
}
|
||||
phy_init_lte_ue__PDSCH( pdsch_vars_SI[eNB_id], fp );
|
||||
phy_init_lte_ue__PDSCH( pdsch_vars_ra[eNB_id], fp );
|
||||
phy_init_lte_ue__PDSCH( pdsch_vars_p[eNB_id], fp );
|
||||
phy_init_lte_ue__PDSCH( pdsch_vars_mch[eNB_id], fp );
|
||||
|
||||
// 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
|
||||
@@ -1306,6 +1314,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
|
||||
|
||||
pdsch_vars_SI[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) );
|
||||
pdsch_vars_ra[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) );
|
||||
pdsch_vars_p[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) );
|
||||
|
||||
if (abstraction_flag == 0) {
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
|
||||
@@ -129,6 +129,9 @@ void lte_param_init(unsigned char N_tx_port_eNB,
|
||||
|
||||
UE->perfect_ce = perfect_ce;
|
||||
|
||||
/* the UE code is multi-thread "aware", we need to setup this array */
|
||||
for (i = 0; i < 10; i++) UE->current_thread_id[i] = i % 2;
|
||||
|
||||
printf("Done lte_param_init\n");
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
{
|
||||
|
||||
static int max_pos_fil = 0;
|
||||
static int count_max_pos_ok = 0;
|
||||
static int first_time = 1;
|
||||
int temp = 0, i, aa, max_val = 0, max_pos = 0;
|
||||
int diff;
|
||||
short Re,Im,ncoef;
|
||||
@@ -58,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[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
|
||||
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].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[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)];
|
||||
temp += (Re*Re/2) + (Im*Im/2);
|
||||
}
|
||||
|
||||
@@ -78,28 +80,59 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
// do not filter to have proactive timing adjustment
|
||||
max_pos_fil = max_pos;
|
||||
|
||||
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
|
||||
if(subframe == 6)
|
||||
{
|
||||
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
|
||||
|
||||
if ( abs(diff) < SYNCH_HYST )
|
||||
ue->rx_offset = 0;
|
||||
else
|
||||
ue->rx_offset = diff;
|
||||
if ( abs(diff) < SYNCH_HYST )
|
||||
ue->rx_offset = 0;
|
||||
else
|
||||
ue->rx_offset = diff;
|
||||
|
||||
if ( ue->rx_offset < 0 )
|
||||
ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
|
||||
if(abs(diff)<5)
|
||||
count_max_pos_ok ++;
|
||||
else
|
||||
count_max_pos_ok = 0;
|
||||
|
||||
if ( ue->rx_offset >= FRAME_LENGTH_COMPLEX_SAMPLES )
|
||||
ue->rx_offset -= FRAME_LENGTH_COMPLEX_SAMPLES;
|
||||
if(count_max_pos_ok > 10 && first_time == 1)
|
||||
{
|
||||
first_time = 0;
|
||||
ue->time_sync_cell = 1;
|
||||
if (ue->mac_enabled==1) {
|
||||
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
|
||||
//mac_resynch();
|
||||
mac_xface->dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
|
||||
ue->UE_mode[0] = PRACH;
|
||||
}
|
||||
else {
|
||||
ue->UE_mode[0] = PUSCH;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ue->rx_offset < 0 )
|
||||
ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
|
||||
|
||||
if ( ue->rx_offset >= FRAME_LENGTH_COMPLEX_SAMPLES )
|
||||
ue->rx_offset -= FRAME_LENGTH_COMPLEX_SAMPLES;
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG_PHY
|
||||
LOG_D(PHY,"AbsSubframe %d.%d: rx_offset (after) = %d : max_pos = %d,max_pos_fil = %d (peak %d) target_pos %d \n",
|
||||
ue->proc.proc_rxtx[0].frame_rx,subframe,ue->rx_offset,max_pos,max_pos_fil,temp,(frame_parms->nb_prefix_samples>>3));
|
||||
#endif //DEBUG_PHY
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
|
||||
#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],
|
||||
diff,
|
||||
ue->rx_offset,
|
||||
clear,
|
||||
max_pos,
|
||||
max_pos_fil,
|
||||
temp,max_val,
|
||||
(frame_parms->nb_prefix_samples>>3));
|
||||
#endif //DEBUG_PHY
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
||||
int uespec_pilot[300];
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms;
|
||||
LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[(Ns>>1)%RX_NB_TH][eNB_id];
|
||||
LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[Ns>>1]][eNB_id];
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq;
|
||||
|
||||
harq_pid = dlsch_ue[0]->current_harq_pid;
|
||||
@@ -63,9 +63,9 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
||||
else
|
||||
rballoc = dlsch0_harq->rb_alloc_even;
|
||||
|
||||
rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF;
|
||||
rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[Ns>>1]].rxdataF;
|
||||
|
||||
dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[(Ns>>1)%RX_NB_TH][eNB_id]->dl_bf_ch_estimates;
|
||||
dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[Ns>>1]][eNB_id]->dl_bf_ch_estimates;
|
||||
beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
|
||||
|
||||
if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
|
||||
|
||||
@@ -49,12 +49,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
|
||||
|
||||
uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
||||
|
||||
uint8_t nushift,pilot1,pilot2,pilot3;
|
||||
uint8_t previous_sfn = ((Ns>>1) - 1 )< 0 ? 9 : (Ns>>1) - 1;
|
||||
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates[eNB_offset];
|
||||
int **dl_ch_estimates_previous=ue->common_vars.common_vars_rx_data_per_thread[(previous_sfn)%RX_NB_TH].dl_ch_estimates[eNB_offset];
|
||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF;
|
||||
uint8_t nushift,pilot0,pilot1,pilot2,pilot3;
|
||||
uint8_t previous_thread_id = ue->current_thread_id[Ns>>1]==0 ? (RX_NB_TH-1):(ue->current_thread_id[Ns>>1]-1);
|
||||
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset];
|
||||
int **dl_ch_estimates_previous=ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].dl_ch_estimates[eNB_offset];
|
||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF;
|
||||
|
||||
pilot0 = 0;
|
||||
if (ue->frame_parms.Ncp == 0) { // normal prefix
|
||||
pilot1 = 4;
|
||||
pilot2 = 7;
|
||||
@@ -93,7 +94,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
|
||||
k = (nu + nushift)%6;
|
||||
|
||||
#ifdef DEBUG_CH
|
||||
printf("Channel Estimation : eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d\n",eNB_offset,Nid_cell,ch_offset,ue->frame_parms.ofdm_symbol_size,
|
||||
printf("Channel Estimation : ThreadId %d, eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d\n",ue->current_thread_id[Ns>>1], eNB_offset,Nid_cell,ch_offset,ue->frame_parms.ofdm_symbol_size,
|
||||
ue->frame_parms.Ncp,l,Ns,k);
|
||||
#endif
|
||||
|
||||
@@ -797,18 +798,23 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
|
||||
break;
|
||||
}
|
||||
|
||||
// do ifft of channel estimate
|
||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
|
||||
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates[eNB_offset][(p<<1)+aarx])
|
||||
idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
|
||||
}
|
||||
|
||||
if( ((Ns%2) == 0) && (l == pilot0))
|
||||
{
|
||||
// do ifft of channel estimate
|
||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
|
||||
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx])
|
||||
{
|
||||
//LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
|
||||
idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
|
||||
}
|
||||
}
|
||||
}
|
||||
#if T_TRACER
|
||||
T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(eNB_id), T_INT(ue->Mod_id),
|
||||
T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx%1024), T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].subframe_rx),
|
||||
T_INT(0), T_BUFFER(&ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates_time[eNB_offset][0][0], 512 * 4));
|
||||
T_INT(ue->proc.proc_rxtx[ue->current_thread_id[Ns>>1]].frame_rx%1024), T_INT(ue->proc.proc_rxtx[ue->current_thread_id[Ns>>1]].subframe_rx),
|
||||
T_INT(0), T_BUFFER(&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][0][0], 512 * 4));
|
||||
#endif
|
||||
|
||||
return(0);
|
||||
|
||||
@@ -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[subframe%RX_NB_TH].dl_ch_estimates[0];
|
||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF;
|
||||
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;
|
||||
|
||||
ch_offset = (l*(ue->frame_parms.ofdm_symbol_size));
|
||||
symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
|
||||
@@ -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[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa]) {
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
|
||||
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],
|
||||
1);
|
||||
break;
|
||||
case 25:
|
||||
idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
|
||||
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],
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
|
||||
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],
|
||||
1);
|
||||
break;
|
||||
case 75:
|
||||
idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
|
||||
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],
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
|
||||
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],
|
||||
1);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -184,8 +184,9 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
|
||||
uint16_t Nid_cell = ue->frame_parms.Nid_cell;
|
||||
uint8_t eNB_offset,nu,l,nushift,k;
|
||||
uint16_t off;
|
||||
uint8_t previous_thread_id = ue->current_thread_id[subframe]==0 ? (RX_NB_TH-1):(ue->current_thread_id[subframe]-1);
|
||||
|
||||
//uint8_t isPss; // indicate if this is a slot for extracting PSS
|
||||
//uint8_t isPss; // indicate if this is a slot for extracting PSS
|
||||
//uint8_t isSss; // indicate if this is a slot for extracting SSS
|
||||
//int32_t pss_ext[4][72]; // contain the extracted 6*12 REs for mapping the PSS
|
||||
//int32_t sss_ext[4][72]; // contain the extracted 6*12 REs for mapping the SSS
|
||||
@@ -210,13 +211,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
|
||||
|
||||
if(ue->frame_parms.frame_type == FDD)
|
||||
{
|
||||
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(5*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(5*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
|
||||
}
|
||||
else
|
||||
{
|
||||
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF[aarx][(13*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(2*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].rxdataF[aarx][(13*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(2*ue->frame_parms.ofdm_symbol_size)];
|
||||
}
|
||||
//-ve spectrum from SSS
|
||||
|
||||
@@ -234,13 +235,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
|
||||
// printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS
|
||||
if(ue->frame_parms.frame_type == FDD)
|
||||
{
|
||||
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
|
||||
}
|
||||
else
|
||||
{
|
||||
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF[aarx][(14*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(3*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].rxdataF[aarx][(14*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(3*ue->frame_parms.ofdm_symbol_size)];
|
||||
}
|
||||
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
|
||||
// printf("pssm36 %d\n",ue->measurements.n0_power[aarx]);
|
||||
@@ -275,10 +276,10 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
|
||||
if (ue->frame_parms.Ncp==NORMAL) {
|
||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
||||
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(ue->current_thread_id[subframe])].rxdataF;
|
||||
rxF_pss = (int16_t *) &rxdataF[aarx][((pss_symb*(ue->frame_parms.ofdm_symbol_size)))];
|
||||
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].rxdataF;
|
||||
rxF_sss = (int16_t *) &rxdataF[aarx][((sss_symb*(ue->frame_parms.ofdm_symbol_size)))];
|
||||
|
||||
//-ve spectrum from SSS
|
||||
@@ -303,7 +304,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
|
||||
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+66]*rxF_pss[2+66])+((int32_t)rxF_pss[2+65]*rxF_pss[2+65]));
|
||||
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+64]*rxF_pss[2+64])+((int32_t)rxF_pss[2+63]*rxF_pss[2+63]));
|
||||
// printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
|
||||
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
|
||||
// printf("pssm36 %d\n",ue->measurements.n0_power[aarx]);
|
||||
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-70]*rxF_pss[-70])+((int32_t)rxF_pss[-69]*rxF_pss[-69]));
|
||||
@@ -349,7 +350,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
|
||||
#endif
|
||||
|
||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
||||
rxF = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(l*ue->frame_parms.ofdm_symbol_size)];
|
||||
rxF = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(l*ue->frame_parms.ofdm_symbol_size)];
|
||||
off = (ue->frame_parms.first_carrier_offset+k)<<1;
|
||||
|
||||
if (l==(4-ue->frame_parms.Ncp)) {
|
||||
@@ -515,7 +516,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
|
||||
ue->measurements.rx_spatial_power[eNB_id][aatx][aarx] =
|
||||
(signal_energy_nodc(&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0],
|
||||
(signal_energy_nodc(&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0],
|
||||
(N_RB_DL*12)));
|
||||
//- ue->measurements.n0_power[aarx];
|
||||
|
||||
@@ -608,8 +609,8 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
|
||||
// cqi/pmi information
|
||||
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4];
|
||||
dl_ch1 = &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][2+aarx][4];
|
||||
dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][aarx][4];
|
||||
dl_ch1 = &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2+aarx][4];
|
||||
|
||||
for (subband=0; subband<nb_subbands; subband++) {
|
||||
|
||||
@@ -664,13 +665,13 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i pmi128_re,pmi128_im,mmtmpPMI0,mmtmpPMI1 /* ,mmtmpPMI2,mmtmpPMI3 */ ;
|
||||
|
||||
dl_ch0_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4];
|
||||
dl_ch1_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][2+aarx][4];
|
||||
dl_ch0_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][aarx][4];
|
||||
dl_ch1_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2+aarx][4];
|
||||
#elif defined(__arm__)
|
||||
int32x4_t pmi128_re,pmi128_im,mmtmpPMI0,mmtmpPMI1,mmtmpPMI0b,mmtmpPMI1b;
|
||||
|
||||
dl_ch0_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4];
|
||||
dl_ch1_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][2+aarx][4];
|
||||
dl_ch0_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][aarx][4];
|
||||
dl_ch1_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2+aarx][4];
|
||||
|
||||
#endif
|
||||
for (subband=0; subband<nb_subbands; subband++) {
|
||||
@@ -764,7 +765,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
|
||||
else {
|
||||
// cqi information only for mode 1
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4];
|
||||
dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][aarx][4];
|
||||
|
||||
for (subband=0; subband<7; subband++) {
|
||||
|
||||
|
||||
+504
-164
File diff suppressed because it is too large
Load Diff
@@ -4788,11 +4788,12 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
|
||||
LOG_I(PHY,"[DCI-FORMAT-1-1A] rah %d\n", rah);
|
||||
LOG_I(PHY,"[DCI-FORMAT-1-1A] rballoc %x\n", rballoc);
|
||||
LOG_I(PHY,"[DCI-FORMAT-1-1A] mcs1 %d\n", mcs1);
|
||||
//LOG_I(PHY,"[DCI-FORMAT-1-1A] rv1 %d\n", rv1);
|
||||
//LOG_I(PHY,"[DCI-FORMAT-1-1A] ndi1 %d\n", ndi1);
|
||||
LOG_I(PHY,"[DCI-FORMAT-1-1A] rv1 %d\n", rv1);
|
||||
LOG_I(PHY,"[DCI-FORMAT-1-1A] ndi1 %d\n", ndi1);
|
||||
LOG_I(PHY,"[DCI-FORMAT-1-1A] TPC %d\n", TPC);
|
||||
#endif
|
||||
|
||||
|
||||
// I- check dci content minimum coherency
|
||||
if( ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) && harq_pid > 0)
|
||||
{
|
||||
@@ -5131,10 +5132,70 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format,
|
||||
return(1);
|
||||
}
|
||||
|
||||
void compute_llr_offset(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_UE_PDCCH *pdcch_vars,
|
||||
LTE_UE_PDSCH *pdsch_vars,
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq,
|
||||
uint8_t nb_rb_alloc,
|
||||
uint8_t subframe)
|
||||
{
|
||||
uint32_t pbch_pss_sss_re;
|
||||
uint32_t crs_re;
|
||||
uint32_t granted_re;
|
||||
uint32_t data_re;
|
||||
uint32_t llr_offset;
|
||||
uint8_t symbol;
|
||||
uint8_t symbol_mod;
|
||||
|
||||
pdsch_vars->llr_offset[pdcch_vars->num_pdcch_symbols] = 0;
|
||||
|
||||
//LOG_I(PHY,"compute_llr_offset: nb RB %d - Qm %d \n", nb_rb_alloc, dlsch0_harq->Qm);
|
||||
|
||||
//dlsch0_harq->rb_alloc_even;
|
||||
//dlsch0_harq->rb_alloc_odd;
|
||||
|
||||
for(symbol=pdcch_vars->num_pdcch_symbols; symbol<frame_parms->symbols_per_tti; symbol++)
|
||||
{
|
||||
symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol;
|
||||
if((symbol_mod == 0) || symbol_mod == (4-frame_parms->Ncp))
|
||||
{
|
||||
if (frame_parms->mode1_flag==0)
|
||||
crs_re = 4;
|
||||
else
|
||||
crs_re = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
crs_re = 0;
|
||||
}
|
||||
|
||||
granted_re = nb_rb_alloc * (12-crs_re);
|
||||
pbch_pss_sss_re = adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,dlsch0_harq->Qm,subframe,symbol);
|
||||
pbch_pss_sss_re = (double)pbch_pss_sss_re * ((double)(12-crs_re)/12);
|
||||
data_re = granted_re - pbch_pss_sss_re;
|
||||
llr_offset = data_re * dlsch0_harq->Qm * 2;
|
||||
|
||||
pdsch_vars->llr_length[symbol] = data_re;
|
||||
if(symbol < (frame_parms->symbols_per_tti-1))
|
||||
pdsch_vars->llr_offset[symbol+1] = pdsch_vars->llr_offset[symbol] + llr_offset;
|
||||
|
||||
//LOG_I(PHY,"Granted Re subframe %d / symbol %d => %d (%d RBs)\n", subframe, symbol_mod, granted_re,dlsch0_harq->nb_rb);
|
||||
//LOG_I(PHY,"Pbch/PSS/SSS Re subframe %d / symbol %d => %d \n", subframe, symbol_mod, pbch_pss_sss_re);
|
||||
//LOG_I(PHY,"CRS Re Per PRB subframe %d / symbol %d => %d \n", subframe, symbol_mod, crs_re);
|
||||
//LOG_I(PHY,"Data Re subframe %d / symbol %d => %d \n", subframe, symbol_mod, data_re);
|
||||
|
||||
|
||||
|
||||
//LOG_I(PHY,"Data Re subframe %d-symbol %d => llr length %d, llr offset %d \n", subframe, symbol,
|
||||
// pdsch_vars->llr_length[symbol], pdsch_vars->llr_offset[symbol]);
|
||||
}
|
||||
}
|
||||
void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
|
||||
uint8_t N_RB_DL,
|
||||
DCI_INFO_EXTRACTED_t *pdci_info_extarcted,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_UE_PDCCH *pdcch_vars,
|
||||
LTE_UE_PDSCH *pdsch_vars,
|
||||
uint8_t subframe,
|
||||
uint16_t rnti,
|
||||
uint16_t tc_rnti,
|
||||
@@ -5156,12 +5217,27 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
|
||||
uint8_t dai = pdci_info_extarcted->dai;
|
||||
|
||||
uint8_t NPRB = 0;
|
||||
uint8_t nb_rb_alloc = 0;
|
||||
|
||||
if(dci_format == format1A)
|
||||
{
|
||||
if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti))
|
||||
{
|
||||
NPRB = (TPC&1) + 2;
|
||||
switch (N_RB_DL) {
|
||||
case 6:
|
||||
nb_rb_alloc = RIV2nb_rb_LUT6[rballoc];//NPRB;
|
||||
break;
|
||||
case 25:
|
||||
nb_rb_alloc = RIV2nb_rb_LUT25[rballoc];//NPRB;
|
||||
break;
|
||||
case 50:
|
||||
nb_rb_alloc = RIV2nb_rb_LUT50[rballoc];//NPRB;
|
||||
break;
|
||||
case 100:
|
||||
nb_rb_alloc = RIV2nb_rb_LUT100[rballoc];//NPRB;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5179,11 +5255,13 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
|
||||
NPRB = RIV2nb_rb_LUT100[rballoc];//NPRB;
|
||||
break;
|
||||
}
|
||||
nb_rb_alloc = NPRB;
|
||||
}
|
||||
}
|
||||
else // format1
|
||||
{
|
||||
NPRB = conv_nprb(rah, rballoc, N_RB_DL);
|
||||
nb_rb_alloc = NPRB;
|
||||
}
|
||||
|
||||
pdlsch0->current_harq_pid = harq_pid;
|
||||
@@ -5213,30 +5291,32 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
|
||||
pdlsch0_harq->first_tx = 0;
|
||||
pdlsch0_harq->status = ACTIVE;
|
||||
|
||||
}else if (rv1 != 0 )
|
||||
//NDI has not been toggled but rv was increased by eNB: retransmission
|
||||
{
|
||||
if (pdlsch0_harq->status == SCH_IDLE)
|
||||
//packet was actually decoded in previous transmission (ACK was missed by eNB)
|
||||
//However, the round is not a good check as it might have been decoded in a retransmission prior to this one.
|
||||
{
|
||||
LOG_D(PHY,"skip pdsch decoding and report ack\n");
|
||||
// skip pdsch decoding and report ack
|
||||
//pdlsch0_harq->status = SCH_IDLE;
|
||||
pdlsch0->active = 0;
|
||||
pdlsch0->harq_ack[subframe].ack = 1;
|
||||
pdlsch0->harq_ack[subframe].harq_id = harq_pid;
|
||||
pdlsch0->harq_ack[subframe].send_harq_status = 1;
|
||||
|
||||
//pdlsch0_harq->first_tx = 0;
|
||||
}
|
||||
else //normal retransmission
|
||||
{
|
||||
// nothing special to do
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pdlsch0_harq->status = ACTIVE;
|
||||
}
|
||||
|
||||
else if (rv1 != 0 )
|
||||
//NDI has not been toggled but rv was increased by eNB: retransmission
|
||||
{
|
||||
if (pdlsch0_harq->status == SCH_IDLE)
|
||||
//packet was actually decoded in previous transmission (ACK was missed by eNB)
|
||||
//However, the round is not a good check as it might have been decoded in a retransmission prior to this one.
|
||||
{
|
||||
LOG_D(PHY,"skip pdsch decoding and report ack\n");
|
||||
// skip pdsch decoding and report ack
|
||||
//pdlsch0_harq->status = SCH_IDLE;
|
||||
pdlsch0->active = 0;
|
||||
pdlsch0->harq_ack[subframe].ack = 1;
|
||||
pdlsch0->harq_ack[subframe].harq_id = harq_pid;
|
||||
pdlsch0->harq_ack[subframe].send_harq_status = 1;
|
||||
|
||||
//pdlsch0_harq->first_tx = 0;
|
||||
}
|
||||
else //normal retransmission
|
||||
{
|
||||
// nothing special to do
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pdlsch0_harq->DCINdi = ndi1;
|
||||
@@ -5346,7 +5426,6 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
|
||||
pdlsch0_harq->rb_alloc_odd[2]= pdlsch0_harq->rb_alloc_even[2];
|
||||
pdlsch0_harq->rb_alloc_odd[3]= pdlsch0_harq->rb_alloc_even[3];
|
||||
}
|
||||
|
||||
if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti))
|
||||
{
|
||||
pdlsch0_harq->TBS = TBStable[mcs1][NPRB-1];
|
||||
@@ -5360,11 +5439,20 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
|
||||
pdlsch0_harq->Qm = get_Qm(mcs1);
|
||||
}
|
||||
}
|
||||
|
||||
compute_llr_offset(frame_parms,
|
||||
pdcch_vars,
|
||||
pdsch_vars,
|
||||
pdlsch0_harq,
|
||||
nb_rb_alloc,
|
||||
subframe);
|
||||
}
|
||||
|
||||
void prepare_dl_decoding_format1C(uint8_t N_RB_DL,
|
||||
DCI_INFO_EXTRACTED_t *pdci_info_extarcted,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_UE_PDCCH *pdcch_vars,
|
||||
LTE_UE_PDSCH *pdsch_vars,
|
||||
uint32_t rnti,
|
||||
uint32_t si_rnti,
|
||||
uint32_t ra_rnti,
|
||||
@@ -5467,6 +5555,14 @@ void prepare_dl_decoding_format1C(uint8_t N_RB_DL,
|
||||
AssertFatal(0,"Format 1C: Unknown N_RB_DL %d\n",frame_parms->N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
compute_llr_offset(frame_parms,
|
||||
pdcch_vars,
|
||||
pdsch_vars,
|
||||
pdlsch0_harq,
|
||||
pdlsch0_harq->nb_rb,
|
||||
subframe);
|
||||
|
||||
}
|
||||
|
||||
void compute_precoding_info_2cw(uint8_t tpmi, uint8_t tbswap, uint16_t pmi_alloc, LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_UE_HARQ_t *dlsch0_harq, LTE_DL_UE_HARQ_t *dlsch1_harq)
|
||||
@@ -5536,10 +5632,10 @@ switch (tpmi) {
|
||||
dlsch_harq->pmi_alloc = pmi_alloc;//pmi_convert(frame_parms,dlsch0->pmi_alloc,1);
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG_HARQ
|
||||
#ifdef DEBUG_HARQ
|
||||
printf ("[DCI UE] I am calling from the UE side pmi_alloc_new = %d with tpmi %d\n", dlsch_harq->pmi_alloc, tpmi);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void compute_precoding_info_format2A(uint8_t tpmi,
|
||||
uint8_t nb_antenna_ports_eNB,
|
||||
@@ -5640,6 +5736,8 @@ void compute_precoding_info_format2A(uint8_t tpmi,
|
||||
void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
||||
DCI_INFO_EXTRACTED_t *pdci_info_extarcted,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_UE_PDCCH *pdcch_vars,
|
||||
LTE_UE_PDSCH *pdsch_vars,
|
||||
uint16_t rnti,
|
||||
uint8_t subframe,
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq,
|
||||
@@ -5819,7 +5917,7 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
||||
if (TB0_active) {
|
||||
// printf("TB0 ndi1 =%d, dlsch0_harq->DCINdi =%d, dlsch0_harq->first_tx = %d\n", ndi1, dlsch0_harq->DCINdi, dlsch0_harq->first_tx);
|
||||
if ((ndi1!=dlsch0_harq->DCINdi) || (dlsch0_harq->first_tx==1)) {
|
||||
dlsch0_harq->round = 0;
|
||||
dlsch0_harq->round = 0;
|
||||
dlsch0_harq->status = ACTIVE;
|
||||
dlsch0_harq->DCINdi = ndi1;
|
||||
|
||||
@@ -5834,12 +5932,12 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
||||
//NDI has not been toggled but rv was increased by eNB: retransmission
|
||||
{
|
||||
if(dlsch0_harq->status == SCH_IDLE) {
|
||||
// skip pdsch decoding and report ack
|
||||
// skip pdsch decoding and report ack
|
||||
//dlsch0_harq->status = SCH_IDLE;
|
||||
pdlsch0->active = 0;
|
||||
pdlsch0->harq_ack[subframe].ack = 1;
|
||||
pdlsch0->harq_ack[subframe].harq_id = harq_pid;
|
||||
pdlsch0->harq_ack[subframe].send_harq_status = 1;
|
||||
pdlsch0->active = 0;
|
||||
pdlsch0->harq_ack[subframe].ack = 1;
|
||||
pdlsch0->harq_ack[subframe].harq_id = harq_pid;
|
||||
pdlsch0->harq_ack[subframe].send_harq_status = 1;
|
||||
}*/
|
||||
|
||||
// if Imcs in [29..31] TBS is assumed to be as determined from DCI transported in the latest
|
||||
@@ -5882,13 +5980,13 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
||||
//NDI has not been toggled but rv was increased by eNB: retransmission
|
||||
{
|
||||
if(dlsch1_harq->status == SCH_IDLE) {
|
||||
// skip pdsch decoding and report ack
|
||||
// skip pdsch decoding and report ack
|
||||
//dlsch1_harq->status = SCH_IDLE;
|
||||
pdlsch1->active = 0;
|
||||
pdlsch1->harq_ack[subframe].ack = 1;
|
||||
pdlsch1->harq_ack[subframe].harq_id = harq_pid;
|
||||
pdlsch1->harq_ack[subframe].send_harq_status = 1;
|
||||
}
|
||||
pdlsch1->active = 0;
|
||||
pdlsch1->harq_ack[subframe].ack = 1;
|
||||
pdlsch1->harq_ack[subframe].harq_id = harq_pid;
|
||||
pdlsch1->harq_ack[subframe].send_harq_status = 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
// if Imcs in [29..31] TBS is assumed to be as determined from DCI transported in the latest
|
||||
@@ -5911,7 +6009,16 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
||||
}
|
||||
|
||||
|
||||
compute_llr_offset(frame_parms,
|
||||
pdcch_vars,
|
||||
pdsch_vars,
|
||||
dlsch0_harq,
|
||||
dlsch0_harq->nb_rb,
|
||||
subframe);
|
||||
|
||||
|
||||
/* #ifdef DEBUG_HARQ
|
||||
printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status);
|
||||
printf("[DCI UE]: TB0_active %d , TB1_active %d\n", TB0_active, TB1_active);
|
||||
if (dlsch0 != NULL && dlsch1 != NULL)
|
||||
printf("[DCI UE] dlsch0_harq status = %d, dlsch1_harq status = %d\n", dlsch0_harq->status, dlsch1_harq->status);
|
||||
@@ -5927,6 +6034,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
void *dci_pdu,
|
||||
uint16_t rnti,
|
||||
DCI_format_t dci_format,
|
||||
LTE_UE_PDCCH *pdcch_vars,
|
||||
LTE_UE_PDSCH *pdsch_vars,
|
||||
LTE_UE_DLSCH_t **dlsch,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||
@@ -5938,10 +6047,10 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
{
|
||||
|
||||
uint8_t harq_pid=0;
|
||||
uint8_t frame_type=frame_parms->frame_type;
|
||||
uint8_t tpmi=0;
|
||||
LTE_UE_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL;
|
||||
uint8_t frame_type=frame_parms->frame_type;
|
||||
uint8_t tpmi=0;
|
||||
LTE_UE_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL;
|
||||
|
||||
DCI_INFO_EXTRACTED_t dci_info_extarcted;
|
||||
uint8_t status=0;
|
||||
@@ -6006,7 +6115,10 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
&dci_info_extarcted,
|
||||
dlsch0_harq);
|
||||
if(status == 0)
|
||||
{
|
||||
printf("bad DCI 1A !!! \n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
// dci is correct ==> update internal structure and prepare dl decoding
|
||||
#ifdef DEBUG_DCI
|
||||
@@ -6016,6 +6128,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
frame_parms->N_RB_DL,
|
||||
&dci_info_extarcted,
|
||||
frame_parms,
|
||||
pdcch_vars,
|
||||
pdsch_vars,
|
||||
subframe,
|
||||
rnti,
|
||||
tc_rnti,
|
||||
@@ -6066,6 +6180,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
prepare_dl_decoding_format1C(frame_parms->N_RB_DL,
|
||||
&dci_info_extarcted,
|
||||
frame_parms,
|
||||
pdcch_vars,
|
||||
pdsch_vars,
|
||||
rnti,
|
||||
si_rnti,
|
||||
ra_rnti,
|
||||
@@ -6107,7 +6223,11 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
&dci_info_extarcted,
|
||||
dlsch0_harq);
|
||||
if(status == 0)
|
||||
return(-1);
|
||||
{
|
||||
printf("bad DCI 1 !!! \n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
// dci is correct ==> update internal structure and prepare dl decoding
|
||||
#ifdef DEBUG_DCI
|
||||
@@ -6117,6 +6237,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
frame_parms->N_RB_DL,
|
||||
&dci_info_extarcted,
|
||||
frame_parms,
|
||||
pdcch_vars,
|
||||
pdsch_vars,
|
||||
subframe,
|
||||
rnti,
|
||||
tc_rnti,
|
||||
@@ -6130,7 +6252,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
|
||||
case format2:
|
||||
{
|
||||
//extract dci infomation
|
||||
// extract dci infomation
|
||||
//LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame, subframe);
|
||||
extract_dci2_info(frame_parms->N_RB_DL,
|
||||
frame_type,
|
||||
@@ -6143,8 +6265,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
dlsch[0]->active = 1;
|
||||
dlsch[1]->active = 1;
|
||||
|
||||
dlsch0 = dlsch[0];
|
||||
dlsch1 = dlsch[1];
|
||||
dlsch0 = dlsch[0];
|
||||
dlsch1 = dlsch[1];
|
||||
|
||||
dlsch0_harq = dlsch0->harq_processes[dci_info_extarcted.harq_pid];
|
||||
dlsch1_harq = dlsch1->harq_processes[dci_info_extarcted.harq_pid];
|
||||
@@ -6171,13 +6293,15 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
prepare_dl_decoding_format2_2A(format2,
|
||||
&dci_info_extarcted,
|
||||
frame_parms,
|
||||
pdcch_vars,
|
||||
pdsch_vars,
|
||||
rnti,
|
||||
subframe,
|
||||
dlsch0_harq,
|
||||
dlsch1_harq,
|
||||
dlsch0,
|
||||
dlsch1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case format2A:
|
||||
@@ -6224,6 +6348,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
prepare_dl_decoding_format2_2A(format2A,
|
||||
&dci_info_extarcted,
|
||||
frame_parms,
|
||||
pdcch_vars,
|
||||
pdsch_vars,
|
||||
rnti,
|
||||
subframe,
|
||||
dlsch0_harq,
|
||||
@@ -6231,7 +6357,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
dlsch0,
|
||||
dlsch1);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case format1E_2A_M10PRB:
|
||||
if (!dlsch[0]) return -1;
|
||||
@@ -7229,7 +7355,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
|
||||
uint8_t transmission_mode = ue->transmission_mode[eNB_id];
|
||||
ANFBmode_t AckNackFBMode;
|
||||
LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
|
||||
LTE_UE_DLSCH_t **dlsch = ue->dlsch[subframe%RX_NB_TH][0];
|
||||
LTE_UE_DLSCH_t **dlsch = ue->dlsch[ue->current_thread_id[subframe]][0];
|
||||
PHY_MEASUREMENTS *meas = &ue->measurements;
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
// uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id];
|
||||
@@ -8036,7 +8162,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
|
||||
//int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4);
|
||||
int dl_subframe = subframe;
|
||||
|
||||
if (ue->dlsch[dl_subframe%RX_NB_TH][eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission
|
||||
if (ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission
|
||||
ulsch->harq_processes[harq_pid]->O_ACK = 1;
|
||||
} else {
|
||||
ulsch->harq_processes[harq_pid]->O_ACK = 0;
|
||||
@@ -8795,7 +8921,7 @@ double sinr_eff_cqi_calc(PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe)
|
||||
uint8_t transmission_mode = ue->transmission_mode[eNB_id];
|
||||
PHY_MEASUREMENTS *meas = &ue->measurements;
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
int32_t **dl_channel_est = ue->common_vars.common_vars_rx_data_per_thread[subframe %RX_NB_TH].dl_ch_estimates[eNB_id];
|
||||
int32_t **dl_channel_est = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id];
|
||||
double *s_dB;
|
||||
s_dB = ue->sinr_CQI_dB;
|
||||
// LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
|
||||
|
||||
@@ -781,6 +781,10 @@ typedef enum {
|
||||
pucch_format3 // PUCCH format3
|
||||
} PUCCH_FMT_t;
|
||||
|
||||
typedef enum {
|
||||
DCI_COMMON_SPACE,
|
||||
DCI_UE_SPACE
|
||||
} dci_space_t;
|
||||
|
||||
typedef struct {
|
||||
/// Length of DCI in bits
|
||||
@@ -795,6 +799,8 @@ typedef struct {
|
||||
rnti_t rnti;
|
||||
/// Format
|
||||
DCI_format_t format;
|
||||
/// search space
|
||||
dci_space_t search_space;
|
||||
/// DCI pdu
|
||||
uint8_t dci_pdu[8];
|
||||
} DCI_ALLOC_t;
|
||||
|
||||
@@ -272,7 +272,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
|
||||
return(max_turbo_iterations);
|
||||
}*/
|
||||
|
||||
/*harq_pid = dlsch->current_harq_pid[subframe%RX_NB_TH];
|
||||
/*harq_pid = dlsch->current_harq_pid[phy_vars_ue->current_thread_id[subframe]];
|
||||
if (harq_pid >= 8) {
|
||||
printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid);
|
||||
return(max_turbo_iterations);
|
||||
@@ -962,9 +962,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
|
||||
break;
|
||||
|
||||
case PDSCH: // TB0
|
||||
dlsch_ue = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0];
|
||||
dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0];
|
||||
harq_pid = dlsch_ue->current_harq_pid;
|
||||
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]);
|
||||
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]);
|
||||
DevAssert( ue_id != (uint32_t)-1 );
|
||||
dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch[ue_id][0];
|
||||
|
||||
@@ -1008,9 +1008,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
|
||||
break;
|
||||
|
||||
case PDSCH1: { // TB1
|
||||
dlsch_ue = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][1];
|
||||
dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1];
|
||||
harq_pid = dlsch_ue->current_harq_pid;
|
||||
int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] );
|
||||
int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] );
|
||||
DevAssert( UE_id != -1 );
|
||||
dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch[UE_id][1];
|
||||
// reset HARQ
|
||||
@@ -1062,7 +1062,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
|
||||
break;
|
||||
|
||||
default:
|
||||
dlsch_ue = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0];
|
||||
dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0];
|
||||
LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id);
|
||||
dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations;
|
||||
return(1+dlsch_ue->max_turbo_iterations);
|
||||
|
||||
@@ -111,10 +111,14 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
int avg_0[2];
|
||||
int avg_1[2];
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
uint8_t slot = 0;
|
||||
#endif
|
||||
|
||||
unsigned char aatx,aarx;
|
||||
|
||||
unsigned short nb_rb = 0, round;
|
||||
int avgs, rb;
|
||||
int avgs = 0, rb;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq,*dlsch1_harq = 0;
|
||||
|
||||
uint8_t beamforming_mode;
|
||||
@@ -143,8 +147,8 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
break;
|
||||
|
||||
case PDSCH:
|
||||
pdsch_vars = ue->pdsch_vars[subframe%RX_NB_TH];
|
||||
dlsch = ue->dlsch[subframe%RX_NB_TH][eNB_id];
|
||||
pdsch_vars = ue->pdsch_vars[ue->current_thread_id[subframe]];
|
||||
dlsch = ue->dlsch[ue->current_thread_id[subframe]][eNB_id];
|
||||
//printf("status TB0 = %d, status TB1 = %d \n", dlsch[0]->harq_processes[harq_pid]->status, dlsch[1]->harq_processes[harq_pid]->status);
|
||||
LOG_D(PHY,"AbsSubframe %d.%d / Sym %d harq_pid %d, harq status %d.%d \n",
|
||||
frame,subframe,symbol,harq_pid,
|
||||
@@ -247,6 +251,14 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
if(symbol > ue->frame_parms.symbols_per_tti>>1)
|
||||
{
|
||||
slot = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_HARQ
|
||||
printf("Demod dlsch0_harq->pmi_alloc %d\n", dlsch0_harq->pmi_alloc);
|
||||
#endif
|
||||
@@ -256,8 +268,11 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
LOG_I(PHY,"dlsch: using pmi %x (%p), rb_alloc %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch[0],dlsch0_harq->rb_alloc_even[0]);
|
||||
#endif
|
||||
|
||||
nb_rb = dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#endif
|
||||
nb_rb = dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
|
||||
pdsch_vars[eNB_id]->rxdataF_ext,
|
||||
pdsch_vars[eNB_id]->dl_ch_estimates_ext,
|
||||
dlsch0_harq->pmi_alloc,
|
||||
@@ -277,8 +292,8 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
|
||||
if (rx_type >= rx_IC_single_stream) {
|
||||
if (eNB_id_i<ue->n_connected_eNB) // we are in TM5
|
||||
nb_rb = dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id_i],
|
||||
nb_rb = dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id_i],
|
||||
pdsch_vars[eNB_id_i]->rxdataF_ext,
|
||||
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
|
||||
dlsch0_harq->pmi_alloc,
|
||||
@@ -290,8 +305,8 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
frame_parms,
|
||||
dlsch0_harq->mimo_mode);
|
||||
else
|
||||
nb_rb = dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
|
||||
nb_rb = dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
|
||||
pdsch_vars[eNB_id_i]->rxdataF_ext,
|
||||
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
|
||||
dlsch0_harq->pmi_alloc,
|
||||
@@ -304,8 +319,8 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
dlsch0_harq->mimo_mode);
|
||||
}
|
||||
} else if (beamforming_mode==0) { //else if nb_antennas_ports_eNB==1 && beamforming_mode == 0
|
||||
nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
|
||||
nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
|
||||
pdsch_vars[eNB_id]->rxdataF_ext,
|
||||
pdsch_vars[eNB_id]->dl_ch_estimates_ext,
|
||||
dlsch0_harq->pmi_alloc,
|
||||
@@ -318,8 +333,8 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
|
||||
if (rx_type==rx_IC_single_stream) {
|
||||
if (eNB_id_i<ue->n_connected_eNB)
|
||||
nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id_i],
|
||||
nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id_i],
|
||||
pdsch_vars[eNB_id_i]->rxdataF_ext,
|
||||
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
|
||||
dlsch0_harq->pmi_alloc,
|
||||
@@ -330,8 +345,8 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
ue->high_speed_flag,
|
||||
frame_parms);
|
||||
else
|
||||
nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
|
||||
nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
|
||||
pdsch_vars[eNB_id_i]->rxdataF_ext,
|
||||
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
|
||||
dlsch0_harq->pmi_alloc,
|
||||
@@ -343,7 +358,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
frame_parms);
|
||||
}
|
||||
} else if (beamforming_mode==7) { //else if beamforming_mode == 7
|
||||
nb_rb = dlsch_extract_rbs_TM7(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
|
||||
nb_rb = dlsch_extract_rbs_TM7(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
|
||||
pdsch_vars[eNB_id]->dl_bf_ch_estimates,
|
||||
pdsch_vars[eNB_id]->rxdataF_ext,
|
||||
pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext,
|
||||
@@ -363,12 +378,20 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_PHY
|
||||
LOG_D(PHY,"[DLSCH] nb_rb %d log2_maxh = %d (%d,%d)\n",nb_rb,pdsch_vars[eNB_id]->log2_maxh,avg[0],avgs);
|
||||
LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %d.%d] Slot%d Symbol %d Flag %d type %d: Pilot/Data extraction %5.2f \n",frame,subframe,slot,
|
||||
symbol,ue->high_speed_flag,type,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d Flag %d type %d: Pilot/Data extraction %5.2f \n",frame,subframe,slot,symbol,
|
||||
ue->high_speed_flag,type,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#endif
|
||||
aatx = frame_parms->nb_antenna_ports_eNB;
|
||||
aarx = frame_parms->nb_antennas_rx;
|
||||
|
||||
@@ -391,6 +414,18 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
nb_rb);
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %d.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#endif
|
||||
if (first_symbol_flag==1) {
|
||||
if (beamforming_mode==0){
|
||||
if (dlsch0_harq->mimo_mode<LARGE_CDD) {
|
||||
@@ -481,8 +516,20 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
avg[0],avgs);
|
||||
//LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode);
|
||||
#endif
|
||||
|
||||
//wait until pdcch is decoded
|
||||
//proc->channel_level = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
uint32_t wait = 0;
|
||||
while(proc->channel_level == 0)
|
||||
{
|
||||
usleep(1);
|
||||
wait++;
|
||||
}
|
||||
*/
|
||||
|
||||
#if T_TRACER
|
||||
if (type == PDSCH)
|
||||
{
|
||||
@@ -491,6 +538,19 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %d.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,subframe,slot,symbol,first_symbol_flag,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,subframe,slot,symbol,first_symbol_flag,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#endif
|
||||
// Now channel compensation
|
||||
if (dlsch0_harq->mimo_mode<LARGE_CDD) {
|
||||
dlsch_channel_compensation(pdsch_vars[eNB_id]->rxdataF_ext,
|
||||
@@ -685,8 +745,18 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
measurements); // log2_maxh+I0_shift
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
// MRC
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#endif
|
||||
|
||||
if (frame_parms->nb_antennas_rx > 1) {
|
||||
if ((dlsch0_harq->mimo_mode == LARGE_CDD) ||
|
||||
@@ -754,31 +824,59 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
//i_mod should have been passed as a parameter
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %d.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#endif
|
||||
//printf("LLR dlsch0_harq->Qm %d rx_type %d cw0 %d cw1 %d symbol %d \n",dlsch0_harq->Qm,rx_type,codeword_TB0,codeword_TB1,symbol);
|
||||
// compute LLRs
|
||||
// -> // compute @pointer where llrs should filled for this ofdm-symbol
|
||||
int8_t *pllr_symbol_cw0;
|
||||
int8_t *pllr_symbol_cw1;
|
||||
uint32_t llr_offset_symbol;
|
||||
llr_offset_symbol = pdsch_vars[eNB_id]->llr_offset[symbol];
|
||||
pllr_symbol_cw0 = (int8_t*)pdsch_vars[eNB_id]->llr[0];
|
||||
pllr_symbol_cw1 = (int8_t*)pdsch_vars[eNB_id]->llr[1];
|
||||
pllr_symbol_cw0 += llr_offset_symbol;
|
||||
pllr_symbol_cw1 += llr_offset_symbol;
|
||||
|
||||
/*LOG_I(PHY,"compute LLRs [AbsSubframe %d.%d-%d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n",
|
||||
proc->frame_rx, proc->subframe_rx,symbol,
|
||||
nb_rb,dlsch0_harq->Qm,
|
||||
pdsch_vars[eNB_id]->llr_length[symbol],
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
(int16_t*)pdsch_vars[eNB_id]->llr[0],
|
||||
pllr_symbol);*/
|
||||
|
||||
switch (dlsch0_harq->Qm) {
|
||||
case 2 :
|
||||
if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
|
||||
dlsch_qpsk_llr(frame_parms,
|
||||
pdsch_vars[eNB_id]->rxdataF_comp0,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
(int16_t*)pllr_symbol_cw0,
|
||||
symbol,
|
||||
first_symbol_flag,
|
||||
nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128,
|
||||
beamforming_mode);
|
||||
|
||||
} else if (codeword_TB0 == -1){
|
||||
|
||||
dlsch_qpsk_llr(frame_parms,
|
||||
pdsch_vars[eNB_id]->rxdataF_comp0,
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
(int16_t*)pllr_symbol_cw1,
|
||||
symbol,
|
||||
first_symbol_flag,
|
||||
nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream,
|
||||
beamforming_mode);
|
||||
}
|
||||
else if (rx_type >= rx_IC_single_stream) {
|
||||
@@ -945,22 +1043,22 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
|
||||
dlsch_64qam_llr(frame_parms,
|
||||
pdsch_vars[eNB_id]->rxdataF_comp0,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
(int16_t*)pllr_symbol_cw0,
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
pdsch_vars[eNB_id]->dl_ch_magb0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128,
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
beamforming_mode);
|
||||
} else if (codeword_TB0 == -1){
|
||||
dlsch_64qam_llr(frame_parms,
|
||||
pdsch_vars[eNB_id]->rxdataF_comp0,
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
(int16_t*)pllr_symbol_cw1,
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
pdsch_vars[eNB_id]->dl_ch_magb0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream,
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
beamforming_mode);
|
||||
}
|
||||
else if (rx_type >= rx_IC_single_stream) {
|
||||
@@ -1017,10 +1115,10 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
dl_ch_mag_ptr,//i
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
(int16_t*)pllr_symbol_cw0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol]);
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
dlsch_64qam_64qam_llr(frame_parms,
|
||||
rxdataF_comp_ptr,
|
||||
@@ -1028,10 +1126,10 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
dl_ch_mag_ptr,
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,//i
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
(int16_t*)pllr_symbol_cw1,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1047,10 +1145,9 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
if (rx_type==rx_standard) {
|
||||
dlsch_qpsk_llr(frame_parms,
|
||||
pdsch_vars[eNB_id]->rxdataF_comp0,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
(int16_t*)pllr_symbol_cw0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128,
|
||||
beamforming_mode);
|
||||
}
|
||||
break;
|
||||
@@ -1070,12 +1167,12 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
if (rx_type==rx_standard) {
|
||||
dlsch_64qam_llr(frame_parms,
|
||||
pdsch_vars[eNB_id]->rxdataF_comp0,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
(int16_t*)pllr_symbol_cw0,
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
pdsch_vars[eNB_id]->dl_ch_magb0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128,
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
beamforming_mode);
|
||||
}
|
||||
break;
|
||||
@@ -1086,6 +1183,14 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
}
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %d.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
// Please keep it: useful for debugging
|
||||
#if 0
|
||||
if( (symbol == 13) && (subframe==0) && (dlsch0_harq->Qm == 6) /*&& (nb_rb==25)*/)
|
||||
@@ -1094,12 +1199,12 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
if(1)
|
||||
{
|
||||
#if 1
|
||||
write_output("rxdataF0.m" , "rxdataF0", &common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[0][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
//write_output("rxdataF1.m" , "rxdataF1", &common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[0][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
write_output("dl_ch_estimates00.m", "dl_ch_estimates00", &common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][0][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
//write_output("dl_ch_estimates01.m", "dl_ch_estimates01", &common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][1][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
//write_output("dl_ch_estimates10.m", "dl_ch_estimates10", &common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][2][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
//write_output("dl_ch_estimates11.m", "dl_ch_estimates11", &common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][3][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
write_output("rxdataF0.m" , "rxdataF0", &common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[0][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
//write_output("rxdataF1.m" , "rxdataF1", &common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[0][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
write_output("dl_ch_estimates00.m", "dl_ch_estimates00", &common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
//write_output("dl_ch_estimates01.m", "dl_ch_estimates01", &common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][1][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
//write_output("dl_ch_estimates10.m", "dl_ch_estimates10", &common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
//write_output("dl_ch_estimates11.m", "dl_ch_estimates11", &common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][3][0],14*frame_parms->ofdm_symbol_size,1,1);
|
||||
|
||||
|
||||
//write_output("rxdataF_ext00.m" , "rxdataF_ext00", &pdsch_vars[eNB_id]->rxdataF_ext[0][0],14*frame_parms->N_RB_DL*12,1,1);
|
||||
@@ -1132,7 +1237,6 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
T_BUFFER(&pdsch_vars[eNB_id]->rxdataF_comp0[eNB_id][0],
|
||||
2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL *12*frame_parms->symbols_per_tti*2));
|
||||
#endif
|
||||
|
||||
return(0);
|
||||
|
||||
}
|
||||
@@ -3464,11 +3568,11 @@ void dlsch_channel_level(int **dl_ch_estimates_ext,
|
||||
*/
|
||||
}
|
||||
|
||||
avg[(aatx<<1)+aarx] = (((int32_t*)&avg128D)[0] +
|
||||
((int32_t*)&avg128D)[1] +
|
||||
((int32_t*)&avg128D)[2] +
|
||||
avg[(aatx<<1)+aarx] =(((int32_t*)&avg128D)[0] +
|
||||
((int32_t*)&avg128D)[1] +
|
||||
((int32_t*)&avg128D)[2] +
|
||||
((int32_t*)&avg128D)[3])/y;
|
||||
//printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
|
||||
// printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
|
||||
}
|
||||
|
||||
_mm_empty();
|
||||
@@ -4644,7 +4748,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
|
||||
unsigned char subframe,
|
||||
uint32_t high_speed_flag,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
MIMO_mode_t mimo_mode) {
|
||||
MIMO_mode_t mimo_mode) {
|
||||
|
||||
int prb,nb_rb=0;
|
||||
int prb_off,prb_off2;
|
||||
@@ -5934,50 +6038,50 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *c
|
||||
|
||||
sprintf(fname,"dlsch%d_rxF_r%d_ext0.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_rxF_r%d_ext0",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||
|
||||
if (ue->frame_parms.nb_antennas_rx >1) {
|
||||
sprintf(fname,"dlsch%d_rxF_r%d_ext1.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_rxF_r%d_ext1",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1);
|
||||
}
|
||||
|
||||
sprintf(fname,"dlsch%d_ch_r%d_ext00.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_ch_r%d_ext00",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||
|
||||
if (ue->transmission_mode[eNB_id]==7){
|
||||
sprintf(fname,"dlsch%d_bf_ch_r%d.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_bf_ch_r%d",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1);
|
||||
//write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_bf_ch_estimates[0],512,1,1);
|
||||
|
||||
sprintf(fname,"dlsch%d_bf_ch_r%d_ext00.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_bf_ch_r%d_ext00",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||
}
|
||||
|
||||
if (ue->frame_parms.nb_antennas_rx == 2) {
|
||||
sprintf(fname,"dlsch%d_ch_r%d_ext01.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_ch_r%d_ext01",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
|
||||
}
|
||||
|
||||
if (ue->frame_parms.nb_antenna_ports_eNB == 2) {
|
||||
sprintf(fname,"dlsch%d_ch_r%d_ext10.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_ch_r%d_ext10",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
|
||||
|
||||
if (ue->frame_parms.nb_antennas_rx == 2) {
|
||||
sprintf(fname,"dlsch%d_ch_r%d_ext11.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_ch_r%d_ext11",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(fname,"dlsch%d_rxF_r%d_uespec0.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_rxF_r%d_uespec0",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1);
|
||||
|
||||
/*
|
||||
write_output("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
|
||||
@@ -5987,31 +6091,31 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *c
|
||||
sprintf(fname,"dlsch%d_r%d_rho.m",eNB_id,round);
|
||||
sprintf(vname,"dl_rho_r%d_%d",eNB_id,round);
|
||||
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
|
||||
|
||||
sprintf(fname,"dlsch%d_r%d_rho2.m",eNB_id,round);
|
||||
sprintf(vname,"dl_rho2_r%d_%d",eNB_id,round);
|
||||
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||
|
||||
sprintf(fname,"dlsch%d_rxF_r%d_comp0.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_rxF_r%d_comp0",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
|
||||
if (ue->frame_parms.nb_antenna_ports_eNB == 2) {
|
||||
sprintf(fname,"dlsch%d_rxF_r%d_comp1.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_rxF_r%d_comp1",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
|
||||
}
|
||||
|
||||
sprintf(fname,"dlsch%d_rxF_r%d_llr.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_r%d_llr",eNB_id,round);
|
||||
write_output(fname,vname, ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->llr[0],coded_bits_per_codeword[0],1,0);
|
||||
write_output(fname,vname, ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->llr[0],coded_bits_per_codeword[0],1,0);
|
||||
sprintf(fname,"dlsch%d_r%d_mag1.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_r%d_mag1",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_mag0[0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0],12*N_RB_DL*nsymb,1,1);
|
||||
sprintf(fname,"dlsch%d_r%d_mag2.m",eNB_id,round);
|
||||
sprintf(vname,"dl%d_r%d_mag2",eNB_id,round);
|
||||
write_output(fname,vname,ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_magb0[0],12*N_RB_DL*nsymb,1,1);
|
||||
write_output(fname,vname,ue->pdsch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_magb0[0],12*N_RB_DL*nsymb,1,1);
|
||||
|
||||
// printf("log2_maxh = %d\n",ue->pdsch_vars[eNB_id]->log2_maxh);
|
||||
}
|
||||
|
||||
@@ -636,7 +636,6 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t first_symbol_flag,
|
||||
uint16_t nb_rb,
|
||||
uint16_t pbch_pss_sss_adjust,
|
||||
int16_t **llr32p,
|
||||
uint8_t beamforming_mode)
|
||||
{
|
||||
|
||||
@@ -645,12 +644,14 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int i,len;
|
||||
uint8_t symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol;
|
||||
|
||||
/*
|
||||
if (first_symbol_flag==1) {
|
||||
llr32 = (uint32_t*)dlsch_llr;
|
||||
} else {
|
||||
llr32 = (uint32_t*)(*llr32p);
|
||||
}
|
||||
}*/
|
||||
|
||||
llr32 = (uint32_t*)dlsch_llr;
|
||||
if (!llr32) {
|
||||
msg("dlsch_qpsk_llr: llr is null, symbol %d, llr32=%p\n",symbol, llr32);
|
||||
return(-1);
|
||||
@@ -672,6 +673,13 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
|
||||
//printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
|
||||
/*LOG_I(PHY,"dlsch_qpsk_llr: [symb %d / FirstSym %d / Length %d]: @LLR Buff %x, @LLR Buff(symb) %x \n",
|
||||
symbol,
|
||||
first_symbol_flag,
|
||||
len,
|
||||
dlsch_llr,
|
||||
llr32);*/
|
||||
|
||||
//printf("ll32p=%p , dlsch_llr=%p, symbol=%d, flag=%d \n", llr32, dlsch_llr, symbol, first_symbol_flag);
|
||||
for (i=0; i<len; i++) {
|
||||
*llr32 = *rxF;
|
||||
@@ -680,7 +688,7 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
llr32++;
|
||||
}
|
||||
|
||||
*llr32p = (int16_t *)llr32;
|
||||
//*llr32p = (int16_t *)llr32;
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -1040,7 +1048,8 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t first_symbol_flag,
|
||||
uint16_t nb_rb,
|
||||
uint16_t pbch_pss_sss_adjust,
|
||||
int16_t **llr_save,
|
||||
//int16_t **llr_save,
|
||||
uint32_t llr_offset,
|
||||
uint8_t beamforming_mode)
|
||||
{
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
@@ -1054,11 +1063,18 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char symbol_mod,len_mod4;
|
||||
short *llr;
|
||||
int16_t *llr2;
|
||||
int8_t *pllr_symbol;
|
||||
|
||||
/*
|
||||
if (first_symbol_flag==1)
|
||||
llr = dlsch_llr;
|
||||
else
|
||||
llr = *llr_save;
|
||||
*/
|
||||
llr = dlsch_llr;
|
||||
|
||||
pllr_symbol = (int8_t*)dlsch_llr;
|
||||
pllr_symbol += llr_offset;
|
||||
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
@@ -1082,6 +1098,15 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
len = (nb_rb*12) - pbch_pss_sss_adjust;
|
||||
}
|
||||
|
||||
// printf("dlsch_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
|
||||
|
||||
/* LOG_I(PHY,"dlsch_64qam_llr [symb %d / FirstSym %d / Length %d]: @LLR Buff %x \n",
|
||||
symbol,
|
||||
first_symbol_flag,
|
||||
len,
|
||||
dlsch_llr,
|
||||
pllr_symbol);*/
|
||||
|
||||
llr2 = llr;
|
||||
llr += (len*6);
|
||||
|
||||
@@ -1176,7 +1201,6 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
}
|
||||
|
||||
*llr_save = llr;
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
@@ -8789,7 +8813,8 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t first_symbol_flag,
|
||||
uint16_t nb_rb,
|
||||
uint16_t pbch_pss_sss_adjust,
|
||||
int16_t **llr16p)
|
||||
//int16_t **llr16p,
|
||||
uint32_t llr_offset)
|
||||
{
|
||||
|
||||
int16_t *rxF = (int16_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
|
||||
@@ -8798,16 +8823,18 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int16_t *ch_mag_i = (int16_t*)&dl_ch_mag_i[0][(symbol*frame_parms->N_RB_DL*12)];
|
||||
int16_t *rho = (int16_t*)&rho_i[0][(symbol*frame_parms->N_RB_DL*12)];
|
||||
int16_t *llr16;
|
||||
int8_t *pllr_symbol; // pointer where llrs should filled for this ofdm symbol
|
||||
int len;
|
||||
uint8_t symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol;
|
||||
|
||||
//first symbol has different structure due to more pilots
|
||||
if (first_symbol_flag == 1) {
|
||||
/*if (first_symbol_flag == 1) {
|
||||
llr16 = (int16_t*)dlsch_llr;
|
||||
} else {
|
||||
llr16 = (int16_t*)(*llr16p);
|
||||
}
|
||||
}*/
|
||||
|
||||
llr16 = (int16_t*)dlsch_llr;
|
||||
if (!llr16) {
|
||||
msg("dlsch_64qam_64qam_llr: llr is null, symbol %d\n",symbol);
|
||||
return(-1);
|
||||
@@ -8826,6 +8853,18 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
len = (nb_rb*12) - pbch_pss_sss_adjust;
|
||||
}
|
||||
|
||||
pllr_symbol = (int8_t*)dlsch_llr;
|
||||
pllr_symbol += llr_offset;
|
||||
//printf("dlsch_64qam_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
|
||||
/*LOG_I(PHY,"dlsch_64qam_64qam_llr [symb %d / FirstSym %d / Length %d / LLR Offset %d]: @LLR Buff %x, @LLR Buff(symb) %x, , @Compute LLR Buff(symb) %x \n",
|
||||
symbol,
|
||||
first_symbol_flag,
|
||||
len,
|
||||
llr_offset,
|
||||
(int16_t*)dlsch_llr,
|
||||
llr16,
|
||||
pllr_symbol);*/
|
||||
|
||||
#ifdef __AVX2__
|
||||
|
||||
// Round length up to multiple of 16 words
|
||||
@@ -8859,6 +8898,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
(int32_t *) rho_256i,
|
||||
len);
|
||||
#endif
|
||||
|
||||
free16(rxF_256i, sizeof(rxF_256i));
|
||||
free16(rxF_i_256i, sizeof(rxF_i_256i));
|
||||
free16(ch_mag_256i, sizeof(ch_mag_256i));
|
||||
@@ -8876,6 +8916,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
#endif
|
||||
|
||||
llr16 += (6*len);
|
||||
*llr16p = (short *)llr16;
|
||||
//*llr16p = (short *)llr16;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -233,19 +233,17 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
|
||||
break;
|
||||
}
|
||||
|
||||
ue->proc.proc_rxtx[0].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||
ue->proc.proc_rxtx[0].frame_rx += frame_mod4;
|
||||
|
||||
ue->proc.proc_rxtx[1].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||
ue->proc.proc_rxtx[1].frame_rx += frame_mod4;
|
||||
for(int i=0; i<RX_NB_TH;i++)
|
||||
{
|
||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||
|
||||
#ifndef USER_MODE
|
||||
// one frame delay
|
||||
ue->proc.proc_rxtx[0].frame_rx ++;
|
||||
ue->proc.proc_rxtx[1].frame_rx ++;
|
||||
// one frame delay
|
||||
ue->proc.proc_rxtx[i].frame_rx ++;
|
||||
#endif
|
||||
ue->proc.proc_rxtx[0].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
|
||||
ue->proc.proc_rxtx[1].frame_tx = ue->proc.proc_rxtx[1].frame_rx;
|
||||
ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
|
||||
}
|
||||
#ifdef DEBUG_INITIAL_SYNCH
|
||||
LOG_I(PHY,"[UE%d] Initial sync: pbch decoded sucessfully mode1_flag %d, tx_ant %d, frame %d, N_RB_DL %d, phich_duration %d, phich_resource %s!\n",
|
||||
ue->Mod_id,
|
||||
@@ -495,6 +493,8 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
|
||||
ue->common_vars.freq_offset );
|
||||
#endif
|
||||
|
||||
// send sync status to higher layers later when timing offset converge to target timing
|
||||
#if OAISIM
|
||||
if (ue->mac_enabled==1) {
|
||||
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
|
||||
//mac_resynch();
|
||||
@@ -504,6 +504,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
|
||||
else {
|
||||
ue->UE_mode[0] = PUSCH;
|
||||
}
|
||||
#endif
|
||||
|
||||
generate_pcfich_reg_mapping(frame_parms);
|
||||
generate_phich_reg_mapping(frame_parms);
|
||||
|
||||
@@ -1078,7 +1078,7 @@ void rx_phich(PHY_VARS_UE *ue,
|
||||
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
|
||||
LTE_UE_PDCCH **pdcch_vars = &ue->pdcch_vars[subframe%RX_NB_TH][eNB_id];
|
||||
LTE_UE_PDCCH **pdcch_vars = &ue->pdcch_vars[ue->current_thread_id[subframe]][eNB_id];
|
||||
|
||||
// uint8_t HI;
|
||||
uint8_t harq_pid = phich_subframe_to_harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
|
||||
@@ -74,7 +74,7 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in
|
||||
write_output(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_magb0[0],12*N_RB_DL*nsymb_pmch,1,1);
|
||||
|
||||
write_output("mch00_ch0.m","pmch00_ch0",
|
||||
&(ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][0][0]),
|
||||
&(ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
|
||||
ue->frame_parms.ofdm_symbol_size*12,1,1);
|
||||
|
||||
write_output("rxsig_mch.m","rxs_mch",
|
||||
@@ -969,8 +969,8 @@ int rx_pmch(PHY_VARS_UE *ue,
|
||||
|
||||
//printf("*********************mch: symbol %d\n",symbol);
|
||||
|
||||
mch_extract_rbs(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
|
||||
mch_extract_rbs(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
|
||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
|
||||
pdsch_vars[eNB_id]->rxdataF_ext,
|
||||
pdsch_vars[eNB_id]->dl_ch_estimates_ext,
|
||||
symbol,
|
||||
|
||||
@@ -802,7 +802,8 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char first_symbol_flag,
|
||||
unsigned short nb_rb,
|
||||
uint16_t pbch_pss_sss_adjust,
|
||||
short **llr16p);
|
||||
//short **llr16p,
|
||||
uint32_t llr_offset);
|
||||
|
||||
|
||||
/** \brief This function generates log-likelihood ratios (decoder input) for single-stream QPSK received waveforms.
|
||||
@@ -823,7 +824,7 @@ int32_t dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t first_symbol_flag,
|
||||
uint16_t nb_rb,
|
||||
uint16_t pbch_pss_sss_adj,
|
||||
int16_t **llr128p,
|
||||
//int16_t **llr128p,
|
||||
uint8_t beamforming_mode);
|
||||
|
||||
/**
|
||||
@@ -909,7 +910,8 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t first_symbol_flag,
|
||||
uint16_t nb_rb,
|
||||
uint16_t pbch_pss_sss_adjust,
|
||||
int16_t **llr_save,
|
||||
//int16_t **llr_save,
|
||||
uint32_t llr_offset,
|
||||
uint8_t beamforming_mode);
|
||||
|
||||
|
||||
@@ -1451,8 +1453,7 @@ void dci_encoding(uint8_t *a,
|
||||
uint16_t rnti);
|
||||
|
||||
/*! \brief Top-level DCI entry point. This routine codes an set of DCI PDUs and performs PDCCH modulation, interleaving and mapping.
|
||||
\param num_ue_spec_dci Number of UE specific DCI pdus to encode
|
||||
\param num_common_dci Number of Common DCI pdus to encode
|
||||
\param num_dci Number of DCI pdus to encode
|
||||
\param dci_alloc Allocation vectors for each DCI pdu
|
||||
\param n_rnti n_RNTI (see )
|
||||
\param amp Amplitude of QPSK symbols
|
||||
@@ -1461,8 +1462,7 @@ void dci_encoding(uint8_t *a,
|
||||
\param sub_frame_offset subframe offset in frame
|
||||
@returns Number of PDCCH symbols
|
||||
*/
|
||||
uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
|
||||
uint8_t num_common_dci,
|
||||
uint8_t generate_dci_top(int num_dci,
|
||||
DCI_ALLOC_t *dci_alloc,
|
||||
uint32_t n_rnti,
|
||||
int16_t amp,
|
||||
@@ -1471,8 +1471,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
|
||||
uint32_t sub_frame_offset);
|
||||
|
||||
uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB,
|
||||
uint8_t num_ue_spec_dci,
|
||||
uint8_t num_common_dci,
|
||||
int num_dci,
|
||||
DCI_ALLOC_t *dci_alloc,
|
||||
uint8_t subframe);
|
||||
|
||||
@@ -1521,6 +1520,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
|
||||
int16_t eNB_id,
|
||||
uint8_t subframe);
|
||||
|
||||
uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue,
|
||||
DCI_ALLOC_t *dci_alloc,
|
||||
uint8_t DCIFormat,
|
||||
uint8_t agregationLevel,
|
||||
int16_t eNB_id,
|
||||
uint8_t subframe);
|
||||
|
||||
uint16_t dci_decoding_procedure_emul(LTE_UE_PDCCH **lte_ue_pdcch_vars,
|
||||
uint8_t num_ue_spec_dci,
|
||||
@@ -1695,6 +1700,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
||||
void *dci_pdu,
|
||||
rnti_t rnti,
|
||||
DCI_format_t dci_format,
|
||||
LTE_UE_PDCCH *pdcch_vars,
|
||||
LTE_UE_PDSCH *pdsch_vars,
|
||||
LTE_UE_DLSCH_t **dlsch,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||
|
||||
@@ -2530,7 +2530,7 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *eNB,
|
||||
rnti = eNB->ulsch[UE_index]->rnti;
|
||||
|
||||
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
|
||||
if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[subframe%RX_NB_TH][0]->crnti)
|
||||
if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[PHY_vars_UE_g[UE_id][CC_id]->current_thread_id[subframe]][0]->crnti)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
|
||||
int32_t *pss_rxF,*pss_rxF_ext;
|
||||
int32_t *sss_rxF,*sss_rxF_ext;
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
uint8_t next_thread_id = ue->current_thread_id[subframe]== (RX_NB_TH-1) ? 0:(ue->current_thread_id[subframe]+1);
|
||||
|
||||
int rx_offset = frame_parms->ofdm_symbol_size-3*12;
|
||||
uint8_t pss_symb,sss_symb;
|
||||
@@ -173,7 +174,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
|
||||
pss_symb = 6-frame_parms->Ncp;
|
||||
sss_symb = pss_symb-1;
|
||||
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
|
||||
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
|
||||
@@ -183,18 +184,18 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
|
||||
|
||||
if(subframe==5 || subframe==0)
|
||||
{
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
|
||||
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[((subframe+1)%RX_NB_TH)].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF;
|
||||
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
}
|
||||
else if(subframe==6 || subframe==1)
|
||||
{
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
|
||||
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF;
|
||||
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
}
|
||||
else
|
||||
@@ -222,18 +223,18 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
|
||||
{
|
||||
if(subframe==5 || subframe==0)
|
||||
{
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
|
||||
sss_rxF = &rxdataF[aarx][(1 + (sss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[((subframe+1)%RX_NB_TH)].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF;
|
||||
pss_rxF = &rxdataF[aarx][(1 + (pss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
}
|
||||
else if(subframe==6 || subframe==1)
|
||||
{
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
|
||||
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF;
|
||||
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF;
|
||||
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
|
||||
}
|
||||
else
|
||||
|
||||
@@ -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[subframe_rx%RX_NB_TH][eNB_id]->crnti;
|
||||
rnti = ue->pdcch_vars[ue->current_thread_id[subframe_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);
|
||||
@@ -971,7 +971,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
|
||||
LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id];
|
||||
PHY_MEASUREMENTS *meas = &ue->measurements;
|
||||
uint8_t tmode = ue->transmission_mode[eNB_id];
|
||||
uint16_t rnti=ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->crnti;
|
||||
uint16_t rnti=ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->crnti;
|
||||
LOG_D(PHY,"EMUL UE ulsch_encoding for eNB %d,mod_id %d, harq_pid %d rnti %x, ACK(%d,%d) \n",
|
||||
eNB_id,ue->Mod_id, harq_pid, rnti,ulsch->o_ACK[0],ulsch->o_ACK[1]);
|
||||
|
||||
@@ -1005,7 +1005,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
|
||||
//UE_transport_info_TB_index[ue->Mod_id]+=ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS>>3;
|
||||
// navid: currently more than one eNB is not supported in the code
|
||||
UE_transport_info[ue->Mod_id][ue->CC_id].num_eNB = 1;
|
||||
UE_transport_info[ue->Mod_id][ue->CC_id].rnti[0] = ue->pdcch_vars[subframe_rx%RX_NB_TH][0]->crnti;
|
||||
UE_transport_info[ue->Mod_id][ue->CC_id].rnti[0] = ue->pdcch_vars[ue->current_thread_id[subframe_rx]][0]->crnti;
|
||||
UE_transport_info[ue->Mod_id][ue->CC_id].eNB_id[0] = eNB_id;
|
||||
UE_transport_info[ue->Mod_id][ue->CC_id].harq_pid[0] = harq_pid;
|
||||
UE_transport_info[ue->Mod_id][ue->CC_id].tbs[0] = ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS>>3 ;
|
||||
|
||||
@@ -2002,7 +2002,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc,
|
||||
#endif
|
||||
|
||||
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
|
||||
if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[subframe%RX_NB_TH][0]->crnti)
|
||||
if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[PHY_vars_UE_g[UE_id][CC_id]->current_thread_id[subframe]][0]->crnti)
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -78,6 +78,17 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char eNb_id,
|
||||
int no_prefix);
|
||||
|
||||
int front_end_fft(PHY_VARS_UE *ue,
|
||||
unsigned char l,
|
||||
unsigned char Ns,
|
||||
int sample_offset,
|
||||
int no_prefix);
|
||||
|
||||
int front_end_chanEst(PHY_VARS_UE *ue,
|
||||
unsigned char l,
|
||||
unsigned char Ns,
|
||||
int reset_freq_est);
|
||||
|
||||
void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
@@ -109,7 +109,7 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
memset(&common_vars->common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],0,frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
memset(&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],0,frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
|
||||
rx_offset = sample_offset + slot_offset + nb_prefix_samples0 + subframe_offset - SOFFSET;
|
||||
// Align with 256 bit
|
||||
@@ -127,14 +127,14 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
(void *)&common_vars->rxdata[aa][rx_offset % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
@@ -163,11 +163,11 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
(void *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
}
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
@@ -223,7 +223,7 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
start_meas(&ue->dlsch_freq_offset_estimation_stats);
|
||||
#endif
|
||||
|
||||
lte_est_freq_offset(common_vars->common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates[0],
|
||||
lte_est_freq_offset(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[0],
|
||||
frame_parms,
|
||||
l,
|
||||
&common_vars->freq_offset,
|
||||
@@ -242,3 +242,219 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
int front_end_fft(PHY_VARS_UE *ue,
|
||||
unsigned char l,
|
||||
unsigned char Ns,
|
||||
int sample_offset,
|
||||
int no_prefix)
|
||||
{
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
LTE_UE_COMMON *common_vars = &ue->common_vars;
|
||||
unsigned char aa;
|
||||
unsigned char symbol = l+((7-frame_parms->Ncp)*(Ns&1)); ///symbol within sub-frame
|
||||
unsigned int nb_prefix_samples = (no_prefix ? 0 : frame_parms->nb_prefix_samples);
|
||||
unsigned int nb_prefix_samples0 = (no_prefix ? 0 : frame_parms->nb_prefix_samples0);
|
||||
unsigned int subframe_offset;//,subframe_offset_F;
|
||||
unsigned int slot_offset;
|
||||
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
|
||||
unsigned int rx_offset;
|
||||
uint8_t threadId;
|
||||
|
||||
/*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id];
|
||||
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
|
||||
int uespec_pilot[9][1200];*/
|
||||
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
int tmp_dft_in[2048] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
break;
|
||||
}
|
||||
|
||||
if (no_prefix) {
|
||||
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_tti * (Ns>>1);
|
||||
slot_offset = (frame_parms->samples_per_tti>>1) * (Ns%2);
|
||||
}
|
||||
|
||||
// subframe_offset_F = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_tti * (Ns>>1);
|
||||
|
||||
|
||||
if (l<0 || l>=7-frame_parms->Ncp) {
|
||||
printf("slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (Ns<0 || Ns>=20) {
|
||||
printf("slot_fep: Ns must be between 0 and 19\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
threadId = ue->current_thread_id[Ns>>1];
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
// change thread index
|
||||
memset(&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],0,frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
|
||||
rx_offset = sample_offset + slot_offset + nb_prefix_samples0 + subframe_offset - SOFFSET;
|
||||
// Align with 256 bit
|
||||
// rx_offset = rx_offset&0xfffffff8;
|
||||
|
||||
if (l==0) {
|
||||
|
||||
if (rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
|
||||
memcpy((short *)&common_vars->rxdata[aa][frame_length_samples],
|
||||
(short *)&common_vars->rxdata[aa][0],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
|
||||
if ((rx_offset&7)!=0) { // if input to dft is not 256-bit aligned, issue for size 6,15 and 25 PRBs
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][rx_offset % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
|
||||
}
|
||||
} else {
|
||||
rx_offset += (frame_parms->ofdm_symbol_size+nb_prefix_samples)*l;// +
|
||||
// (frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1);
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
// if (ue->frame <100)
|
||||
LOG_I(PHY,"slot_fep: frame %d: slot %d, threadId %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d, frame_length_samples %d\n",
|
||||
ue->proc.proc_rxtx[threadId].frame_rx,Ns, threadId,symbol,
|
||||
nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset,frame_length_samples);
|
||||
#endif
|
||||
|
||||
if (rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
|
||||
memcpy((void *)&common_vars->rxdata[aa][frame_length_samples],
|
||||
(void *)&common_vars->rxdata[aa][0],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
|
||||
if ((rx_offset&7)!=0) { // if input to dft is not 128-bit aligned, issue for size 6 and 15 PRBs
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
}
|
||||
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
// if (ue->frame <100)
|
||||
printf("slot_fep: frame %d: symbol %d rx_offset %d\n", ue->proc.proc_rxtx[threadId].frame_rx, symbol,rx_offset);
|
||||
#endif
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
int front_end_chanEst(PHY_VARS_UE *ue,
|
||||
unsigned char l,
|
||||
unsigned char Ns,
|
||||
int reset_freq_est)
|
||||
{
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
LTE_UE_COMMON *common_vars = &ue->common_vars;
|
||||
uint8_t eNB_id = 0;//ue_common_vars->eNb_id;
|
||||
unsigned char aa;
|
||||
unsigned char symbol = l+((7-frame_parms->Ncp)*(Ns&1)); ///symbol within sub-frame
|
||||
int i;
|
||||
|
||||
/*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id];
|
||||
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
|
||||
int uespec_pilot[9][1200];*/
|
||||
|
||||
if (ue->perfect_ce == 0) {
|
||||
if ((l==0) || (l==(4-frame_parms->Ncp))) {
|
||||
for (aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
printf("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l);
|
||||
#endif
|
||||
start_meas(&ue->dlsch_channel_estimation_stats);
|
||||
lte_dl_channel_estimation(ue,eNB_id,0,
|
||||
Ns,
|
||||
aa,
|
||||
l,
|
||||
symbol);
|
||||
stop_meas(&ue->dlsch_channel_estimation_stats);
|
||||
|
||||
for (i=0; i<ue->measurements.n_adj_cells; i++) {
|
||||
lte_dl_channel_estimation(ue,eNB_id,i+1,
|
||||
Ns,
|
||||
aa,
|
||||
l,
|
||||
symbol);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// do frequency offset estimation here!
|
||||
// use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
|
||||
#ifdef DEBUG_FEP
|
||||
printf("Frequency offset estimation\n");
|
||||
#endif
|
||||
|
||||
if (l==(4-frame_parms->Ncp)) {
|
||||
start_meas(&ue->dlsch_freq_offset_estimation_stats);
|
||||
lte_est_freq_offset(common_vars->common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[0],
|
||||
frame_parms,
|
||||
l,
|
||||
&common_vars->freq_offset,
|
||||
reset_freq_est);
|
||||
stop_meas(&ue->dlsch_freq_offset_estimation_stats);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
#endif
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
memset(&common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].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[subframe]].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);
|
||||
@@ -118,7 +118,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
nb_prefix_samples0 +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
@@ -140,7 +140,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
|
||||
subframe_offset-
|
||||
SOFFSET) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
@@ -514,32 +514,32 @@ 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[subframe%RX_NB_TH][eNB_id][0]!=NULL) {
|
||||
harq_pid = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->current_harq_pid;
|
||||
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 (harq_pid>=8)
|
||||
return;
|
||||
|
||||
mcs = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->mcs;
|
||||
mcs = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->mcs;
|
||||
|
||||
// Button 0
|
||||
if(!phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
|
||||
if(!phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][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[subframe%RX_NB_TH][eNB_id]!=NULL) {
|
||||
num_pdcch_symbols = phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][eNB_id]->num_pdcch_symbols;
|
||||
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;
|
||||
}
|
||||
|
||||
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
|
||||
if (phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]!=NULL) {
|
||||
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) {
|
||||
coded_bits_per_codeword = get_G(frame_parms,
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
|
||||
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,
|
||||
get_Qm(mcs),
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->Nl,
|
||||
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Nl,
|
||||
num_pdcch_symbols,
|
||||
frame,
|
||||
subframe,
|
||||
@@ -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[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_id];
|
||||
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].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[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];
|
||||
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[subframe%RX_NB_TH][eNB_id]->llr;
|
||||
pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_comp[0];
|
||||
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->llr[0]; // stream 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_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[subframe%RX_NB_TH][eNB_id]->rxdataF_comp0[0];
|
||||
pdsch_mag = (int16_t*) phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_mag0[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];
|
||||
|
||||
// Received signal in time domain of receive antenna 0
|
||||
if (rxsig_t != NULL) {
|
||||
|
||||
@@ -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[subframe%RX_NB_TH][eNB_id][0]!=NULL) {
|
||||
harq_pid = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->current_harq_pid;
|
||||
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 (harq_pid>=8)
|
||||
return;
|
||||
mcs0 = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->mcs;
|
||||
mcs0 = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][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,23 +479,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
*/
|
||||
}
|
||||
fl_show_object(form->button_0);
|
||||
if (phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][1]!=NULL) {
|
||||
harq_pid = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][1]->current_harq_pid;
|
||||
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 (harq_pid>=8)
|
||||
return;
|
||||
mcs1 = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][1]->harq_processes[harq_pid]->mcs;
|
||||
mcs1 = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]->harq_processes[harq_pid]->mcs;
|
||||
}
|
||||
if (phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][eNB_id]!=NULL) {
|
||||
num_pdcch_symbols = phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][eNB_id]->num_pdcch_symbols;
|
||||
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;
|
||||
}
|
||||
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
|
||||
if (phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]!=NULL) {
|
||||
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) {
|
||||
mod0 = get_Qm(mcs0);
|
||||
coded_bits_per_codeword0 = get_G(frame_parms,
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
|
||||
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,
|
||||
get_Qm(mcs0),
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]->harq_processes[harq_pid]->Nl,
|
||||
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Nl,
|
||||
num_pdcch_symbols,
|
||||
frame,
|
||||
subframe,
|
||||
@@ -504,13 +504,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
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[subframe%RX_NB_TH][eNB_id][1]!=NULL) {
|
||||
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]!=NULL) {
|
||||
mod1 = get_Qm(mcs1);
|
||||
coded_bits_per_codeword1 = get_G(frame_parms,
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][1]->harq_processes[harq_pid]->nb_rb,
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even,
|
||||
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,
|
||||
get_Qm(mcs1),
|
||||
phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][1]->harq_processes[harq_pid]->Nl,
|
||||
phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1]->harq_processes[harq_pid]->Nl,
|
||||
num_pdcch_symbols,
|
||||
frame,
|
||||
subframe,
|
||||
@@ -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[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_id];
|
||||
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].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[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];
|
||||
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[subframe%RX_NB_TH][eNB_id]->llr;
|
||||
pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_comp[0];
|
||||
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->llr[0]; // stream 0
|
||||
pdsch_llr1 = (int16_t*) phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->llr[1]; // stream 1
|
||||
pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_comp0[0];
|
||||
//pdsch_comp = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_ext[0];
|
||||
//pdsch_comp1 = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_ext[1];
|
||||
pdsch_comp1 = (int16_t*) (phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->rxdataF_comp1[0][0])[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];
|
||||
//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[subframe%RX_NB_TH][eNB_id]->dl_ch_mag0[0];
|
||||
pdsch_mag1 = (int16_t*) (phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_mag1[0][0])[0];
|
||||
pdsch_magb0 = (int16_t*) phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_magb0[0];
|
||||
pdsch_magb1 = (int16_t*) (phy_vars_ue->pdsch_vars[subframe%RX_NB_TH][eNB_id]->dl_ch_magb1[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];
|
||||
fl_freeze_form(form->lte_phy_scope_ue);
|
||||
// Received signal in time domain of receive antenna 0
|
||||
if (rxsig_t != NULL) {
|
||||
|
||||
+49
-4
@@ -76,6 +76,7 @@
|
||||
#define RX_NB_TH_MAX 2
|
||||
#define RX_NB_TH 2
|
||||
|
||||
|
||||
//#ifdef SHRLIBDEV
|
||||
//extern int rxrescale;
|
||||
//#define RX_IQRESCALELEN rxrescale
|
||||
@@ -395,6 +396,32 @@ typedef struct {
|
||||
pthread_mutex_t mutex_rxtx;
|
||||
/// scheduling parameters for RXn-TXnp4 thread
|
||||
struct sched_param sched_param_rxtx;
|
||||
|
||||
/// internal This variable is protected by ref mutex_fep_slot1.
|
||||
//int instance_cnt_slot0_dl_processing;
|
||||
int instance_cnt_slot1_dl_processing;
|
||||
/// pthread descriptor fep_slot1 thread
|
||||
//pthread_t pthread_slot0_dl_processing;
|
||||
pthread_t pthread_slot1_dl_processing;
|
||||
/// pthread attributes for fep_slot1 processing thread
|
||||
// pthread_attr_t attr_slot0_dl_processing;
|
||||
pthread_attr_t attr_slot1_dl_processing;
|
||||
/// condition variable for UE fep_slot1 thread;
|
||||
//pthread_cond_t cond_slot0_dl_processing;
|
||||
pthread_cond_t cond_slot1_dl_processing;
|
||||
/// mutex for UE synch thread
|
||||
//pthread_mutex_t mutex_slot0_dl_processing;
|
||||
pthread_mutex_t mutex_slot1_dl_processing;
|
||||
//
|
||||
uint8_t chan_est_pilot0_slot1_available;
|
||||
uint8_t chan_est_slot1_available;
|
||||
uint8_t llr_slot1_available;
|
||||
uint8_t dci_slot0_available;
|
||||
uint8_t first_symbol_available;
|
||||
//uint8_t channel_level;
|
||||
/// scheduling parameters for fep_slot1 thread
|
||||
struct sched_param sched_param_fep_slot1;
|
||||
|
||||
int sub_frame_start;
|
||||
int sub_frame_step;
|
||||
unsigned long long gotIQs;
|
||||
@@ -709,6 +736,9 @@ typedef struct {
|
||||
LTE_DL_FRAME_PARMS frame_parms_before_ho;
|
||||
LTE_UE_COMMON common_vars;
|
||||
|
||||
// point to the current rxTx thread index
|
||||
uint8_t current_thread_id[10];
|
||||
|
||||
LTE_UE_PDSCH *pdsch_vars[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_eNB_MAX+1]; // two RxTx Threads
|
||||
LTE_UE_PDSCH_FLP *pdsch_vars_flp[NUMBER_OF_CONNECTED_eNB_MAX+1];
|
||||
LTE_UE_PDSCH *pdsch_vars_SI[NUMBER_OF_CONNECTED_eNB_MAX+1];
|
||||
@@ -809,6 +839,7 @@ typedef struct {
|
||||
uint8_t decode_MIB;
|
||||
int rx_offset; /// Timing offset
|
||||
int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
|
||||
int time_sync_cell;
|
||||
int timing_advance; ///timing advance signalled from eNB
|
||||
int hw_timing_advance;
|
||||
int N_TA_offset; ///timing offset used in TDD
|
||||
@@ -875,9 +906,9 @@ typedef struct {
|
||||
/// Transmission mode per eNB
|
||||
uint8_t transmission_mode[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
time_stats_t phy_proc;
|
||||
time_stats_t phy_proc[RX_NB_TH];
|
||||
time_stats_t phy_proc_tx;
|
||||
time_stats_t phy_proc_rx[2];
|
||||
time_stats_t phy_proc_rx[RX_NB_TH];
|
||||
|
||||
uint32_t use_ia_receiver;
|
||||
|
||||
@@ -891,8 +922,13 @@ typedef struct {
|
||||
time_stats_t ulsch_multiplexing_stats;
|
||||
|
||||
time_stats_t generic_stat;
|
||||
time_stats_t pdsch_procedures_stat;
|
||||
time_stats_t dlsch_procedures_stat;
|
||||
time_stats_t generic_stat_bis[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
|
||||
time_stats_t ue_front_end_stat[RX_NB_TH];
|
||||
time_stats_t ue_front_end_per_slot_stat[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
|
||||
time_stats_t pdcch_procedures_stat[RX_NB_TH];
|
||||
time_stats_t pdsch_procedures_stat[RX_NB_TH];
|
||||
time_stats_t pdsch_procedures_per_slot_stat[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
|
||||
time_stats_t dlsch_procedures_stat[RX_NB_TH];
|
||||
|
||||
time_stats_t ofdm_demod_stats;
|
||||
time_stats_t dlsch_rx_pdcch_stats;
|
||||
@@ -905,6 +941,7 @@ typedef struct {
|
||||
time_stats_t dlsch_turbo_decoding_stats;
|
||||
time_stats_t dlsch_deinterleaving_stats;
|
||||
time_stats_t dlsch_llr_stats;
|
||||
time_stats_t dlsch_llr_stats_parallelization[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
|
||||
time_stats_t dlsch_unscrambling_stats;
|
||||
time_stats_t dlsch_rate_matching_stats;
|
||||
time_stats_t dlsch_turbo_encoding_stats;
|
||||
@@ -934,6 +971,14 @@ typedef struct {
|
||||
|
||||
} PHY_VARS_UE;
|
||||
|
||||
/* this structure is used to pass both UE phy vars and
|
||||
* proc to the function UE_thread_rxn_txnp4
|
||||
*/
|
||||
struct rx_tx_thread_data {
|
||||
PHY_VARS_UE *UE;
|
||||
UE_rxtx_proc_t *proc;
|
||||
};
|
||||
|
||||
void exit_fun(const char* s);
|
||||
|
||||
static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#define RX_NB_TH_MAX 2
|
||||
#define RX_NB_TH 2
|
||||
|
||||
#define LTE_SLOTS_PER_SUBFRAME 2
|
||||
|
||||
#define LTE_NUMBER_OF_SUBFRAMES_PER_FRAME 10
|
||||
#define LTE_SLOTS_PER_FRAME 20
|
||||
#define LTE_CE_FILTER_LENGTH 5
|
||||
@@ -928,6 +930,10 @@ typedef struct {
|
||||
//uint32_t *rb_alloc;
|
||||
//uint8_t Qm[2];
|
||||
//MIMO_mode_t mimo_mode;
|
||||
// llr offset per ofdm symbol
|
||||
uint32_t llr_offset[14];
|
||||
// llr length per ofdm symbol
|
||||
uint32_t llr_length[14];
|
||||
} LTE_UE_PDSCH;
|
||||
|
||||
typedef struct {
|
||||
@@ -1028,6 +1034,9 @@ typedef struct {
|
||||
uint32_t dci_missed;
|
||||
/// nCCE for PUCCH per subframe
|
||||
uint8_t nCCE[10];
|
||||
//Check for specific DCIFormat and AgregationLevel
|
||||
uint8_t dciFormat;
|
||||
uint8_t agregationLevel;
|
||||
} LTE_UE_PDCCH;
|
||||
|
||||
#define PBCH_A 24
|
||||
|
||||
@@ -79,6 +79,7 @@ unsigned int ULSCH_max_consecutive_errors = 20;
|
||||
|
||||
int number_of_cards;
|
||||
|
||||
|
||||
int flag_LA=0;
|
||||
int flagMag;
|
||||
//extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
|
||||
|
||||
@@ -43,6 +43,7 @@ enum THREAD_INDEX { OPENAIR_THREAD_INDEX = 0,
|
||||
|
||||
#define OPENAIR_THREAD_STACK_SIZE PTHREAD_STACK_MIN //4096 //RTL_PTHREAD_STACK_MIN*6
|
||||
//#define DLC_THREAD_STACK_SIZE 4096 //DLC stack size
|
||||
//#define UE_SLOT_PARALLELISATION
|
||||
|
||||
enum openair_SCHED_STATUS {
|
||||
openair_SCHED_STOPPED=1,
|
||||
@@ -139,6 +140,12 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t
|
||||
@param phy_vars_rn pointer to RN variables
|
||||
*/
|
||||
int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn);
|
||||
int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,
|
||||
relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn);
|
||||
#ifdef UE_SLOT_PARALLELISATION
|
||||
void *UE_thread_slot1_dl_processing(void *arg);
|
||||
#endif
|
||||
|
||||
/*! \brief Scheduling for UE TX procedures in TDD S-subframes.
|
||||
@param phy_vars_ue Pointer to UE variables on which to act
|
||||
|
||||
@@ -72,19 +72,19 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
|
||||
LOG_D(PHY,"frame %d, subframe %d, transmission_mode %d\n",proc->frame_tx,proc->subframe_tx,transmission_mode);
|
||||
|
||||
DCI_pdu->Num_common_dci = 0;
|
||||
DCI_pdu->Num_ue_spec_dci=0;
|
||||
DCI_pdu->Num_dci = 0;
|
||||
|
||||
switch (subframe) {
|
||||
case 5:
|
||||
if ( !(proc->frame_tx&1) ) // SI message on even frame only (SFN mod 2 == 0)
|
||||
{
|
||||
DCI_pdu->Num_common_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].firstCCE = 0;
|
||||
DCI_pdu->dci_alloc[0].rnti = SI_RNTI;
|
||||
DCI_pdu->dci_alloc[0].format = format1A;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->Num_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].firstCCE = 0;
|
||||
DCI_pdu->dci_alloc[0].rnti = SI_RNTI;
|
||||
DCI_pdu->dci_alloc[0].format = format1A;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_COMMON_SPACE;
|
||||
|
||||
switch (eNB->frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
@@ -206,12 +206,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
}
|
||||
/*
|
||||
case 6:
|
||||
DCI_pdu->Num_ue_spec_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1236;
|
||||
DCI_pdu->dci_alloc[0].format = format2_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->Num_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1236;
|
||||
DCI_pdu->dci_alloc[0].format = format2_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
|
||||
DLSCH_alloc_pdu1.rballoc = 0x00ff;
|
||||
DLSCH_alloc_pdu1.TPC = 0;
|
||||
@@ -228,12 +229,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
|
||||
default:
|
||||
case 7:
|
||||
DCI_pdu->Num_ue_spec_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].firstCCE = 0;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format1;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->Num_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].firstCCE = 0;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format1;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
|
||||
if (transmission_mode<3 || transmission_mode == 7) {
|
||||
//user 1
|
||||
@@ -459,10 +461,11 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
|
||||
|
||||
|
||||
DCI_pdu->dci_alloc[1].L = 2;
|
||||
DCI_pdu->dci_alloc[1].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[1].format = format0;
|
||||
DCI_pdu->dci_alloc[1].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[1].L = 2;
|
||||
DCI_pdu->dci_alloc[1].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[1].format = format0;
|
||||
DCI_pdu->dci_alloc[1].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[1].search_space = DCI_UE_SPACE;
|
||||
|
||||
if (eNB->frame_parms.frame_type == FDD) {
|
||||
switch (eNB->frame_parms.N_RB_DL) {
|
||||
@@ -601,13 +604,14 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
}
|
||||
}
|
||||
} else if (transmission_mode==4) {
|
||||
DCI_pdu->Num_ue_spec_dci = 1;
|
||||
DCI_pdu->Num_dci = 1;
|
||||
// user 1
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_FDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 3;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format2;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_FDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 3;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format2;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
|
||||
((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->tpmi = 0;
|
||||
((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->rv1 = 0;
|
||||
@@ -623,13 +627,14 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->rah = 0;
|
||||
|
||||
} else if (transmission_mode==5) {
|
||||
DCI_pdu->Num_ue_spec_dci = 2;
|
||||
DCI_pdu->Num_dci = 2;
|
||||
// user 1
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 3;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format1E_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 3;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format1E_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
|
||||
DLSCH_alloc_pdu1E.tpmi = 5; //5=use feedback
|
||||
DLSCH_alloc_pdu1E.rv = 0;
|
||||
@@ -648,11 +653,12 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
|
||||
|
||||
//user 2
|
||||
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[1].L = 0;
|
||||
DCI_pdu->dci_alloc[1].rnti = 0x1236;
|
||||
DCI_pdu->dci_alloc[1].format = format1E_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[1].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[1].L = 0;
|
||||
DCI_pdu->dci_alloc[1].rnti = 0x1236;
|
||||
DCI_pdu->dci_alloc[1].format = format1E_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[1].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[1].search_space = DCI_UE_SPACE;
|
||||
//DLSCH_alloc_pdu1E.mcs = eNB->target_ue_dl_mcs;
|
||||
//DLSCH_alloc_pdu1E.mcs = (unsigned char) (taus()%28);
|
||||
//DLSCH_alloc_pdu1E.mcs = (unsigned char) ((eNB->frame%1024)%28);
|
||||
@@ -669,12 +675,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
|
||||
/*
|
||||
case 8:
|
||||
DCI_pdu->Num_common_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_5MHz_TDD_1_6_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0xbeef;
|
||||
DCI_pdu->dci_alloc[0].format = format1A;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 1;
|
||||
DCI_pdu->Num_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_5MHz_TDD_1_6_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0xbeef;
|
||||
DCI_pdu->dci_alloc[0].format = format1A;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 1;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_COMMON_SPACE;
|
||||
|
||||
RA_alloc_pdu.type = 1;
|
||||
RA_alloc_pdu.vrb_type = 0;
|
||||
@@ -721,7 +728,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
/*
|
||||
DCI_pdu->nCCE = 0;
|
||||
|
||||
for (i=0; i<DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci; i++) {
|
||||
for (i=0; i<DCI_pdu->Num_dci; i++) {
|
||||
DCI_pdu->nCCE += (1<<(DCI_pdu->dci_alloc[i].L));
|
||||
}
|
||||
*/
|
||||
@@ -743,20 +750,20 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
|
||||
rand = (rand%4)+5;
|
||||
*/
|
||||
|
||||
DCI_pdu->Num_common_dci = 0;
|
||||
DCI_pdu->Num_ue_spec_dci=0;
|
||||
DCI_pdu->Num_dci = 0;
|
||||
|
||||
switch (subframe) {
|
||||
case 5:
|
||||
DCI_pdu->Num_ue_spec_dci = 1;
|
||||
DCI_pdu->Num_dci = 1;
|
||||
|
||||
if (transmission_mode<3) {
|
||||
//user 1
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_5MHz_TDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format1;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_5MHz_TDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format1;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
|
||||
DLSCH_alloc_pdu.rballoc = eNB->ue_dl_rb_alloc;
|
||||
DLSCH_alloc_pdu.TPC = 0;
|
||||
@@ -769,11 +776,12 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
|
||||
|
||||
/*
|
||||
//user2
|
||||
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1_5MHz_TDD_t;
|
||||
DCI_pdu->dci_alloc[1].L = 2;
|
||||
DCI_pdu->dci_alloc[1].rnti = 0x1236;
|
||||
DCI_pdu->dci_alloc[1].format = format1;
|
||||
DCI_pdu->dci_alloc[1].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1_5MHz_TDD_t;
|
||||
DCI_pdu->dci_alloc[1].L = 2;
|
||||
DCI_pdu->dci_alloc[1].rnti = 0x1236;
|
||||
DCI_pdu->dci_alloc[1].format = format1;
|
||||
DCI_pdu->dci_alloc[1].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[1].search_space = DCI_UE_SPACE;
|
||||
|
||||
DLSCH_alloc_pdu.rballoc = rballoc2;
|
||||
DLSCH_alloc_pdu.TPC = 0;
|
||||
@@ -785,13 +793,14 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&DLSCH_alloc_pdu,sizeof(DCI1_5MHz_TDD_t));
|
||||
*/
|
||||
} else if (transmission_mode==5) {
|
||||
DCI_pdu->Num_ue_spec_dci = 2;
|
||||
DCI_pdu->Num_dci = 2;
|
||||
// user 1
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format1E_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format1E_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
|
||||
DLSCH_alloc_pdu1E.tpmi = 5; //5=use feedback
|
||||
DLSCH_alloc_pdu1E.rv = 0;
|
||||
@@ -806,11 +815,12 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
|
||||
|
||||
//user 2
|
||||
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[1].L = 2;
|
||||
DCI_pdu->dci_alloc[1].rnti = 0x1236;
|
||||
DCI_pdu->dci_alloc[1].format = format1E_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[1].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
DCI_pdu->dci_alloc[1].L = 2;
|
||||
DCI_pdu->dci_alloc[1].rnti = 0x1236;
|
||||
DCI_pdu->dci_alloc[1].format = format1E_2A_M10PRB;
|
||||
DCI_pdu->dci_alloc[1].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[1].search_space = DCI_UE_SPACE;
|
||||
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
|
||||
|
||||
@@ -821,12 +831,13 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
|
||||
break;
|
||||
|
||||
case 7:
|
||||
DCI_pdu->Num_common_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_5MHz_TDD_1_6_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0xbeef;
|
||||
DCI_pdu->dci_alloc[0].format = format1A;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 1;
|
||||
DCI_pdu->Num_dci = 1;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_5MHz_TDD_1_6_t;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0xbeef;
|
||||
DCI_pdu->dci_alloc[0].format = format1A;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 1;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_COMMON_SPACE;
|
||||
|
||||
RA_alloc_pdu.type = 1;
|
||||
RA_alloc_pdu.vrb_type = 0;
|
||||
@@ -841,14 +852,15 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
|
||||
break;
|
||||
|
||||
case 9:
|
||||
DCI_pdu->Num_ue_spec_dci = 1;
|
||||
DCI_pdu->Num_dci = 1;
|
||||
|
||||
//user 1
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI0_5MHz_TDD_1_6_t ;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format0;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI0_5MHz_TDD_1_6_t ;
|
||||
DCI_pdu->dci_alloc[0].L = 2;
|
||||
DCI_pdu->dci_alloc[0].rnti = 0x1235;
|
||||
DCI_pdu->dci_alloc[0].format = format0;
|
||||
DCI_pdu->dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
|
||||
UL_alloc_pdu.type = 0;
|
||||
UL_alloc_pdu.hopping = 0;
|
||||
@@ -894,7 +906,7 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
|
||||
/*
|
||||
DCI_pdu->nCCE = 0;
|
||||
|
||||
for (i=0; i<DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci; i++) {
|
||||
for (i=0; i<DCI_pdu->Num_dci; i++) {
|
||||
DCI_pdu->nCCE += (1<<(DCI_pdu->dci_alloc[i].L));
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -1319,8 +1319,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
|
||||
|
||||
// loop over all DCIs for this subframe to generate DLSCH allocations
|
||||
for (i=0; i<DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci ; i++) {
|
||||
LOG_D(PHY,"[eNB] Subframe %d: DCI %d/%d : rnti %x, CCEind %d\n",subframe,i,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci,DCI_pdu->dci_alloc[i].rnti,DCI_pdu->dci_alloc[i].firstCCE);
|
||||
for (i=0; i<DCI_pdu->Num_dci; i++) {
|
||||
LOG_D(PHY,"[eNB] Subframe %d: DCI %d/%d : rnti %x, CCEind %d\n",subframe,i,DCI_pdu->Num_dci,DCI_pdu->dci_alloc[i].rnti,DCI_pdu->dci_alloc[i].firstCCE);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,DCI_pdu->dci_alloc[i].rnti);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,DCI_pdu->dci_alloc[i].format);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,DCI_pdu->dci_alloc[i].firstCCE);
|
||||
@@ -1346,7 +1346,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
phy_config_dedicated_eNB_step2(eNB);
|
||||
|
||||
// Now loop again over the DCIs for UL configuration
|
||||
for (i=0; i<DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci ; i++) {
|
||||
for (i=0; i<DCI_pdu->Num_dci; i++) {
|
||||
dci_alloc = &DCI_pdu->dci_alloc[i];
|
||||
|
||||
if (dci_alloc->format == format0) { // this is a ULSCH allocation
|
||||
@@ -1368,7 +1368,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
|
||||
|
||||
// if we have DCI to generate do it now
|
||||
if ((DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci)>0) {
|
||||
if (DCI_pdu->Num_dci>0) {
|
||||
|
||||
|
||||
} else { // for emulation!!
|
||||
@@ -1379,13 +1379,12 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (eNB->abstraction_flag == 0) {
|
||||
if (do_pdcch_flag) {
|
||||
if (DCI_pdu->Num_ue_spec_dci+DCI_pdu->Num_common_dci > 0) {
|
||||
LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (common %"PRIu8",ue_spec %"PRIu8")\n",eNB->Mod_id,frame, subframe,
|
||||
DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
|
||||
if (DCI_pdu->Num_dci > 0) {
|
||||
LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (Num_dci=%d)\n",eNB->Mod_id,frame, subframe,
|
||||
DCI_pdu->Num_dci);
|
||||
}
|
||||
|
||||
num_pdcch_symbols = generate_dci_top(DCI_pdu->Num_ue_spec_dci,
|
||||
DCI_pdu->Num_common_dci,
|
||||
num_pdcch_symbols = generate_dci_top(DCI_pdu->Num_dci,
|
||||
DCI_pdu->dci_alloc,
|
||||
0,
|
||||
AMP,
|
||||
@@ -1395,15 +1394,15 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
else {
|
||||
num_pdcch_symbols = DCI_pdu->num_pdcch_symbols;
|
||||
LOG_D(PHY,"num_pdcch_symbols %"PRIu8" (dci common %"PRIu8", dci uespec %"PRIu8")\n",num_pdcch_symbols,
|
||||
DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
|
||||
LOG_D(PHY,"num_pdcch_symbols %"PRIu8" (Num_dci %d)\n",num_pdcch_symbols,
|
||||
DCI_pdu->Num_dci);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PHY_ABSTRACTION // FIXME this ifdef seems suspicious
|
||||
else {
|
||||
LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_to_emul\n",eNB->Mod_id,frame, subframe);
|
||||
num_pdcch_symbols = generate_dci_top_emul(eNB,DCI_pdu->Num_ue_spec_dci,DCI_pdu->Num_common_dci,DCI_pdu->dci_alloc,subframe);
|
||||
num_pdcch_symbols = generate_dci_top_emul(eNB,DCI_pdu->Num_dci,DCI_pdu->dci_alloc,subframe);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1414,10 +1413,10 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
|
||||
#if defined(SMBV)
|
||||
// Sets up PDCCH and DCI table
|
||||
if (smbv_is_config_frame(frame) && (smbv_frame_cnt < 4) && ((DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci)>0)) {
|
||||
LOG_D(PHY,"[SMBV] Frame %3d, SF %d PDCCH, number of DCIs %d\n",frame,subframe,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci);
|
||||
if (smbv_is_config_frame(frame) && (smbv_frame_cnt < 4) && (DCI_pdu->Num_dci>0)) {
|
||||
LOG_D(PHY,"[SMBV] Frame %3d, SF %d PDCCH, number of DCIs %d\n",frame,subframe,DCI_pdu->Num_dci);
|
||||
dump_dci(fp,&DCI_pdu->dci_alloc[0]);
|
||||
smbv_configure_pdcch(smbv_fname,(smbv_frame_cnt*10) + (subframe),num_pdcch_symbols,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci);
|
||||
smbv_configure_pdcch(smbv_fname,(smbv_frame_cnt*10) + (subframe),num_pdcch_symbols,DCI_pdu->Num_dci);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+1075
-193
File diff suppressed because it is too large
Load Diff
@@ -52,7 +52,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
|
||||
|
||||
Po_PUCCH = get_PL(ue->Mod_id,ue->CC_id,eNB_id)+
|
||||
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
|
||||
ue->dlsch[proc->subframe_rx%RX_NB_TH][eNB_id][0]->g_pucch;
|
||||
ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->g_pucch;
|
||||
|
||||
switch (pucch_fmt) {
|
||||
case pucch_format1:
|
||||
@@ -95,19 +95,19 @@ 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[proc->subframe_rx%RX_NB_TH][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,subframe,
|
||||
Po_PUCCH,
|
||||
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
||||
get_PL(ue->Mod_id,ue->CC_id,eNB_id),
|
||||
ue->dlsch[proc->subframe_rx%RX_NB_TH][eNB_id][0]->g_pucch);
|
||||
ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->g_pucch);
|
||||
} 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[proc->subframe_rx%RX_NB_TH][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,subframe,
|
||||
Po_PUCCH,
|
||||
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
||||
get_PL(ue->Mod_id,ue->CC_id,eNB_id),
|
||||
ue->dlsch[proc->subframe_rx%RX_NB_TH][eNB_id][0]->g_pucch);
|
||||
ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->g_pucch);
|
||||
}
|
||||
|
||||
return(Po_PUCCH);
|
||||
|
||||
@@ -390,10 +390,11 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[*num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[*num_dci].format = format1;
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[*num_dci].format = format1;
|
||||
dci_alloc[*num_dci].search_space = DCI_UE_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[*num_dci]);
|
||||
|
||||
// printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -530,11 +531,12 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[*num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[*num_dci].format = format1A;
|
||||
dci_alloc[*num_dci].firstCCE = 0;
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[*num_dci].format = format1A;
|
||||
dci_alloc[*num_dci].firstCCE = 0;
|
||||
dci_alloc[*num_dci].search_space = DCI_COMMON_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[*num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -699,10 +701,11 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[*num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[*num_dci].format = format2A;
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[*num_dci].format = format2A;
|
||||
dci_alloc[*num_dci].search_space = DCI_UE_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[*num_dci]);
|
||||
|
||||
//printf("Generating dlsch params for user %d / format 2A (%d)\n",k,format2A);
|
||||
@@ -839,11 +842,12 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[*num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[*num_dci].format = format1A;
|
||||
dci_alloc[*num_dci].firstCCE = 0;
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[*num_dci].format = format1A;
|
||||
dci_alloc[*num_dci].firstCCE = 0;
|
||||
dci_alloc[*num_dci].search_space = DCI_COMMON_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[*num_dci]);
|
||||
|
||||
//printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -1009,10 +1013,11 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[*num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[*num_dci].format = format2;
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[*num_dci].format = format2;
|
||||
dci_alloc[*num_dci].search_space = DCI_UE_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[*num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -1149,11 +1154,12 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[*num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[*num_dci].format = format1A;
|
||||
dci_alloc[*num_dci].firstCCE = 0;
|
||||
dci_alloc[*num_dci].dci_length = dci_length;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[*num_dci].format = format1A;
|
||||
dci_alloc[*num_dci].firstCCE = 0;
|
||||
dci_alloc[*num_dci].search_space = DCI_COMMON_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[*num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -1181,11 +1187,12 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
case 5:
|
||||
case 6:
|
||||
memcpy(&dci_alloc[*num_dci].dci_pdu[0],&DLSCH_alloc_pdu2_1E[k],sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
|
||||
dci_alloc[*num_dci].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[*num_dci].format = format1E_2A_M10PRB;
|
||||
dci_alloc[*num_dci].firstCCE = 4*k;
|
||||
dci_alloc[*num_dci].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
dci_alloc[*num_dci].L = 1;
|
||||
dci_alloc[*num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[*num_dci].format = format1E_2A_M10PRB;
|
||||
dci_alloc[*num_dci].firstCCE = 4*k;
|
||||
dci_alloc[*num_dci].search_space = DCI_UE_SPACE;
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
generate_eNB_dlsch_params_from_dci(0,
|
||||
subframe,
|
||||
@@ -1224,12 +1231,10 @@ int num_common_dci=0,num_ue_spec_dci=0,num_dci=0,num_pdcch_symbols=1;
|
||||
DCI_PDU *get_dci_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) {
|
||||
|
||||
if (subframeP == subframe) {
|
||||
DCI_pdu.Num_ue_spec_dci = num_ue_spec_dci;
|
||||
DCI_pdu.Num_common_dci = num_common_dci;
|
||||
DCI_pdu.Num_dci = num_ue_spec_dci + num_common_dci;
|
||||
DCI_pdu.num_pdcch_symbols = num_pdcch_symbols;
|
||||
} else {
|
||||
DCI_pdu.Num_ue_spec_dci = 0;
|
||||
DCI_pdu.Num_common_dci = 0;
|
||||
DCI_pdu.Num_dci = 0;
|
||||
DCI_pdu.num_pdcch_symbols = num_pdcch_symbols;
|
||||
}
|
||||
|
||||
@@ -1346,7 +1351,7 @@ int main(int argc, char **argv)
|
||||
// void *data;
|
||||
// int ii;
|
||||
// int bler;
|
||||
double blerr[4],uncoded_ber; //,avg_ber;
|
||||
double blerr[4],uncoded_ber=0; //,avg_ber;
|
||||
short *uncoded_ber_bit=NULL;
|
||||
uint8_t N_RB_DL=25,osf=1;
|
||||
frame_t frame_type = FDD;
|
||||
@@ -2017,7 +2022,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
*/
|
||||
|
||||
UE->pdcch_vars[subframe & 0x1][0]->crnti = n_rnti;
|
||||
UE->pdcch_vars[UE->current_thread_id[subframe]][0]->crnti = n_rnti;
|
||||
|
||||
// Fill in UL_alloc
|
||||
UL_alloc_pdu.type = 0;
|
||||
@@ -2258,7 +2263,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (SNR=snr0; SNR<snr1; SNR+=snr_step) {
|
||||
UE->proc.proc_rxtx[subframe&1].frame_rx=0;
|
||||
UE->proc.proc_rxtx[UE->current_thread_id[subframe]].frame_rx=0;
|
||||
errs[0]=0;
|
||||
errs[1]=0;
|
||||
errs[2]=0;
|
||||
@@ -2291,7 +2296,7 @@ int main(int argc, char **argv)
|
||||
reset_meas(&eNB->dlsch_rate_matching_stats);
|
||||
reset_meas(&eNB->dlsch_turbo_encoding_stats);
|
||||
|
||||
reset_meas(&UE->phy_proc_rx[subframe&0x1]); // total UE rx
|
||||
reset_meas(&UE->phy_proc_rx[UE->current_thread_id[subframe]]); // total UE rx
|
||||
reset_meas(&UE->ofdm_demod_stats);
|
||||
reset_meas(&UE->dlsch_channel_estimation_stats);
|
||||
reset_meas(&UE->dlsch_freq_offset_estimation_stats);
|
||||
@@ -2327,7 +2332,7 @@ int main(int argc, char **argv)
|
||||
struct list time_vector_rx_dec;
|
||||
initialize(&time_vector_rx_dec);
|
||||
|
||||
eNB_rxtx_proc_t *proc_eNB = &eNB->proc.proc_rxtx[subframe&1];
|
||||
eNB_rxtx_proc_t *proc_eNB = &eNB->proc.proc_rxtx[UE->current_thread_id[subframe]];
|
||||
|
||||
for (trials = 0; trials<n_frames; trials++) {
|
||||
//printf("Trial %d\n",trials);
|
||||
@@ -2336,10 +2341,10 @@ int main(int argc, char **argv)
|
||||
|
||||
//if (trials%100==0)
|
||||
eNB2UE[0]->first_run = 1;
|
||||
UE->dlsch[subframe&0x1][eNB_id][0]->harq_ack[subframe].ack = 0;
|
||||
UE->dlsch[subframe&0x1][eNB_id][1]->harq_ack[subframe].ack = 0;
|
||||
UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_ack[subframe].ack = 0;
|
||||
UE->dlsch[UE->current_thread_id[subframe]][eNB_id][1]->harq_ack[subframe].ack = 0;
|
||||
|
||||
while ((round < num_rounds) && (UE->dlsch[subframe&0x1][eNB_id][0]->harq_ack[subframe].ack == 0)) {
|
||||
while ((round < num_rounds) && (UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_ack[subframe].ack == 0)) {
|
||||
// printf("Trial %d, round %d\n",trials,round);
|
||||
round_trials[round]++;
|
||||
|
||||
@@ -2512,7 +2517,7 @@ int main(int argc, char **argv)
|
||||
DL_channel(eNB,UE,subframe,awgn_flag,SNR,tx_lev,hold_channel,abstx,num_rounds,trials,round,eNB2UE,s_re,s_im,r_re,r_im,csv_fd);
|
||||
|
||||
|
||||
UE_rxtx_proc_t *proc = &UE->proc.proc_rxtx[subframe&1];
|
||||
UE_rxtx_proc_t *proc = &UE->proc.proc_rxtx[UE->current_thread_id[subframe]];
|
||||
proc->subframe_rx = subframe;
|
||||
UE->UE_mode[0] = PUSCH;
|
||||
|
||||
@@ -2534,7 +2539,9 @@ int main(int argc, char **argv)
|
||||
(void *)&dci_alloc[0].dci_pdu,
|
||||
n_rnti,
|
||||
dci_alloc[0].format,
|
||||
UE->dlsch[proc->subframe_rx&0x1][eNB_id],
|
||||
UE->pdcch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id],
|
||||
UE->pdsch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id],
|
||||
UE->dlsch[UE->current_thread_id[proc->subframe_rx]][0],
|
||||
&UE->frame_parms,
|
||||
UE->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
@@ -2545,10 +2552,10 @@ int main(int argc, char **argv)
|
||||
|
||||
dump_dci(&UE->frame_parms, &dci_alloc[0]);
|
||||
|
||||
//UE->dlsch[proc->subframe_rx&0x1][eNB_id][0]->active = 1;
|
||||
//UE->dlsch[proc->subframe_rx&0x1][eNB_id][1]->active = 1;
|
||||
//UE->dlsch[UE->current_thread_id[proc->subframe_rx]][eNB_id][0]->active = 1;
|
||||
//UE->dlsch[UE->current_thread_id[proc->subframe_rx]][eNB_id][1]->active = 1;
|
||||
|
||||
UE->pdcch_vars[proc->subframe_rx&0x1][eNB_id]->num_pdcch_symbols = num_pdcch_symbols;
|
||||
UE->pdcch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id]->num_pdcch_symbols = num_pdcch_symbols;
|
||||
|
||||
UE->dlsch_received[eNB_id]++;
|
||||
} else {
|
||||
@@ -2556,11 +2563,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
dci_received = UE->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->dci_received;
|
||||
dci_received = UE->pdcch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id]->dci_received;
|
||||
|
||||
phy_procedures_UE_RX(UE,proc,0,0,dci_flag,normal_txrx,no_relay,NULL);
|
||||
|
||||
dci_received = dci_received - UE->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->dci_received;
|
||||
dci_received = dci_received - UE->pdcch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id]->dci_received;
|
||||
|
||||
if (dci_flag && (dci_received == 0)) {
|
||||
//printf("DCI not received\n");
|
||||
@@ -2591,35 +2598,35 @@ int main(int argc, char **argv)
|
||||
//common vars
|
||||
write_output("rxsig0.m","rxs0", &UE->common_vars.rxdata[0][0],10*UE->frame_parms.samples_per_tti,1,1);
|
||||
|
||||
write_output("rxsigF0.m","rxsF0", &UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
write_output("rxsigF0.m","rxsF0", &UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (UE->frame_parms.nb_antennas_rx>1) {
|
||||
write_output("rxsig1.m","rxs1", UE->common_vars.rxdata[1],UE->frame_parms.samples_per_tti,1,1);
|
||||
write_output("rxsigF1.m","rxsF1", UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[1],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
write_output("rxsigF1.m","rxsF1", UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[1],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
}
|
||||
|
||||
write_output("dlsch00_r0.m","dl00_r0",
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][0][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (UE->frame_parms.nb_antennas_rx>1)
|
||||
write_output("dlsch01_r0.m","dl01_r0",
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][1][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][1][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (eNB->frame_parms.nb_antennas_tx>1)
|
||||
write_output("dlsch10_r0.m","dl10_r0",
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if ((UE->frame_parms.nb_antennas_rx>1) && (eNB->frame_parms.nb_antennas_tx>1))
|
||||
write_output("dlsch11_r0.m","dl11_r0",
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][3][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][3][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
|
||||
|
||||
//pdsch_vars
|
||||
|
||||
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid);
|
||||
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid);
|
||||
|
||||
write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
||||
|
||||
@@ -2635,15 +2642,15 @@ int main(int argc, char **argv)
|
||||
|
||||
|
||||
|
||||
if (UE->dlsch[subframe&0x1][eNB_id][0]->harq_ack[subframe].ack == 1) {
|
||||
if (UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_ack[subframe].ack == 1) {
|
||||
|
||||
avg_iter += UE->dlsch[subframe&0x1][eNB_id][0]->last_iteration_cnt;
|
||||
avg_iter += UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->last_iteration_cnt;
|
||||
iter_trials++;
|
||||
|
||||
if (n_frames==1)
|
||||
printf("No DLSCH errors found (round %d),uncoded ber %f\n",round,uncoded_ber);
|
||||
|
||||
UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->TBS;
|
||||
UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->current_harq_pid]->TBS;
|
||||
TB0_active = 0;
|
||||
|
||||
|
||||
@@ -2651,25 +2658,25 @@ int main(int argc, char **argv)
|
||||
else {
|
||||
errs[round]++;
|
||||
|
||||
avg_iter += UE->dlsch[subframe&0x1][eNB_id][0]->last_iteration_cnt-1;
|
||||
avg_iter += UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->last_iteration_cnt-1;
|
||||
iter_trials++;
|
||||
|
||||
if (n_frames==1) {
|
||||
//if ((n_frames==1) || (SNR>=30)) {
|
||||
printf("DLSCH errors found (round %d), uncoded ber %f\n",round,uncoded_ber);
|
||||
|
||||
for (s=0; s<UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->C; s++) {
|
||||
if (s<UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus)
|
||||
Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus;
|
||||
for (s=0; s<UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->C; s++) {
|
||||
if (s<UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Cminus)
|
||||
Kr = UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kminus;
|
||||
else
|
||||
Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus;
|
||||
Kr = UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
|
||||
printf("Decoded_output (Segment %d):\n",s);
|
||||
|
||||
for (i=0; i<Kr_bytes; i++)
|
||||
printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i],UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]);
|
||||
printf("%d : %x (%x)\n",i,UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->c[s][i],UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]);
|
||||
}
|
||||
|
||||
sprintf(fname,"rxsig0_r%d.m",round);
|
||||
@@ -2678,7 +2685,7 @@ int main(int argc, char **argv)
|
||||
sprintf(fname,"rxsigF0_r%d.m",round);
|
||||
sprintf(vname,"rxs0F_r%d",round);
|
||||
|
||||
write_output(fname,vname, &UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
write_output(fname,vname, &UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (UE->frame_parms.nb_antennas_rx>1) {
|
||||
sprintf(fname,"rxsig1_r%d.m",round);
|
||||
@@ -2686,20 +2693,20 @@ int main(int argc, char **argv)
|
||||
write_output(fname,vname, UE->common_vars.rxdata[1],UE->frame_parms.samples_per_tti,1,1);
|
||||
sprintf(fname,"rxsigF1_r%d.m",round);
|
||||
sprintf(vname,"rxs1F_r%d.m",round);
|
||||
write_output(fname,vname, UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[1],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
write_output(fname,vname, UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[1],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
}
|
||||
|
||||
sprintf(fname,"dlsch00_r%d.m",round);
|
||||
sprintf(vname,"dl00_r%d",round);
|
||||
write_output(fname,vname,
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][0][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (UE->frame_parms.nb_antennas_rx>1) {
|
||||
sprintf(fname,"dlsch01_r%d.m",round);
|
||||
sprintf(vname,"dl01_r%d",round);
|
||||
write_output(fname,vname,
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][1][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][1][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
|
||||
}
|
||||
|
||||
@@ -2707,7 +2714,7 @@ int main(int argc, char **argv)
|
||||
sprintf(fname,"dlsch10_r%d.m",round);
|
||||
sprintf(vname,"dl10_r%d",round);
|
||||
write_output(fname,vname,
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
|
||||
}
|
||||
|
||||
@@ -2715,18 +2722,18 @@ int main(int argc, char **argv)
|
||||
sprintf(fname,"dlsch11_r%d.m",round);
|
||||
sprintf(vname,"dl11_r%d",round);
|
||||
write_output(fname,vname,
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][3][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][3][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
|
||||
}
|
||||
|
||||
//pdsch_vars
|
||||
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid);
|
||||
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid);
|
||||
|
||||
|
||||
//write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
||||
//write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
|
||||
//write_output("dlsch_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4);
|
||||
//write_output("dlsch_w.m","w",UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0);
|
||||
//write_output("dlsch_w.m","w",UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0);
|
||||
//pdcch_vars
|
||||
write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[0][eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1);
|
||||
write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[0][eNB_id]->dl_ch_estimates_ext[0],300*3,1,1);
|
||||
@@ -2740,7 +2747,7 @@ int main(int argc, char **argv)
|
||||
// printf("round %d errors %d/%d\n",round,errs[round],trials);
|
||||
|
||||
round++;
|
||||
// UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round++;
|
||||
// UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->round++;
|
||||
}
|
||||
|
||||
if (xforms==1) {
|
||||
@@ -2751,7 +2758,7 @@ int main(int argc, char **argv)
|
||||
subframe);
|
||||
}
|
||||
|
||||
UE->proc.proc_rxtx[subframe&1].frame_rx++;
|
||||
UE->proc.proc_rxtx[UE->current_thread_id[subframe]].frame_rx++;
|
||||
} //round
|
||||
|
||||
// printf("\n");
|
||||
@@ -2762,7 +2769,7 @@ int main(int argc, char **argv)
|
||||
//len = chbch_stats_read(stats_buffer,NULL,0,4096);
|
||||
//printf("%s\n\n",stats_buffer);
|
||||
|
||||
if (UE->proc.proc_rxtx[subframe&1].frame_rx % 10 == 0) {
|
||||
if (UE->proc.proc_rxtx[UE->current_thread_id[subframe]].frame_rx % 10 == 0) {
|
||||
UE->bitrate[eNB_id] = (UE->total_TBS[eNB_id] - UE->total_TBS_last[eNB_id])*10;
|
||||
LOG_D(PHY,"[UE %d] Calculating bitrate: total_TBS = %d, total_TBS_last = %d, bitrate = %d kbits/s\n",UE->Mod_id,UE->total_TBS[eNB_id],UE->total_TBS_last[eNB_id],
|
||||
UE->bitrate[eNB_id]/1000);
|
||||
@@ -2781,10 +2788,10 @@ int main(int argc, char **argv)
|
||||
double t_tx_enc = (double)eNB->dlsch_encoding_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
|
||||
|
||||
double t_rx = (double)UE->phy_proc_rx[subframe&0x1].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx = (double)UE->phy_proc_rx[UE->current_thread_id[subframe]].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_dec = (double)UE->dlsch_decoding_stats[subframe&1].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_dec = (double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].p_time/cpu_freq_GHz/1000.0;
|
||||
|
||||
if (t_tx > t_tx_max)
|
||||
t_tx_max = t_tx;
|
||||
@@ -2930,7 +2937,7 @@ int main(int argc, char **argv)
|
||||
//rate*effective_rate,
|
||||
100*effective_rate,
|
||||
//rate,
|
||||
//rate*get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs),
|
||||
//rate*get_Qm(UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->mcs),
|
||||
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/
|
||||
(double)eNB->dlsch[0][0]->harq_processes[0]->TBS,
|
||||
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
|
||||
@@ -2970,10 +2977,10 @@ int main(int argc, char **argv)
|
||||
eNB->dlsch_interleaving_stats.diff/eNB->dlsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_interleaving_stats.trials);
|
||||
|
||||
printf("\n\nUE RX function statistics (per 1ms subframe)\n\n");
|
||||
std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[subframe&0x1].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->phy_proc_rx[subframe&0x1].trials - pow((double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000,2));
|
||||
printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000.0,
|
||||
UE->phy_proc_rx[subframe&0x1].trials*2/3);
|
||||
std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials - pow((double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000,2));
|
||||
printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000.0,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials*2/3);
|
||||
printf("|__Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median,
|
||||
rx_q1, rx_q3, n_rx_dropped);
|
||||
std_phy_proc_rx_fft = sqrt((double)UE->ofdm_demod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
@@ -2997,17 +3004,17 @@ int main(int argc, char **argv)
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_demod, rx_demod_median, rx_demod_q1, rx_demod_q3);
|
||||
printf("DLSCH unscrambling time :%f us (%d trials)\n",(double)UE->dlsch_unscrambling_stats.diff/UE->dlsch_unscrambling_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_unscrambling_stats.trials);
|
||||
std_phy_proc_rx_dec = sqrt((double)UE->dlsch_decoding_stats[subframe&1].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->dlsch_decoding_stats[subframe&1].trials - pow((double)UE->dlsch_decoding_stats[subframe&1].diff/UE->dlsch_decoding_stats[subframe&1].trials/cpu_freq_GHz/1000,2));
|
||||
std_phy_proc_rx_dec = sqrt((double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials - pow((double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH Decoding time (%02.2f Mbit/s, avg iter %1.2f) :%f us (%d trials, max %f)\n",
|
||||
eNB->dlsch[0][0]->harq_processes[0]->TBS/1000.0,(double)avg_iter/iter_trials,
|
||||
(double)UE->dlsch_decoding_stats[subframe&1].diff/UE->dlsch_decoding_stats[subframe&1].trials/cpu_freq_GHz/1000.0,UE->dlsch_decoding_stats[subframe&1].trials,
|
||||
(double)UE->dlsch_decoding_stats[subframe&1].max/cpu_freq_GHz/1000.0);
|
||||
(double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000.0,UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials,
|
||||
(double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].max/cpu_freq_GHz/1000.0);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3);
|
||||
printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n",
|
||||
(double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials);
|
||||
printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n",
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus ? UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus : UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus,
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Cminus ? UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kminus : UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kplus,
|
||||
(double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials);
|
||||
printf(" |__ init %f us (cycles/iter %f, %d trials)\n",
|
||||
(double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0,
|
||||
@@ -3185,12 +3192,12 @@ int main(int argc, char **argv)
|
||||
eNB->dlsch_modulation_stats.trials,
|
||||
eNB->dlsch_scrambling_stats.trials,
|
||||
eNB->dlsch_encoding_stats.trials,
|
||||
UE->phy_proc_rx[subframe&0x1].trials,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials,
|
||||
UE->ofdm_demod_stats.trials,
|
||||
UE->dlsch_rx_pdcch_stats.trials,
|
||||
UE->dlsch_llr_stats.trials,
|
||||
UE->dlsch_unscrambling_stats.trials,
|
||||
UE->dlsch_decoding_stats[subframe&1].trials
|
||||
UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials
|
||||
);
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;",
|
||||
get_time_meas_us(&eNB->phy_proc_tx),
|
||||
@@ -3198,12 +3205,12 @@ int main(int argc, char **argv)
|
||||
get_time_meas_us(&eNB->dlsch_modulation_stats),
|
||||
get_time_meas_us(&eNB->dlsch_scrambling_stats),
|
||||
get_time_meas_us(&eNB->dlsch_encoding_stats),
|
||||
get_time_meas_us(&UE->phy_proc_rx[subframe&0x1]),
|
||||
get_time_meas_us(&UE->phy_proc_rx[UE->current_thread_id[subframe]]),
|
||||
nsymb*get_time_meas_us(&UE->ofdm_demod_stats),
|
||||
get_time_meas_us(&UE->dlsch_rx_pdcch_stats),
|
||||
3*get_time_meas_us(&UE->dlsch_llr_stats),
|
||||
get_time_meas_us(&UE->dlsch_unscrambling_stats),
|
||||
get_time_meas_us(&UE->dlsch_decoding_stats[subframe&1])
|
||||
get_time_meas_us(&UE->dlsch_decoding_stats[UE->current_thread_id[subframe]])
|
||||
);
|
||||
//fprintf(time_meas_fd,"eNB_PROC_TX_STD;eNB_PROC_TX_MAX;eNB_PROC_TX_MIN;eNB_PROC_TX_MED;eNB_PROC_TX_Q1;eNB_PROC_TX_Q3;eNB_PROC_TX_DROPPED;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
|
||||
@@ -3238,12 +3245,12 @@ int main(int argc, char **argv)
|
||||
eNB->dlsch_modulation_stats.trials,
|
||||
eNB->dlsch_scrambling_stats.trials,
|
||||
eNB->dlsch_encoding_stats.trials,
|
||||
UE->phy_proc_rx[subframe&0x1].trials,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials,
|
||||
UE->ofdm_demod_stats.trials,
|
||||
UE->dlsch_rx_pdcch_stats.trials,
|
||||
UE->dlsch_llr_stats.trials,
|
||||
UE->dlsch_unscrambling_stats.trials,
|
||||
UE->dlsch_decoding_stats[subframe&1].trials);
|
||||
UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials);
|
||||
*/
|
||||
printf("[passed] effective rate : %f (%2.1f%%,%f)): log and break \n",rate*effective_rate, 100*effective_rate, rate );
|
||||
test_passed = 1;
|
||||
@@ -3298,7 +3305,7 @@ int main(int argc, char **argv)
|
||||
printf("eNB %d\n",i);
|
||||
free_eNB_dlsch(eNB->dlsch[0][i]);
|
||||
printf("UE %d\n",i);
|
||||
free_ue_dlsch(UE->dlsch[subframe&0x1][0][i]);
|
||||
free_ue_dlsch(UE->dlsch[UE->current_thread_id[subframe]][0][i]);
|
||||
}
|
||||
|
||||
if (test_perf && !test_passed)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -953,14 +953,14 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (i=0; i<2; i++) {
|
||||
UE->dlsch[subframe&0x1][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0);
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0);
|
||||
|
||||
if (!UE->dlsch[subframe&0x1][0][i]) {
|
||||
if (!UE->dlsch[UE->current_thread_id[subframe]][0][i]) {
|
||||
printf("Can't get ue dlsch structures\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
UE->dlsch[subframe&0x1][0][i]->rnti = n_rnti;
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][i]->rnti = n_rnti;
|
||||
}
|
||||
|
||||
// structure for SIC at UE
|
||||
@@ -1112,10 +1112,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[num_dci].format = format1;
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[num_dci].format = format1;
|
||||
dci_alloc[num_dci].search_space = DCI_UE_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -1255,11 +1256,12 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[num_dci].format = format1A;
|
||||
dci_alloc[num_dci].firstCCE = 0;
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[num_dci].format = format1A;
|
||||
dci_alloc[num_dci].firstCCE = 0;
|
||||
dci_alloc[num_dci].search_space = DCI_COMMON_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -1424,10 +1426,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[num_dci].format = format2A;
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[num_dci].format = format2A;
|
||||
dci_alloc[num_dci].search_space = DCI_UE_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d / format 2A (%d)\n",k,format2A);
|
||||
@@ -1564,11 +1567,12 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[num_dci].format = format1A;
|
||||
dci_alloc[num_dci].firstCCE = 0;
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[num_dci].format = format1A;
|
||||
dci_alloc[num_dci].firstCCE = 0;
|
||||
dci_alloc[num_dci].search_space = DCI_COMMON_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -1734,10 +1738,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[num_dci].format = format2;
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[num_dci].format = format2;
|
||||
dci_alloc[num_dci].search_space = DCI_UE_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -1874,11 +1879,12 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
memcpy(&dci_alloc[num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[num_dci].format = format1A;
|
||||
dci_alloc[num_dci].firstCCE = 0;
|
||||
dci_alloc[num_dci].dci_length = dci_length;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = SI_RNTI;
|
||||
dci_alloc[num_dci].format = format1A;
|
||||
dci_alloc[num_dci].firstCCE = 0;
|
||||
dci_alloc[num_dci].search_space = DCI_COMMON_SPACE;
|
||||
dump_dci(&eNB->frame_parms,&dci_alloc[num_dci]);
|
||||
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
@@ -1906,11 +1912,12 @@ int main(int argc, char **argv)
|
||||
case 5:
|
||||
case 6:
|
||||
memcpy(&dci_alloc[num_dci].dci_pdu[0],&DLSCH_alloc_pdu2_1E[k],sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
|
||||
dci_alloc[num_dci].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[num_dci].format = format1E_2A_M10PRB;
|
||||
dci_alloc[num_dci].firstCCE = 4*k;
|
||||
dci_alloc[num_dci].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
dci_alloc[num_dci].L = 1;
|
||||
dci_alloc[num_dci].rnti = n_rnti+k;
|
||||
dci_alloc[num_dci].format = format1E_2A_M10PRB;
|
||||
dci_alloc[num_dci].firstCCE = 4*k;
|
||||
dci_alloc[num_dci].search_space = DCI_UE_SPACE;
|
||||
printf("Generating dlsch params for user %d\n",k);
|
||||
generate_eNB_dlsch_params_from_dci(0,
|
||||
subframe,
|
||||
@@ -2039,7 +2046,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (SNR=snr0; SNR<snr1; SNR+=snr_step) {
|
||||
UE->proc.proc_rxtx[subframe&1].frame_rx=0;
|
||||
UE->proc.proc_rxtx[UE->current_thread_id[subframe]].frame_rx=0;
|
||||
errs[0]=0;
|
||||
errs[1]=0;
|
||||
errs[2]=0;
|
||||
@@ -2069,7 +2076,7 @@ int main(int argc, char **argv)
|
||||
reset_meas(&eNB->dlsch_rate_matching_stats);
|
||||
reset_meas(&eNB->dlsch_turbo_encoding_stats);
|
||||
|
||||
reset_meas(&UE->phy_proc_rx[subframe&0x1]); // total UE rx
|
||||
reset_meas(&UE->phy_proc_rx[UE->current_thread_id[subframe]]); // total UE rx
|
||||
reset_meas(&UE->ofdm_demod_stats);
|
||||
reset_meas(&UE->dlsch_channel_estimation_stats);
|
||||
reset_meas(&UE->dlsch_freq_offset_estimation_stats);
|
||||
@@ -2112,9 +2119,9 @@ int main(int argc, char **argv)
|
||||
//if (trials%100==0)
|
||||
eNB2UE[0]->first_run = 1;
|
||||
|
||||
ret = UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations+1;
|
||||
ret = UE->dlsch[UE->current_thread_id[subframe]][0][0]->max_turbo_iterations+1;
|
||||
|
||||
while ((round < num_rounds) && (ret > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations)) {
|
||||
while ((round < num_rounds) && (ret > UE->dlsch[UE->current_thread_id[subframe]][0][0]->max_turbo_iterations)) {
|
||||
//printf("Trial %d, round %d\n",trials,round);
|
||||
round_trials[round]++;
|
||||
|
||||
@@ -2556,8 +2563,7 @@ PMI_FEEDBACK:
|
||||
}
|
||||
}
|
||||
|
||||
num_pdcch_symbols_2 = generate_dci_top(num_ue_spec_dci,
|
||||
num_common_dci,
|
||||
num_pdcch_symbols_2 = generate_dci_top(num_ue_spec_dci + num_common_dci,
|
||||
dci_alloc,
|
||||
0,
|
||||
AMP,
|
||||
@@ -2601,7 +2607,7 @@ PMI_FEEDBACK:
|
||||
// use the PMI from previous trial
|
||||
if (DLSCH_alloc_pdu2_1E[0].tpmi == 5) {
|
||||
eNB->dlsch[0][0]->harq_processes[0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,eNB->frame_parms.N_RB_DL);
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL);
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL);
|
||||
|
||||
if (n_users>1)
|
||||
eNB->dlsch[1][0]->harq_processes[0]->pmi_alloc = (eNB->dlsch[0][0]->harq_processes[0]->pmi_alloc ^ 0x1555);
|
||||
@@ -3059,7 +3065,7 @@ PMI_FEEDBACK:
|
||||
}
|
||||
|
||||
|
||||
start_meas(&UE->phy_proc_rx[subframe&0x1]);
|
||||
start_meas(&UE->phy_proc_rx[UE->current_thread_id[subframe]]);
|
||||
|
||||
// Inner receiver scheduling for 3 slots
|
||||
|
||||
@@ -3096,24 +3102,24 @@ PMI_FEEDBACK:
|
||||
for(aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
for (i=0; i<frame_parms->N_RB_DL*12; i++) {
|
||||
((int16_t *) UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[k][(aa<<1)+aarx])[2*i+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(
|
||||
((int16_t *) UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[k][(aa<<1)+aarx])[2*i+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(
|
||||
eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x*AMP);
|
||||
//printf("x=%d,AMP=%d\n",eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x,AMP);
|
||||
((int16_t *) UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[k][(aa<<1)+aarx])[2*i+1+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(
|
||||
((int16_t *) UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[k][(aa<<1)+aarx])[2*i+1+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(
|
||||
eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].y*AMP);
|
||||
|
||||
if (transmission_mode == 7){
|
||||
//this should include the BF weights! Will not work for a random channel
|
||||
if (UE->high_speed_flag==0) {
|
||||
((int16_t *)UE->pdsch_vars[subframe&0x1][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i]=(int16_t)(
|
||||
((int16_t *)UE->pdsch_vars[UE->current_thread_id[subframe]][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i]=(int16_t)(
|
||||
eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x*AMP);
|
||||
((int16_t *)UE->pdsch_vars[subframe&0x1][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+1]=(int16_t)(
|
||||
((int16_t *)UE->pdsch_vars[UE->current_thread_id[subframe]][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+1]=(int16_t)(
|
||||
eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].y*AMP);
|
||||
//printf("**,x=%d,AMP=%d\n",eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x,AMP);
|
||||
} else {
|
||||
((int16_t *)UE->pdsch_vars[subframe&0x1][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size)*2]=(int16_t)(
|
||||
((int16_t *)UE->pdsch_vars[UE->current_thread_id[subframe]][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size)*2]=(int16_t)(
|
||||
eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x*AMP);
|
||||
((int16_t *)UE->pdsch_vars[subframe&0x1][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+1+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size)*2]=(int16_t)(
|
||||
((int16_t *)UE->pdsch_vars[UE->current_thread_id[subframe]][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+1+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size)*2]=(int16_t)(
|
||||
eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].y*AMP);
|
||||
|
||||
}
|
||||
@@ -3126,15 +3132,15 @@ PMI_FEEDBACK:
|
||||
for(aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
for (i=0; i<frame_parms->N_RB_DL*12; i++) {
|
||||
((int16_t *) UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[0][(aa<<1)+aarx])[2*i+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(short)(AMP);
|
||||
((int16_t *) UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[0][(aa<<1)+aarx])[2*i+1+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=0/2;
|
||||
((int16_t *) UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[0][(aa<<1)+aarx])[2*i+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(short)(AMP);
|
||||
((int16_t *) UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[0][(aa<<1)+aarx])[2*i+1+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=0/2;
|
||||
if (transmission_mode == 7) {
|
||||
if (UE->high_speed_flag==0){
|
||||
((int16_t *) UE->pdsch_vars[subframe&0x1][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i]=(short)(AMP);
|
||||
((int16_t *) UE->pdsch_vars[subframe&0x1][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+1]=0/2;
|
||||
((int16_t *) UE->pdsch_vars[UE->current_thread_id[subframe]][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i]=(short)(AMP);
|
||||
((int16_t *) UE->pdsch_vars[UE->current_thread_id[subframe]][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+1]=0/2;
|
||||
} else {
|
||||
((int16_t *) UE->pdsch_vars[subframe&0x1][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size)*2]=(short)(AMP);
|
||||
((int16_t *) UE->pdsch_vars[subframe&0x1][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+1+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size)*2]=0/2;
|
||||
((int16_t *) UE->pdsch_vars[UE->current_thread_id[subframe]][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size)*2]=(short)(AMP);
|
||||
((int16_t *) UE->pdsch_vars[UE->current_thread_id[subframe]][0]->dl_bf_ch_estimates[(aa<<1)+aarx])[2*i+1+((l+(Ns%2)*pilot2)*frame_parms->ofdm_symbol_size)*2]=0/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3227,7 +3233,7 @@ PMI_FEEDBACK:
|
||||
|
||||
for (i=0; i<dci_cnt; i++) {
|
||||
// printf("Generating dlsch parameters for RNTI %x\n",dci_alloc_rx[i].rnti);
|
||||
if (round == 0) UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->first_tx=1;
|
||||
if (round == 0) UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->first_tx=1;
|
||||
|
||||
if ((dci_alloc_rx[i].rnti == n_rnti) &&
|
||||
(generate_ue_dlsch_params_from_dci(0,
|
||||
@@ -3235,7 +3241,9 @@ PMI_FEEDBACK:
|
||||
dci_alloc_rx[i].dci_pdu,
|
||||
dci_alloc_rx[i].rnti,
|
||||
dci_alloc_rx[i].format,
|
||||
UE->dlsch[subframe&0x1][0],
|
||||
UE->pdcch_vars[UE->current_thread_id[subframe]][eNB_id],
|
||||
UE->pdsch_vars[UE->current_thread_id[subframe]][eNB_id],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0],
|
||||
&UE->frame_parms,
|
||||
UE->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
@@ -3244,23 +3252,23 @@ PMI_FEEDBACK:
|
||||
transmission_mode<7?0:transmission_mode))) {
|
||||
//dump_dci(&UE->frame_parms,&dci_alloc_rx[i]);
|
||||
coded_bits_per_codeword = get_G(&eNB->frame_parms,
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->nb_rb,
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->rb_alloc_even,
|
||||
get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs),
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->Nl,
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->nb_rb,
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->rb_alloc_even,
|
||||
get_Qm(UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->mcs),
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->Nl,
|
||||
UE->pdcch_vars[0]->num_pdcch_symbols,
|
||||
0,
|
||||
subframe,
|
||||
(transmission_mode<7?0:transmission_mode));
|
||||
/*if (transmission_mode==7 && common_flag==0)
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->mimo_mode = TM7; */
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->mimo_mode = TM7; */
|
||||
|
||||
/*
|
||||
rate = (double)dlsch_tbs25[get_I_TBS(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs)][UE->dlsch[subframe&0x1][0][0]->nb_rb-1]/(coded_bits_per_codeword);
|
||||
rate*=get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs);
|
||||
rate = (double)dlsch_tbs25[get_I_TBS(UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->mcs)][UE->dlsch[UE->current_thread_id[subframe]][0][0]->nb_rb-1]/(coded_bits_per_codeword);
|
||||
rate*=get_Qm(UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->mcs);
|
||||
*/
|
||||
printf("num_pdcch_symbols %d, G %d, TBS %d\n",UE->pdcch_vars[0]->num_pdcch_symbols,coded_bits_per_codeword,
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->TBS);
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->TBS);
|
||||
|
||||
dlsch_active = 1;
|
||||
} else {
|
||||
@@ -3288,7 +3296,7 @@ PMI_FEEDBACK:
|
||||
UE->pdcch_vars[0]->crnti = n_rnti;
|
||||
UE->pdcch_vars[0]->num_pdcch_symbols = num_pdcch_symbols;
|
||||
|
||||
if (round == 0) UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx=1;
|
||||
if (round == 0) UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->first_tx=1;
|
||||
|
||||
switch (transmission_mode) {
|
||||
case 1:
|
||||
@@ -3299,7 +3307,9 @@ PMI_FEEDBACK:
|
||||
&DLSCH_alloc_pdu_1[0],
|
||||
(common_flag==0)? C_RNTI : SI_RNTI,
|
||||
(common_flag==0)? format1 : format1A,
|
||||
UE->dlsch[subframe&0x1][0],
|
||||
UE->pdcch_vars[UE->current_thread_id[subframe]][eNB_id],
|
||||
UE->pdsch_vars[UE->current_thread_id[subframe]][eNB_id],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0],
|
||||
&UE->frame_parms,
|
||||
UE->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
@@ -3307,24 +3317,24 @@ PMI_FEEDBACK:
|
||||
P_RNTI,
|
||||
transmission_mode<7?0:transmission_mode);
|
||||
/*if(transmission_mode==7 && common_flag==0)
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->mimo_mode = TM7;*/
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->mimo_mode = TM7;*/
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// printf("Rate: TM3 (before) round %d (%d) first_tx %d\n",round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx);
|
||||
// printf("Rate: TM3 (before) round %d (%d) first_tx %d\n",round,UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->round,UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->first_tx);
|
||||
generate_ue_dlsch_params_from_dci(0,
|
||||
subframe,
|
||||
&DLSCH_alloc_pdu_1[0],
|
||||
(common_flag==0)? C_RNTI : SI_RNTI,
|
||||
(common_flag==0)? format2A : format1A,
|
||||
UE->dlsch[subframe&0x1][0],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0],
|
||||
&UE->frame_parms,
|
||||
UE->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
0,
|
||||
P_RNTI,
|
||||
0);
|
||||
// printf("Rate: TM3 (after) round %d (%d) first_tx %d\n",round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx);
|
||||
// printf("Rate: TM3 (after) round %d (%d) first_tx %d\n",round,UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->round,UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->first_tx);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
@@ -3333,7 +3343,9 @@ PMI_FEEDBACK:
|
||||
&DLSCH_alloc_pdu_1[0],
|
||||
(common_flag==0)? C_RNTI : SI_RNTI,
|
||||
(common_flag==0)? format2 : format1A,
|
||||
UE->dlsch[subframe&0x1][0],
|
||||
UE->pdcch_vars[UE->current_thread_id[subframe]][eNB_id],
|
||||
UE->pdsch_vars[UE->current_thread_id[subframe]][eNB_id],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0],
|
||||
&UE->frame_parms,
|
||||
UE->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
@@ -3349,7 +3361,9 @@ PMI_FEEDBACK:
|
||||
&DLSCH_alloc_pdu2_1E[0],
|
||||
C_RNTI,
|
||||
format1E_2A_M10PRB,
|
||||
UE->dlsch[subframe&0x1][0],
|
||||
ue->pdcch_vars[UE->current_thread_id[subframe]][eNB_id],
|
||||
ue->pdsch_vars[UE->current_thread_id[subframe]][eNB_id],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0],
|
||||
&UE->frame_parms,
|
||||
UE->pdsch_config_dedicated,
|
||||
SI_RNTI,
|
||||
@@ -3381,7 +3395,7 @@ PMI_FEEDBACK:
|
||||
if ((Ns==(1+(2*subframe))) && (l==0)) {// process PDSCH symbols 1,2,3,4,5,(6 Normal Prefix)
|
||||
|
||||
if ((transmission_mode == 5) &&
|
||||
(UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->dl_power_off==0) &&
|
||||
(UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->dl_power_off==0) &&
|
||||
(UE->use_ia_receiver ==1)) {
|
||||
dual_stream_UE = 1;
|
||||
} else {
|
||||
@@ -3404,7 +3418,7 @@ PMI_FEEDBACK:
|
||||
(m==UE->pdcch_vars[0]->num_pdcch_symbols)?1:0,
|
||||
dual_stream_UE,
|
||||
i_mod,
|
||||
UE->dlsch[subframe&0x1][0][0]->current_harq_pid)==-1) {
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid)==-1) {
|
||||
dlsch_active = 0;
|
||||
break;
|
||||
}
|
||||
@@ -3430,7 +3444,7 @@ PMI_FEEDBACK:
|
||||
0,
|
||||
dual_stream_UE,
|
||||
i_mod,
|
||||
UE->dlsch[subframe&0x1][0][0]->current_harq_pid)==-1) {
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid)==-1) {
|
||||
dlsch_active=0;
|
||||
break;
|
||||
}
|
||||
@@ -3456,7 +3470,7 @@ PMI_FEEDBACK:
|
||||
0,
|
||||
dual_stream_UE,
|
||||
i_mod,
|
||||
UE->dlsch[subframe&0x1][0][0]->current_harq_pid)==-1) {
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid)==-1) {
|
||||
dlsch_active=0;
|
||||
break;
|
||||
}
|
||||
@@ -3477,30 +3491,30 @@ PMI_FEEDBACK:
|
||||
//write_output("rxsig0.m","rxs0", &UE->common_vars.rxdata[0][0],10*UE->frame_parms.samples_per_tti,1,1);
|
||||
write_output("rxsig0.m","rxs0", &UE->common_vars.rxdata[0][subframe*UE->frame_parms.samples_per_tti],UE->frame_parms.samples_per_tti,1,1);
|
||||
//write_output("rxsigF0.m","rxsF0", &UE->common_vars.rxdataF[0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
write_output("rxsigF0.m","rxsF0", &UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
write_output("rxsigF0.m","rxsF0", &UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (UE->frame_parms.nb_antennas_rx>1) {
|
||||
write_output("rxsig1.m","rxs1", UE->common_vars.rxdata[1],UE->frame_parms.samples_per_tti,1,1);
|
||||
write_output("rxsigF1.m","rxsF1", UE->common_vars..common_vars_rx_data_per_thread[subframe&0x1]rxdataF[1],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
write_output("rxsigF1.m","rxsF1", UE->common_vars..common_vars_rx_data_per_thread[UE->current_thread_id[subframe]]rxdataF[1],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
}
|
||||
|
||||
write_output("dlsch00_r0.m","dl00_r0",
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][0][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (UE->frame_parms.nb_antennas_rx>1)
|
||||
write_output("dlsch01_r0.m","dl01_r0",
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][1][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][1][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (eNB->frame_parms.nb_antennas_tx>1)
|
||||
write_output("dlsch10_r0.m","dl10_r0",
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if ((UE->frame_parms.nb_antennas_rx>1) && (eNB->frame_parms.nb_antennas_tx>1))
|
||||
write_output("dlsch11_r0.m","dl11_r0",
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][3][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][3][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
|
||||
|
||||
//pdsch_vars
|
||||
@@ -3527,14 +3541,14 @@ PMI_FEEDBACK:
|
||||
if (trials==0 && round==0 && transmission_mode>=5 && transmission_mode<7) {
|
||||
for (iii=0; iii<NB_RB; iii++) {
|
||||
//fprintf(csv_fd, "%d, %d", (UE->pdsch_vars[eNB_id]->pmi_ext[iii]),(UE->pdsch_vars[eNB_id_i]->pmi_ext[iii]));
|
||||
fprintf(csv_fd,"%x,%x,",(UE->pdsch_vars[subframe&0x1][eNB_id]->pmi_ext[iii]),(UE->pdsch_vars[eNB_id]->pmi_ext[iii]));
|
||||
printf("%x ",(UE->pdsch_vars[subframe&0x1][eNB_id]->pmi_ext[iii]));
|
||||
fprintf(csv_fd,"%x,%x,",(UE->pdsch_vars[UE->current_thread_id[subframe]][eNB_id]->pmi_ext[iii]),(UE->pdsch_vars[eNB_id]->pmi_ext[iii]));
|
||||
printf("%x ",(UE->pdsch_vars[UE->current_thread_id[subframe]][eNB_id]->pmi_ext[iii]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int cw=Kmimo-1; cw>=0; cw--) {
|
||||
UE->dlsch[subframe&0x1][0][cw]->rnti = (common_flag==0) ? n_rnti: SI_RNTI;
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][cw]->rnti = (common_flag==0) ? n_rnti: SI_RNTI;
|
||||
coded_bits_per_codeword = get_G(&eNB->frame_parms,
|
||||
eNB->dlsch[0][cw]->harq_processes[0]->nb_rb,
|
||||
eNB->dlsch[0][cw]->harq_processes[0]->rb_alloc,
|
||||
@@ -3545,14 +3559,14 @@ PMI_FEEDBACK:
|
||||
subframe,
|
||||
(transmission_mode<7?0:transmission_mode));
|
||||
|
||||
UE->dlsch[subframe&0x1][0][cw]->harq_processes[UE->dlsch[subframe&0x1][0][cw]->current_harq_pid]->G = coded_bits_per_codeword;
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][cw]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][cw]->current_harq_pid]->G = coded_bits_per_codeword;
|
||||
|
||||
|
||||
|
||||
// calculate uncoded BLER
|
||||
uncoded_ber=0;
|
||||
for (i=0;i<coded_bits_per_codeword;i++)
|
||||
if (eNB->dlsch[0][0]->harq_processes[0]->e[i] != (UE->pdsch_vars[subframe&0x1][0]->llr[0][i]<0)) {
|
||||
if (eNB->dlsch[0][0]->harq_processes[0]->e[i] != (UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i]<0)) {
|
||||
uncoded_ber_bit[i] = 1;
|
||||
uncoded_ber++;
|
||||
}
|
||||
@@ -3569,26 +3583,26 @@ PMI_FEEDBACK:
|
||||
start_meas(&UE->dlsch_unscrambling_stats);
|
||||
dlsch_unscrambling(&UE->frame_parms,
|
||||
0,
|
||||
UE->dlsch[subframe&0x1][0][cw],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][cw],
|
||||
coded_bits_per_codeword,
|
||||
UE->pdsch_vars[subframe&0x1][eNB_id]->llr[cw],
|
||||
UE->pdsch_vars[UE->current_thread_id[subframe]][eNB_id]->llr[cw],
|
||||
0,
|
||||
subframe<<1);
|
||||
stop_meas(&UE->dlsch_unscrambling_stats);
|
||||
|
||||
start_meas(&UE->dlsch_decoding_stats);
|
||||
ret = dlsch_decoding(UE,
|
||||
UE->pdsch_vars[subframe&0x1][eNB_id]->llr[cw],
|
||||
UE->pdsch_vars[UE->current_thread_id[subframe]][eNB_id]->llr[cw],
|
||||
&UE->frame_parms,
|
||||
UE->dlsch[subframe&0x1][0][cw],
|
||||
UE->dlsch[subframe&0x1][0][cw]->harq_processes[UE->dlsch[subframe&0x1][0][cw]->current_harq_pid],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][cw],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][cw]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][cw]->current_harq_pid],
|
||||
subframe,
|
||||
UE->dlsch[subframe&0x1][0][cw]->current_harq_pid,
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][cw]->current_harq_pid,
|
||||
1,llr8_flag);
|
||||
stop_meas(&UE->dlsch_decoding_stats);
|
||||
|
||||
if (cw==1) {
|
||||
if (ret <= UE->dlsch[subframe&0x1][0][cw]->max_turbo_iterations) {
|
||||
if (ret <= UE->dlsch[UE->current_thread_id[subframe]][0][cw]->max_turbo_iterations) {
|
||||
} else {
|
||||
errs2[round]++;
|
||||
}
|
||||
@@ -3596,10 +3610,10 @@ PMI_FEEDBACK:
|
||||
}
|
||||
|
||||
|
||||
stop_meas(&UE->phy_proc_rx[subframe&0x1]);
|
||||
stop_meas(&UE->phy_proc_rx[UE->current_thread_id[subframe]]);
|
||||
|
||||
|
||||
if (ret <= UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations) {
|
||||
if (ret <= UE->dlsch[UE->current_thread_id[subframe]][0][0]->max_turbo_iterations) {
|
||||
|
||||
avg_iter += ret;
|
||||
iter_trials++;
|
||||
@@ -3607,15 +3621,15 @@ PMI_FEEDBACK:
|
||||
if (n_frames==1)
|
||||
printf("No DLSCH errors found (round %d),uncoded ber %f\n",round,uncoded_ber);
|
||||
|
||||
UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->TBS;
|
||||
UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->current_harq_pid]->TBS;
|
||||
TB0_active = 0;
|
||||
|
||||
if (UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mimo_mode == LARGE_CDD) { //try to decode second stream using SIC
|
||||
if (UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->current_harq_pid]->mimo_mode == LARGE_CDD) { //try to decode second stream using SIC
|
||||
/*
|
||||
for (round = 0 ; round < UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->round ; round++) {
|
||||
for (round = 0 ; round < UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->current_harq_pid]->round ; round++) {
|
||||
// re-encoding of first stream
|
||||
dlsch0_ue_harq = UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid];
|
||||
dlsch0_eNB_harq = UE->dlsch[subframe&0x1][eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid];
|
||||
dlsch0_ue_harq = UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->current_harq_pid];
|
||||
dlsch0_eNB_harq = UE->dlsch[UE->current_thread_id[subframe]][eNB_id]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->current_harq_pid];
|
||||
dlsch0_eNB_harq->mimo_mode = LARGE_CDD;
|
||||
dlsch0_eNB_harq->rb_alloc[0] = dlsch0_ue_harq->rb_alloc_even[0];
|
||||
dlsch0_eNB_harq->nb_rb = dlsch0_ue_harq->nb_rb;
|
||||
@@ -3627,13 +3641,13 @@ PMI_FEEDBACK:
|
||||
dlsch0_eNB_harq->dl_power_off = dlsch0_ue_harq->dl_power_off;
|
||||
dlsch0_eNB_harq->status = dlsch0_ue_harq->status;
|
||||
|
||||
UE->dlsch[subframe&0x1][eNB_id]->active = UE->dlsch[subframe&0x1][eNB_id][0]->active;
|
||||
UE->dlsch[subframe&0x1][eNB_id]->rnti = UE->dlsch[subframe&0x1][eNB_id][0]->rnti;
|
||||
UE->dlsch[UE->current_thread_id[subframe]][eNB_id]->active = UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->active;
|
||||
UE->dlsch[UE->current_thread_id[subframe]][eNB_id]->rnti = UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->rnti;
|
||||
|
||||
dlsch_encoding(UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->b,
|
||||
dlsch_encoding(UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->current_harq_pid]->b,
|
||||
&UE->frame_parms,
|
||||
num_pdcch_symbols,
|
||||
UE->dlsch[subframe&0x1][0],
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0],
|
||||
0,subframe,
|
||||
&UE->dlsch_rate_matching_stats,
|
||||
&UE->dlsch_turbo_encoding_stats,
|
||||
@@ -3660,18 +3674,18 @@ PMI_FEEDBACK:
|
||||
//if ((n_frames==1) || (SNR>=30))
|
||||
printf("DLSCH errors found (round %d), uncoded ber %f\n",round,uncoded_ber);
|
||||
|
||||
for (s=0; s<UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->C; s++) {
|
||||
if (s<UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus)
|
||||
Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus;
|
||||
for (s=0; s<UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->C; s++) {
|
||||
if (s<UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Cminus)
|
||||
Kr = UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kminus;
|
||||
else
|
||||
Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus;
|
||||
Kr = UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
|
||||
printf("Decoded_output (Segment %d):\n",s);
|
||||
|
||||
for (i=0; i<Kr_bytes; i++)
|
||||
printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i],UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]);
|
||||
printf("%d : %x (%x)\n",i,UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->c[s][i],UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]);
|
||||
}
|
||||
|
||||
sprintf(fname,"rxsig0_r%d.m",round);
|
||||
@@ -3679,7 +3693,7 @@ PMI_FEEDBACK:
|
||||
write_output(fname,vname, &UE->common_vars.rxdata[0][0],10*UE->frame_parms.samples_per_tti,1,1);
|
||||
sprintf(fname,"rxsigF0_r%d.m",round);
|
||||
sprintf(vname,"rxs0F_r%d",round);
|
||||
write_output(fname,vname, &UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0][0],2*UE->frame_parms.ofdm_symbol_size*nsymb,2,1);
|
||||
write_output(fname,vname, &UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[0][0],2*UE->frame_parms.ofdm_symbol_size*nsymb,2,1);
|
||||
|
||||
if (UE->frame_parms.nb_antennas_rx>1) {
|
||||
sprintf(fname,"rxsig1_r%d.m",round);
|
||||
@@ -3687,20 +3701,20 @@ PMI_FEEDBACK:
|
||||
write_output(fname,vname, UE->common_vars.rxdata[1],UE->frame_parms.samples_per_tti,1,1);
|
||||
sprintf(fname,"rxsig1F_r%d.m",round);
|
||||
sprintf(vname,"rxs1F_r%d.m",round);
|
||||
write_output(fname,vname, UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[1],2*UE->frame_parms.ofdm_symbol_size*nsymb,2,1);
|
||||
write_output(fname,vname, UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[1],2*UE->frame_parms.ofdm_symbol_size*nsymb,2,1);
|
||||
}
|
||||
|
||||
sprintf(fname,"dlsch00_r%d.m",round);
|
||||
sprintf(vname,"dl00_r%d",round);
|
||||
write_output(fname,vname,
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][0][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
if (UE->frame_parms.nb_antennas_rx>1) {
|
||||
sprintf(fname,"dlsch01_r%d.m",round);
|
||||
sprintf(vname,"dl01_r%d",round);
|
||||
write_output(fname,vname,
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][1][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][1][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
|
||||
}
|
||||
|
||||
@@ -3708,7 +3722,7 @@ PMI_FEEDBACK:
|
||||
sprintf(fname,"dlsch10_r%d.m",round);
|
||||
sprintf(vname,"dl10_r%d",round);
|
||||
write_output(fname,vname,
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
|
||||
}
|
||||
|
||||
@@ -3716,7 +3730,7 @@ PMI_FEEDBACK:
|
||||
sprintf(fname,"dlsch11_r%d.m",round);
|
||||
sprintf(vname,"dl11_r%d",round);
|
||||
write_output(fname,vname,
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][3][0]),
|
||||
&(UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].dl_ch_estimates[eNB_id][3][0]),
|
||||
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
|
||||
}
|
||||
|
||||
@@ -3726,7 +3740,7 @@ PMI_FEEDBACK:
|
||||
write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
||||
write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
|
||||
write_output("dlsch_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4);
|
||||
write_output("dlsch_w.m","w",UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0);
|
||||
write_output("dlsch_w.m","w",UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0);
|
||||
*/
|
||||
|
||||
if (round == 3) exit(-1);
|
||||
@@ -3735,7 +3749,7 @@ PMI_FEEDBACK:
|
||||
// printf("round %d errors %d/%d\n",round,errs[round],trials);
|
||||
|
||||
round++;
|
||||
// UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round++;
|
||||
// UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->round++;
|
||||
}
|
||||
|
||||
if (xforms==1) {
|
||||
@@ -3756,7 +3770,7 @@ PMI_FEEDBACK:
|
||||
//len = chbch_stats_read(stats_buffer,NULL,0,4096);
|
||||
//printf("%s\n\n",stats_buffer);
|
||||
|
||||
if (UE->proc.proc_rxtx[subframe&1].frame_rx % 10 == 0) {
|
||||
if (UE->proc.proc_rxtx[UE->current_thread_id[subframe]].frame_rx % 10 == 0) {
|
||||
UE->bitrate[eNB_id] = (UE->total_TBS[eNB_id] - UE->total_TBS_last[eNB_id])*10;
|
||||
LOG_D(PHY,"[UE %d] Calculating bitrate: total_TBS = %d, total_TBS_last = %d, bitrate = %d kbits/s\n",UE->Mod_id,UE->total_TBS[eNB_id],UE->total_TBS_last[eNB_id],
|
||||
UE->bitrate[eNB_id]/1000);
|
||||
@@ -3764,7 +3778,7 @@ PMI_FEEDBACK:
|
||||
}
|
||||
|
||||
|
||||
UE->proc.proc_rxtx[subframe&1].frame_rx++;
|
||||
UE->proc.proc_rxtx[UE->current_thread_id[subframe]].frame_rx++;
|
||||
|
||||
/* calculate the total processing time for each packet,
|
||||
* get the max, min, and number of packets that exceed t>2000us
|
||||
@@ -3775,7 +3789,7 @@ PMI_FEEDBACK:
|
||||
double t_tx_enc = (double)eNB->dlsch_encoding_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
|
||||
|
||||
double t_rx = (double)UE->phy_proc_rx[subframe&0x1].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx = (double)UE->phy_proc_rx[UE->current_thread_id[subframe]].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_dec = (double)UE->dlsch_decoding_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
@@ -3925,7 +3939,7 @@ PMI_FEEDBACK:
|
||||
rate*effective_rate,
|
||||
100*effective_rate,
|
||||
rate,
|
||||
rate*get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs),
|
||||
rate*get_Qm(UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->mcs),
|
||||
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/
|
||||
(double)eNB->dlsch[0][0]->harq_processes[0]->TBS,
|
||||
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
|
||||
@@ -3964,10 +3978,10 @@ PMI_FEEDBACK:
|
||||
eNB->dlsch_interleaving_stats.diff/eNB->dlsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_interleaving_stats.trials);
|
||||
|
||||
printf("\n\nUE RX function statistics (per 1ms subframe)\n\n");
|
||||
std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[subframe&0x1].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->phy_proc_rx[subframe&0x1].trials - pow((double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000,2));
|
||||
printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000.0,
|
||||
UE->phy_proc_rx[subframe&0x1].trials*2/3);
|
||||
std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials - pow((double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000,2));
|
||||
printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000.0,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials*2/3);
|
||||
printf("|__Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median,
|
||||
rx_q1, rx_q3, n_rx_dropped);
|
||||
std_phy_proc_rx_fft = sqrt((double)UE->ofdm_demod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
@@ -4001,7 +4015,7 @@ PMI_FEEDBACK:
|
||||
printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n",
|
||||
(double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials);
|
||||
printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n",
|
||||
UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus ? UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus : UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus,
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Cminus ? UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kminus : UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kplus,
|
||||
(double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials);
|
||||
printf(" |__ init %f us (cycles/iter %f, %d trials)\n",
|
||||
(double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0,
|
||||
@@ -4179,7 +4193,7 @@ PMI_FEEDBACK:
|
||||
eNB->dlsch_modulation_stats.trials,
|
||||
eNB->dlsch_scrambling_stats.trials,
|
||||
eNB->dlsch_encoding_stats.trials,
|
||||
UE->phy_proc_rx[subframe&0x1].trials,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials,
|
||||
UE->ofdm_demod_stats.trials,
|
||||
UE->dlsch_rx_pdcch_stats.trials,
|
||||
UE->dlsch_llr_stats.trials,
|
||||
@@ -4192,7 +4206,7 @@ PMI_FEEDBACK:
|
||||
get_time_meas_us(&eNB->dlsch_modulation_stats),
|
||||
get_time_meas_us(&eNB->dlsch_scrambling_stats),
|
||||
get_time_meas_us(&eNB->dlsch_encoding_stats),
|
||||
get_time_meas_us(&UE->phy_proc_rx[subframe&0x1]),
|
||||
get_time_meas_us(&UE->phy_proc_rx[UE->current_thread_id[subframe]]),
|
||||
nsymb*get_time_meas_us(&UE->ofdm_demod_stats),
|
||||
get_time_meas_us(&UE->dlsch_rx_pdcch_stats),
|
||||
3*get_time_meas_us(&UE->dlsch_llr_stats),
|
||||
@@ -4232,7 +4246,7 @@ PMI_FEEDBACK:
|
||||
eNB->dlsch_modulation_stats.trials,
|
||||
eNB->dlsch_scrambling_stats.trials,
|
||||
eNB->dlsch_encoding_stats.trials,
|
||||
UE->phy_proc_rx[subframe&0x1].trials,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials,
|
||||
UE->ofdm_demod_stats.trials,
|
||||
UE->dlsch_rx_pdcch_stats.trials,
|
||||
UE->dlsch_llr_stats.trials,
|
||||
@@ -4290,7 +4304,7 @@ PMI_FEEDBACK:
|
||||
printf("eNB %d\n",i);
|
||||
free_eNB_dlsch(eNB->dlsch[0][i]);
|
||||
printf("UE %d\n",i);
|
||||
free_ue_dlsch(UE->dlsch[subframe&0x1][0][i]);
|
||||
free_ue_dlsch(UE->dlsch[UE->current_thread_id[subframe]][0][i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,8 +66,7 @@ DCI_PDU *get_dci(uint8_t Mod_id, uint8_t frame, uint8_t subframe)
|
||||
int dci_length_bytes,dci_length;
|
||||
int BCCH_pdu_size_bits, BCCH_pdu_size_bytes;
|
||||
|
||||
DCI_pdu.Num_ue_spec_dci = 0;
|
||||
DCI_pdu.Num_common_dci = 0;
|
||||
DCI_pdu.Num_dci = 0;
|
||||
|
||||
if (subframe_select(&PHY_vars_eNB_g[0]->lte_frame_parms, subframe) == SF_S) {
|
||||
return (&DCI_pdu);
|
||||
@@ -281,28 +280,30 @@ DCI_PDU *get_dci(uint8_t Mod_id, uint8_t frame, uint8_t subframe)
|
||||
}
|
||||
|
||||
// add common dci
|
||||
DCI_pdu.dci_alloc[0].dci_length = BCCH_pdu_size_bits;
|
||||
DCI_pdu.dci_alloc[0].L = 2;
|
||||
DCI_pdu.dci_alloc[0].rnti = SI_RNTI;
|
||||
DCI_pdu.dci_alloc[0].format = format1A;
|
||||
DCI_pdu.dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu.dci_alloc[0].dci_length = BCCH_pdu_size_bits;
|
||||
DCI_pdu.dci_alloc[0].L = 2;
|
||||
DCI_pdu.dci_alloc[0].rnti = SI_RNTI;
|
||||
DCI_pdu.dci_alloc[0].format = format1A;
|
||||
DCI_pdu.dci_alloc[0].ra_flag = 0;
|
||||
DCI_pdu.dci_alloc[0].search_space = DCI_COMMON_SPACE;
|
||||
memcpy((void*)&DCI_pdu.dci_alloc[0].dci_pdu[0], &BCCH_alloc_pdu[0], BCCH_pdu_size_bytes);
|
||||
DCI_pdu.Num_common_dci++;
|
||||
DCI_pdu.Num_dci++;
|
||||
|
||||
// add ue specific dci
|
||||
DCI_pdu.dci_alloc[k+DCI_pdu.Num_common_dci].dci_length = dci_length;
|
||||
DCI_pdu.dci_alloc[k+DCI_pdu.Num_common_dci].L = 0;
|
||||
DCI_pdu.dci_alloc[k+DCI_pdu.Num_common_dci].rnti = n_rnti+k;
|
||||
DCI_pdu.dci_alloc[k+DCI_pdu.Num_common_dci].format = format1;
|
||||
DCI_pdu.dci_alloc[k+DCI_pdu.Num_common_dci].ra_flag = 0;
|
||||
memcpy((void*)&DCI_pdu.dci_alloc[k+DCI_pdu.Num_common_dci].dci_pdu[0], &DLSCH_alloc_pdu_1[k], dci_length_bytes);
|
||||
DCI_pdu.Num_ue_spec_dci++;
|
||||
DCI_pdu.dci_alloc[DCI_pdu.Num_dci].dci_length = dci_length;
|
||||
DCI_pdu.dci_alloc[DCI_pdu.Num_dci].L = 0;
|
||||
DCI_pdu.dci_alloc[DCI_pdu.Num_dci].rnti = n_rnti+k;
|
||||
DCI_pdu.dci_alloc[DCI_pdu.Num_dci].format = format1;
|
||||
DCI_pdu.dci_alloc[DCI_pdu.Num_dci].ra_flag = 0;
|
||||
DCI_pdu.dci_alloc[DCI_pdu.Num_dci].search_space = DCI_UE_SPACE;
|
||||
memcpy((void*)&DCI_pdu.dci_alloc[DCI_pdu.Num_dci].dci_pdu[0], &DLSCH_alloc_pdu_1[k], dci_length_bytes);
|
||||
DCI_pdu.Num_dci++;
|
||||
|
||||
}
|
||||
|
||||
DCI_pdu.nCCE = 0;
|
||||
|
||||
for (i=0; i<DCI_pdu.Num_common_dci+DCI_pdu.Num_ue_spec_dci; i++) {
|
||||
for (i=0; i<DCI_pdu.Num_dci; i++) {
|
||||
DCI_pdu.nCCE += (1<<(DCI_pdu.dci_alloc[i].L));
|
||||
}
|
||||
|
||||
|
||||
@@ -570,7 +570,6 @@ int main(int argc, char **argv)
|
||||
|
||||
/*
|
||||
num_pdcch_symbols = generate_dci_top(1,
|
||||
0,
|
||||
dci_alloc,
|
||||
0,
|
||||
1024,
|
||||
|
||||
@@ -66,8 +66,7 @@ DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2
|
||||
int UL_pdu_size_bits=0, UL_pdu_size_bytes=0;
|
||||
int mcs = 3;
|
||||
|
||||
DCI_pdu.Num_ue_spec_dci = 0;
|
||||
DCI_pdu.Num_common_dci = 0;
|
||||
DCI_pdu.Num_dci = 0;
|
||||
|
||||
if (lte_frame_parms->frame_type == TDD) {
|
||||
switch (lte_frame_parms->N_RB_DL) {
|
||||
@@ -358,35 +357,38 @@ DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2
|
||||
for (ind = 0; ind<num_dci; ind++) {
|
||||
if (format_selector[ind]==format1A) {
|
||||
// add common dci
|
||||
DCI_pdu.dci_alloc[ind].dci_length = BCCH_pdu_size_bits;
|
||||
DCI_pdu.dci_alloc[ind].L = log2Lcommon;
|
||||
DCI_pdu.dci_alloc[ind].rnti = SI_RNTI;
|
||||
DCI_pdu.dci_alloc[ind].format = format1A;
|
||||
DCI_pdu.dci_alloc[ind].ra_flag = 0;
|
||||
memcpy((void*)&DCI_pdu.dci_alloc[0].dci_pdu[0], &BCCH_alloc_pdu[0], BCCH_pdu_size_bytes);
|
||||
DCI_pdu.Num_common_dci++;
|
||||
DCI_pdu.dci_alloc[ind].dci_length = BCCH_pdu_size_bits;
|
||||
DCI_pdu.dci_alloc[ind].L = log2Lcommon;
|
||||
DCI_pdu.dci_alloc[ind].rnti = SI_RNTI;
|
||||
DCI_pdu.dci_alloc[ind].format = format1A;
|
||||
DCI_pdu.dci_alloc[ind].ra_flag = 0;
|
||||
DCI_pdu.dci_alloc[ind].search_space = DCI_COMMON_SPACE;
|
||||
memcpy((void*)&DCI_pdu.dci_alloc[ind].dci_pdu[0], &BCCH_alloc_pdu[0], BCCH_pdu_size_bytes);
|
||||
DCI_pdu.Num_dci++;
|
||||
printf("Added common dci (%d) for rnti %x\n",ind,SI_RNTI);
|
||||
}
|
||||
|
||||
|
||||
if (format_selector[ind]==format1) {
|
||||
DCI_pdu.dci_alloc[ind].dci_length = dci_length;
|
||||
DCI_pdu.dci_alloc[ind].L = log2L;
|
||||
DCI_pdu.dci_alloc[ind].rnti = rnti;
|
||||
DCI_pdu.dci_alloc[ind].format = format1;
|
||||
DCI_pdu.dci_alloc[ind].ra_flag = 0;
|
||||
DCI_pdu.dci_alloc[ind].dci_length = dci_length;
|
||||
DCI_pdu.dci_alloc[ind].L = log2L;
|
||||
DCI_pdu.dci_alloc[ind].rnti = rnti;
|
||||
DCI_pdu.dci_alloc[ind].format = format1;
|
||||
DCI_pdu.dci_alloc[ind].ra_flag = 0;
|
||||
DCI_pdu.dci_alloc[ind].search_space = DCI_UE_SPACE;
|
||||
memcpy((void*)&DCI_pdu.dci_alloc[ind].dci_pdu[0], &DLSCH_alloc_pdu[0], dci_length_bytes);
|
||||
DCI_pdu.Num_ue_spec_dci++;
|
||||
DCI_pdu.Num_dci++;
|
||||
}
|
||||
|
||||
if (format_selector[ind]==format0) {
|
||||
DCI_pdu.dci_alloc[ind].dci_length = UL_pdu_size_bits;
|
||||
DCI_pdu.dci_alloc[ind].L = log2L;
|
||||
DCI_pdu.dci_alloc[ind].rnti = rnti;
|
||||
DCI_pdu.dci_alloc[ind].format = format0;
|
||||
DCI_pdu.dci_alloc[ind].ra_flag = 0;
|
||||
DCI_pdu.dci_alloc[ind].dci_length = UL_pdu_size_bits;
|
||||
DCI_pdu.dci_alloc[ind].L = log2L;
|
||||
DCI_pdu.dci_alloc[ind].rnti = rnti;
|
||||
DCI_pdu.dci_alloc[ind].format = format0;
|
||||
DCI_pdu.dci_alloc[ind].ra_flag = 0;
|
||||
DCI_pdu.dci_alloc[ind].search_space = DCI_UE_SPACE;
|
||||
memcpy((void*)&DCI_pdu.dci_alloc[ind].dci_pdu[0], &UL_alloc_pdu[0], UL_pdu_size_bytes);
|
||||
DCI_pdu.Num_ue_spec_dci++;
|
||||
DCI_pdu.Num_dci++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -849,20 +851,20 @@ int main(int argc, char **argv)
|
||||
n_trials_dl++;
|
||||
}
|
||||
}
|
||||
num_pdcch_symbols = get_num_pdcch_symbols(DCI_pdu.Num_common_dci+DCI_pdu.Num_ue_spec_dci,
|
||||
num_pdcch_symbols = get_num_pdcch_symbols(DCI_pdu.Num_dci,
|
||||
DCI_pdu.dci_alloc, frame_parms, subframe);
|
||||
numCCE = get_nCCE(num_pdcch_symbols,&eNB->frame_parms,get_mi(&eNB->frame_parms,subframe));
|
||||
|
||||
if (n_frames==1) {
|
||||
printf("num_dci %d, num_pddch_symbols %d, nCCE %d\n",
|
||||
DCI_pdu.Num_common_dci+DCI_pdu.Num_ue_spec_dci,
|
||||
DCI_pdu.Num_dci,
|
||||
num_pdcch_symbols,numCCE);
|
||||
}
|
||||
|
||||
// apply RNTI-based nCCE allocation
|
||||
memset(CCE_table,0,800*sizeof(int));
|
||||
|
||||
for (i = 0; i < DCI_pdu.Num_common_dci + DCI_pdu.Num_ue_spec_dci; i++) {
|
||||
for (i = 0; i < DCI_pdu.Num_dci; i++) {
|
||||
// SI RNTI
|
||||
if (DCI_pdu.dci_alloc[i].rnti == SI_RNTI) {
|
||||
DCI_pdu.dci_alloc[i].firstCCE = get_nCCE_offset_l1(CCE_table,
|
||||
@@ -899,8 +901,7 @@ int main(int argc, char **argv)
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
num_pdcch_symbols = generate_dci_top(DCI_pdu.Num_ue_spec_dci,
|
||||
DCI_pdu.Num_common_dci,
|
||||
num_pdcch_symbols = generate_dci_top(DCI_pdu.Num_dci,
|
||||
DCI_pdu.dci_alloc,
|
||||
0,
|
||||
AMP,
|
||||
|
||||
@@ -493,7 +493,6 @@ int main(int argc, char **argv)
|
||||
|
||||
|
||||
num_pdcch_symbols = generate_dci_top(1,
|
||||
0,
|
||||
dci_alloc,
|
||||
0,
|
||||
1024,
|
||||
|
||||
@@ -1101,11 +1101,12 @@ int main(int argc, char **argv)
|
||||
((DCI1_5MHz_FDD_t*)&DLSCH_alloc_pdu)->mcs = 0;
|
||||
((DCI1_5MHz_FDD_t*)&DLSCH_alloc_pdu)->ndi = 1;
|
||||
((DCI1_5MHz_FDD_t*)&DLSCH_alloc_pdu)->rv = 0;
|
||||
dci_alloc[0].dci_length = sizeof_DCI1_5MHz_FDD_t;
|
||||
dci_alloc[0].dci_length = sizeof_DCI1_5MHz_FDD_t;
|
||||
memcpy(&dci_alloc[0].dci_pdu[0],&DLSCH_alloc_pdu,sizeof(DCI1_5MHz_FDD_t));
|
||||
dci_alloc[0].L = 2;
|
||||
dci_alloc[0].rnti = n_rnti;
|
||||
dci_alloc[0].format = format1;
|
||||
dci_alloc[0].L = 2;
|
||||
dci_alloc[0].rnti = n_rnti;
|
||||
dci_alloc[0].format = format1;
|
||||
dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
} else {
|
||||
((DCI1E_5MHz_2A_M10PRB_TDD_t*)&DLSCH_alloc_pdu)->rah = 0;
|
||||
((DCI1E_5MHz_2A_M10PRB_TDD_t*)&DLSCH_alloc_pdu)->rballoc = DLSCH_RB_ALLOC;
|
||||
@@ -1117,15 +1118,15 @@ int main(int argc, char **argv)
|
||||
((DCI1E_5MHz_2A_M10PRB_TDD_t*)&DLSCH_alloc_pdu)->rv = 0;
|
||||
((DCI1E_5MHz_2A_M10PRB_TDD_t*)&DLSCH_alloc_pdu)->tpmi = (transmission_mode>=5 ? 5 : 0); // precoding
|
||||
((DCI1E_5MHz_2A_M10PRB_TDD_t*)&DLSCH_alloc_pdu)->dl_power_off = (transmission_mode==5 ? 0 : 1);
|
||||
dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
|
||||
memcpy(&dci_alloc[0].dci_pdu[0],&DLSCH_alloc_pdu,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
|
||||
dci_alloc[0].L = 2;
|
||||
dci_alloc[0].rnti = n_rnti;
|
||||
dci_alloc[0].format = format1E_2A_M10PRB;
|
||||
dci_alloc[0].L = 2;
|
||||
dci_alloc[0].rnti = n_rnti;
|
||||
dci_alloc[0].format = format1E_2A_M10PRB;
|
||||
dci_alloc[0].search_space = DCI_UE_SPACE;
|
||||
}
|
||||
|
||||
num_pdcch_symbols = generate_dci_top(1,
|
||||
0,
|
||||
dci_alloc,
|
||||
0,
|
||||
AMP,
|
||||
@@ -1134,7 +1135,6 @@ int main(int argc, char **argv)
|
||||
subframe);
|
||||
/*
|
||||
num_pdcch_symbols = generate_dci_top(1,
|
||||
0,
|
||||
dci_alloc,
|
||||
0,
|
||||
AMP,
|
||||
|
||||
@@ -175,7 +175,7 @@ int main(int argc, char **argv)
|
||||
|
||||
int aarx,aatx;
|
||||
double channelx,channely;
|
||||
double sigma2, sigma2_dB=10,SNR,SNR2,snr0=-2.0,snr1,SNRmeas,rate,saving_bler=0;
|
||||
double sigma2, sigma2_dB=10,SNR,SNR2=0,snr0=-2.0,snr1,SNRmeas,rate,saving_bler=0;
|
||||
double input_snr_step=.2,snr_int=30;
|
||||
double blerr;
|
||||
|
||||
|
||||
@@ -257,8 +257,7 @@ typedef struct {
|
||||
|
||||
/*!\brief DCI PDU filled by MAC for the PHY */
|
||||
typedef struct {
|
||||
uint8_t Num_ue_spec_dci ;
|
||||
uint8_t Num_common_dci ;
|
||||
int Num_dci;
|
||||
// uint32_t nCCE;
|
||||
uint32_t num_pdcch_symbols;
|
||||
DCI_ALLOC_t dci_alloc[NUM_DCI_MAX] ;
|
||||
|
||||
@@ -125,8 +125,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
|
||||
// clear DCI and BCCH contents before scheduling
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
DCI_pdu[CC_id]->Num_common_dci = 0;
|
||||
DCI_pdu[CC_id]->Num_ue_spec_dci = 0;
|
||||
DCI_pdu[CC_id]->Num_dci = 0;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].mcch_active =0;
|
||||
#endif
|
||||
@@ -172,7 +171,11 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
else {
|
||||
// check uplink failure
|
||||
if ((UE_list->UE_sched_ctrl[i].ul_failure_timer>0)&&
|
||||
(UE_list->UE_sched_ctrl[i].ul_out_of_sync==0)) {
|
||||
(UE_list->UE_sched_ctrl[i].ul_out_of_sync==0) &&
|
||||
/* do nothing if CCE allocation is impossible */
|
||||
!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,
|
||||
get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->DL_cqi[0],format1A),
|
||||
rnti)) {
|
||||
LOG_D(MAC,"UE %d rnti %x: UL Failure timer %d \n",i,rnti,UE_list->UE_sched_ctrl[i].ul_failure_timer);
|
||||
if (UE_list->UE_sched_ctrl[i].ra_pdcch_order_sent==0) {
|
||||
UE_list->UE_sched_ctrl[i].ra_pdcch_order_sent=1;
|
||||
@@ -1098,17 +1101,17 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
/*
|
||||
int dummy=0;
|
||||
for (i=0;
|
||||
i<DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci;
|
||||
i<DCI_pdu[CC_id]->Num_dci;
|
||||
i++)
|
||||
if (DCI_pdu[CC_id]->dci_alloc[i].rnti==2)
|
||||
dummy=1;
|
||||
|
||||
if (dummy==1)
|
||||
for (i=0;
|
||||
i<DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci;
|
||||
i<DCI_pdu[CC_id]->Num_dci;
|
||||
i++)
|
||||
LOG_I(MAC,"Frame %d, subframe %d: DCI %d/%d, format %d, rnti %x, NCCE %d(num_pdcch_symb %d)\n",
|
||||
frameP,subframeP,i,DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci,
|
||||
frameP,subframeP,i,DCI_pdu[CC_id]->Num_dci,
|
||||
DCI_pdu[CC_id]->dci_alloc[i].format,
|
||||
DCI_pdu[CC_id]->dci_alloc[i].rnti,
|
||||
DCI_pdu[CC_id]->dci_alloc[i].firstCCE,
|
||||
|
||||
@@ -2016,7 +2016,7 @@ update_ul_dci(
|
||||
DCI0_5MHz_TDD_1_6_t *ULSCH_dci = NULL;;
|
||||
|
||||
if (mac_xface->frame_parms->frame_type == TDD) {
|
||||
for (i=0; i<DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci; i++) {
|
||||
for (i=0; i<DCI_pdu->Num_dci; i++) {
|
||||
ULSCH_dci = (DCI0_5MHz_TDD_1_6_t *)DCI_pdu->dci_alloc[i].dci_pdu;
|
||||
|
||||
if ((DCI_pdu->dci_alloc[i].format == format0) && (DCI_pdu->dci_alloc[i].rnti == rnti)) {
|
||||
|
||||
@@ -645,30 +645,34 @@ void add_common_dci(DCI_PDU *DCI_pdu,
|
||||
unsigned char dci_fmt,
|
||||
uint8_t ra_flag)
|
||||
{
|
||||
if (DCI_pdu->Num_dci == NUM_DCI_MAX) { printf("%s: DCI FULL, fatal!\n", __FUNCTION__); abort(); }
|
||||
|
||||
memcpy(&DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci].dci_pdu[0],pdu,dci_size_bytes);
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci].dci_length = dci_size_bits;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci].L = aggregation;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci].rnti = rnti;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci].format = dci_fmt;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci].ra_flag = ra_flag;
|
||||
memcpy(&DCI_pdu->dci_alloc[DCI_pdu->Num_dci].dci_pdu[0],pdu,dci_size_bytes);
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].dci_length = dci_size_bits;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].L = aggregation;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].rnti = rnti;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].format = dci_fmt;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].ra_flag = ra_flag;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].search_space = DCI_COMMON_SPACE;
|
||||
|
||||
|
||||
DCI_pdu->Num_common_dci++;
|
||||
DCI_pdu->Num_dci++;
|
||||
LOG_D(MAC,"add common dci format %d for rnti %x \n",dci_fmt,rnti);
|
||||
}
|
||||
|
||||
void add_ue_spec_dci(DCI_PDU *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt,uint8_t ra_flag)
|
||||
{
|
||||
if (DCI_pdu->Num_dci == NUM_DCI_MAX) { printf("%s: DCI FULL, fatal!\n", __FUNCTION__); abort(); }
|
||||
|
||||
memcpy(&DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci].dci_pdu[0],pdu,dci_size_bytes);
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci].dci_length = dci_size_bits;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci].L = aggregation;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci].rnti = rnti;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci].format = dci_fmt;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci].ra_flag = ra_flag;
|
||||
memcpy(&DCI_pdu->dci_alloc[DCI_pdu->Num_dci].dci_pdu[0],pdu,dci_size_bytes);
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].dci_length = dci_size_bits;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].L = aggregation;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].rnti = rnti;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].format = dci_fmt;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].ra_flag = ra_flag;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].search_space = DCI_UE_SPACE;
|
||||
|
||||
DCI_pdu->Num_ue_spec_dci++;
|
||||
DCI_pdu->Num_dci++;
|
||||
|
||||
LOG_D(MAC,"add ue specific dci format %d for rnti %x \n",dci_fmt,rnti);
|
||||
}
|
||||
@@ -1065,18 +1069,17 @@ int allocate_CCEs(int module_idP,
|
||||
DCI_ALLOC_t *dci_alloc;
|
||||
int nCCE=0;
|
||||
|
||||
LOG_D(MAC,"Allocate CCEs subframe %d, test %d : (common %d,uspec %d)\n",subframeP,test_onlyP,DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
|
||||
LOG_D(MAC,"Allocate CCEs subframe %d, test %d : (Num_dci %d)\n",subframeP,test_onlyP,DCI_pdu->Num_dci);
|
||||
DCI_pdu->num_pdcch_symbols=1;
|
||||
|
||||
try_again:
|
||||
init_CCE_table(module_idP,CC_idP);
|
||||
nCCE=0;
|
||||
|
||||
for (i=0;i<DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci;i++) {
|
||||
for (i=0;i<DCI_pdu->Num_dci;i++) {
|
||||
dci_alloc = &DCI_pdu->dci_alloc[i];
|
||||
LOG_D(MAC,"Trying to allocate DCI %d/%d (%d,%d) : rnti %x, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n",
|
||||
i,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci,
|
||||
DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci,
|
||||
LOG_D(MAC,"Trying to allocate DCI %d/%d : rnti %x, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n",
|
||||
i,DCI_pdu->Num_dci,
|
||||
dci_alloc->rnti,1<<dci_alloc->L,
|
||||
nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols);
|
||||
|
||||
@@ -1087,7 +1090,7 @@ try_again:
|
||||
fCCE = get_nCCE_offset(CCE_table,
|
||||
1<<(dci_alloc->L),
|
||||
nCCE_max,
|
||||
(i<DCI_pdu->Num_common_dci) ? 1 : 0,
|
||||
dci_alloc->search_space == DCI_COMMON_SPACE ? 1 : 0,
|
||||
dci_alloc->rnti,
|
||||
subframeP);
|
||||
if (fCCE == -1) {
|
||||
@@ -1095,11 +1098,10 @@ failed:
|
||||
if (DCI_pdu->num_pdcch_symbols == 3) {
|
||||
LOG_I(MAC,"subframe %d: Dropping Allocation for RNTI %x (DCI %d/%d)\n",
|
||||
subframeP,dci_alloc->rnti,
|
||||
i, DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci);
|
||||
i, DCI_pdu->Num_dci);
|
||||
for (j=0;j<=i;j++){
|
||||
LOG_I(MAC,"DCI %d/%d (%d,%d) : rnti %x dci format %d, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n",
|
||||
j,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci,
|
||||
DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci,
|
||||
LOG_I(MAC,"DCI %d/%d : rnti %x dci format %d, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n",
|
||||
j,DCI_pdu->Num_dci,
|
||||
DCI_pdu->dci_alloc[j].rnti,DCI_pdu->dci_alloc[j].format,
|
||||
1<<DCI_pdu->dci_alloc[j].L,
|
||||
nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols);
|
||||
@@ -1128,37 +1130,29 @@ fatal:
|
||||
}
|
||||
|
||||
boolean_t CCE_allocation_infeasible(int module_idP,
|
||||
int CC_idP,
|
||||
int common_flag,
|
||||
int subframe,
|
||||
int aggregation,
|
||||
int rnti) {
|
||||
|
||||
|
||||
int CC_idP,
|
||||
int common_flag,
|
||||
int subframe,
|
||||
int aggregation,
|
||||
int rnti)
|
||||
{
|
||||
DCI_PDU *DCI_pdu = &eNB_mac_inst[module_idP].common_channels[CC_idP].DCI_pdu;
|
||||
//DCI_ALLOC_t *dci_alloc;
|
||||
int ret;
|
||||
boolean_t res=FALSE;
|
||||
|
||||
if (common_flag==1) {
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci].rnti = rnti;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci].L = aggregation;
|
||||
DCI_pdu->Num_common_dci++;
|
||||
ret = allocate_CCEs(module_idP,CC_idP,subframe,1);
|
||||
if (ret==-1)
|
||||
res = TRUE;
|
||||
DCI_pdu->Num_common_dci--;
|
||||
}
|
||||
else {
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci].rnti = rnti;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci].L = aggregation;
|
||||
DCI_pdu->Num_ue_spec_dci++;
|
||||
ret = allocate_CCEs(module_idP,CC_idP,subframe,1);
|
||||
if (ret==-1)
|
||||
res = TRUE;
|
||||
DCI_pdu->Num_ue_spec_dci--;
|
||||
}
|
||||
return(res);
|
||||
if (DCI_pdu->Num_dci == NUM_DCI_MAX) return TRUE;
|
||||
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].rnti = rnti;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].L = aggregation;
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].search_space = common_flag == 1 ? DCI_COMMON_SPACE : DCI_UE_SPACE;
|
||||
DCI_pdu->Num_dci++;
|
||||
ret = allocate_CCEs(module_idP,CC_idP,subframe,1);
|
||||
if (ret==-1)
|
||||
res = TRUE;
|
||||
DCI_pdu->Num_dci--;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, rnti_t rntiP, sub_frame_t subframeP)
|
||||
|
||||
@@ -1142,7 +1142,7 @@ abort();
|
||||
|
||||
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n", module_idP,CC_id,frameP,subframeP,UE_id);
|
||||
#ifdef DEBUG
|
||||
dump_dci(frame_parms, &DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci-1]);
|
||||
dump_dci(frame_parms, &DCI_pdu->dci_alloc[DCI_pdu->Num_dci-1]);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -206,23 +206,28 @@ boolean_t rlc_am_nack_pdu (
|
||||
void rlc_am_ack_pdu (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
const rlc_sn_t snP)
|
||||
const rlc_sn_t snP,
|
||||
boolean_t free_pdu)
|
||||
{
|
||||
mem_block_t* mb_p = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].mem_block;
|
||||
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
|
||||
|
||||
tx_data_pdu_buffer->flags.retransmit = 0;
|
||||
|
||||
if ((tx_data_pdu_buffer->flags.ack == 0) && (mb_p != NULL)) {
|
||||
//if (mb_pP != NULL) {
|
||||
if (mb_p != NULL) {
|
||||
if (free_pdu) {
|
||||
free_mem_block(mb_p, __func__);
|
||||
tx_data_pdu_buffer->mem_block = NULL;
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[ACK-PDU] ACK PDU SN %05d previous retx_count %d \n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
tx_data_pdu_buffer->retx_count);
|
||||
}
|
||||
|
||||
if (tx_data_pdu_buffer->retx_payload_size) {
|
||||
AssertFatal (tx_data_pdu_buffer->flags.ack == 0,
|
||||
"RLC AM Rx Status Report sn=%d acked twice but is pending for Retx vtA=%d vtS=%d LcId=%d\n",
|
||||
snP, rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
rlc_pP->retrans_num_bytes_to_retransmit -= tx_data_pdu_buffer->retx_payload_size;
|
||||
tx_data_pdu_buffer->retx_payload_size = 0;
|
||||
tx_data_pdu_buffer->num_holes = 0;
|
||||
|
||||
@@ -74,12 +74,14 @@ protected_rlc_am_retransmit(boolean_t rlc_am_nack_pdu (
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \param[in] snP Sequence number of the PDU that is acknowledged.
|
||||
* \param[in] free_pdu Boolean indicating that the PDU can be freed because smaller than new vtA.
|
||||
* \note Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU.
|
||||
*/
|
||||
protected_rlc_am_retransmit(void rlc_am_ack_pdu (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP);)
|
||||
const rlc_sn_t snP,
|
||||
boolean_t free_pdu);)
|
||||
|
||||
/*! \fn mem_block_t* rlc_am_retransmit_get_copy (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, rlc_sn_t snP)
|
||||
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
||||
|
||||
@@ -318,7 +318,7 @@ rlc_am_receive_process_control_pdu(
|
||||
{
|
||||
if (rlc_pP->control_pdu_info.num_nack == 0) {
|
||||
while (sn_cursor != ack_sn) {
|
||||
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor);
|
||||
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE);
|
||||
sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ rlc_am_receive_process_control_pdu(
|
||||
prev_nack_sn = 0x3FFF;
|
||||
|
||||
while (sn_cursor != nack_sn) {
|
||||
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor);
|
||||
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE);
|
||||
sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
|
||||
}
|
||||
|
||||
@@ -354,7 +354,8 @@ rlc_am_receive_process_control_pdu(
|
||||
if (sn_cursor != nack_sn) {
|
||||
rlc_am_ack_pdu(ctxt_pP,
|
||||
rlc_pP,
|
||||
sn_cursor);
|
||||
sn_cursor,
|
||||
FALSE);
|
||||
} else {
|
||||
status = rlc_am_nack_pdu (ctxt_pP,
|
||||
rlc_pP,
|
||||
|
||||
@@ -88,8 +88,8 @@ rlc_am_check_timer_poll_retransmit(
|
||||
/* Look for the first retransmittable PDU starting from vtS - 1 */
|
||||
while (sn != sn_end) {
|
||||
tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[sn % RLC_AM_WINDOW_SIZE];
|
||||
AssertFatal (tx_data_pdu_buffer_p->mem_block != NULL, "RLC AM Tpoll Retx expiry sn=%d is empty vtA=%d vtS=%d LcId=%d\n",
|
||||
sn, rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
AssertFatal (tx_data_pdu_buffer_p->mem_block != NULL, "RLC AM Tpoll Retx expiry sn=%d ack=%d is empty vtA=%d vtS=%d LcId=%d\n",
|
||||
sn, tx_data_pdu_buffer_p->flags.ack,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
if ((tx_data_pdu_buffer_p->flags.ack == 0) && (tx_data_pdu_buffer_p->flags.max_retransmit == 0)) {
|
||||
tx_data_pdu_buffer_p->flags.retransmit = 1;
|
||||
tx_data_pdu_buffer_p->retx_payload_size = tx_data_pdu_buffer_p->payload_size;
|
||||
|
||||
@@ -6,6 +6,9 @@ typedef struct threads_s {
|
||||
int one;
|
||||
int two;
|
||||
int three;
|
||||
int slot1_proc_one;
|
||||
int slot1_proc_two;
|
||||
int slot1_proc_three;
|
||||
} threads_t;
|
||||
|
||||
#endif /* _THREADS_T_H_ */
|
||||
|
||||
@@ -150,6 +150,9 @@ int chain_offset=0;
|
||||
int phy_test = 0;
|
||||
uint8_t usim_test = 0;
|
||||
|
||||
uint8_t dci_Format = 0;
|
||||
uint8_t agregation_Level =0xFF;
|
||||
|
||||
uint8_t nb_antenna_tx = 1;
|
||||
uint8_t nb_antenna_rx = 1;
|
||||
|
||||
@@ -222,7 +225,7 @@ double cpuf;
|
||||
char uecap_xer[1024],uecap_xer_in=0;
|
||||
|
||||
int oaisim_flag=0;
|
||||
threads_t threads= {-1,-1,-1,-1};
|
||||
threads_t threads= {-1,-1,-1,-1,-1,-1,-1};
|
||||
|
||||
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
|
||||
* this is very hackish - find a proper solution
|
||||
@@ -329,6 +332,8 @@ void help (void) {
|
||||
printf(" --external-clock tells hardware to use an external clock reference\n");
|
||||
printf(" --usim-test use XOR autentication algo in case of test usim mode\n");
|
||||
printf(" --single-thread-disable. Disables single-thread mode in lte-softmodem\n");
|
||||
printf(" --AgregationLevel Choose the agregation level used by tghe eNB for the OAI use 1, it will save some time of processing the pdcch\n");
|
||||
printf(" --DCIformat choose the DCI format, be careful when using this option(for the moment only valid for SISO DCI format 1)\n");
|
||||
printf(" -A Set timing_advance\n");
|
||||
printf(" -C Set the downlink frequency for all component carriers\n");
|
||||
printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n");
|
||||
@@ -640,6 +645,11 @@ static void get_options (int argc, char **argv) {
|
||||
LONG_OPTION_THREADONESUBFRAME,
|
||||
LONG_OPTION_THREADTWOSUBFRAME,
|
||||
LONG_OPTION_THREADTHREESUBFRAME,
|
||||
LONG_OPTION_THREADSLOT1PROCONE,
|
||||
LONG_OPTION_THREADSLOT1PROCTWO,
|
||||
LONG_OPTION_THREADSLOT1PROCTHREE,
|
||||
LONG_OPTION_DCIFORMAT,
|
||||
LONG_OPTION_AGREGATIONLEVEL,
|
||||
LONG_OPTION_DEMOD_SHIFT,
|
||||
#if T_TRACER
|
||||
LONG_OPTION_T_PORT,
|
||||
@@ -677,6 +687,11 @@ static void get_options (int argc, char **argv) {
|
||||
{"threadOneSubframe", required_argument, NULL, LONG_OPTION_THREADONESUBFRAME},
|
||||
{"threadTwoSubframe", required_argument, NULL, LONG_OPTION_THREADTWOSUBFRAME},
|
||||
{"threadThreeSubframe", required_argument, NULL, LONG_OPTION_THREADTHREESUBFRAME},
|
||||
{"threadSlot1ProcOne", required_argument, NULL, LONG_OPTION_THREADSLOT1PROCONE},
|
||||
{"threadSlot1ProcTwo", required_argument, NULL, LONG_OPTION_THREADSLOT1PROCTWO},
|
||||
{"threadSlot1ProcThree", required_argument, NULL, LONG_OPTION_THREADSLOT1PROCTHREE},
|
||||
{"DCIformat", required_argument, NULL, LONG_OPTION_DCIFORMAT},
|
||||
{"AgregationLevel", required_argument, NULL, LONG_OPTION_AGREGATIONLEVEL},
|
||||
{"dlsch-demod-shift", required_argument, NULL, LONG_OPTION_DEMOD_SHIFT},
|
||||
#if T_TRACER
|
||||
{"T_port", required_argument, 0, LONG_OPTION_T_PORT},
|
||||
@@ -811,6 +826,21 @@ static void get_options (int argc, char **argv) {
|
||||
case LONG_OPTION_THREADTHREESUBFRAME:
|
||||
threads.three=atoi(optarg);
|
||||
break;
|
||||
case LONG_OPTION_THREADSLOT1PROCONE:
|
||||
threads.slot1_proc_one=atoi(optarg);
|
||||
break;
|
||||
case LONG_OPTION_THREADSLOT1PROCTWO:
|
||||
threads.slot1_proc_two=atoi(optarg);
|
||||
break;
|
||||
case LONG_OPTION_THREADSLOT1PROCTHREE:
|
||||
threads.slot1_proc_three=atoi(optarg);
|
||||
break;
|
||||
case LONG_OPTION_DCIFORMAT:
|
||||
dci_Format = atoi(optarg);
|
||||
break;
|
||||
case LONG_OPTION_AGREGATIONLEVEL:
|
||||
agregation_Level = atoi(optarg);
|
||||
break;
|
||||
case LONG_OPTION_DEMOD_SHIFT: {
|
||||
extern int16_t dlsch_demod_shift;
|
||||
dlsch_demod_shift = atof(optarg);
|
||||
@@ -1560,6 +1590,7 @@ int main( int argc, char **argv ) {
|
||||
NB_UE_INST=1;
|
||||
NB_INST=1;
|
||||
|
||||
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**));
|
||||
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
|
||||
|
||||
@@ -1591,6 +1622,11 @@ int main( int argc, char **argv ) {
|
||||
UE[CC_id]->mode = mode;
|
||||
printf("UE[%d]->mode = %d\n",CC_id,mode);
|
||||
|
||||
for (uint8_t i=0; i<RX_NB_TH_MAX; i++) {
|
||||
UE[CC_id]->pdcch_vars[i][0]->agregationLevel = agregation_Level;
|
||||
UE[CC_id]->pdcch_vars[i][0]->dciFormat = dci_Format;
|
||||
}
|
||||
|
||||
compute_prach_seq(&UE[CC_id]->frame_parms.prach_config_common,
|
||||
UE[CC_id]->frame_parms.frame_type,
|
||||
UE[CC_id]->X_u);
|
||||
|
||||
@@ -81,6 +81,7 @@ extern void kill_eNB_proc(int inst);
|
||||
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
||||
extern void fill_ue_band_info(void);
|
||||
extern void init_UE(int);
|
||||
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char * name);
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
|
||||
|
||||
+40
-12
@@ -476,15 +476,6 @@ static void *UE_thread_synch(void *arg) {
|
||||
return &UE_thread_synch_retval;
|
||||
}
|
||||
|
||||
|
||||
/* this structure is used to pass both UE phy vars and
|
||||
* proc to the function UE_thread_rxn_txnp4
|
||||
*/
|
||||
struct rx_tx_thread_data {
|
||||
PHY_VARS_UE *UE;
|
||||
UE_rxtx_proc_t *proc;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief This is the UE thread for RX subframe n and TX subframe n+4.
|
||||
* This thread performs the phy_procedures_UE_RX() on every received slot.
|
||||
@@ -507,12 +498,13 @@ static void *UE_thread_rxn_txnp4(void *arg) {
|
||||
sprintf(threadname,"UE_%d_proc_%d", UE->Mod_id, proc->sub_frame_start);
|
||||
cpu_set_t cpuset;
|
||||
CPU_ZERO(&cpuset);
|
||||
|
||||
if ( (proc->sub_frame_start+1)%RX_NB_TH == 0 && threads.one != -1 )
|
||||
CPU_SET(threads.one, &cpuset);
|
||||
if ( (proc->sub_frame_start+1)%RX_NB_TH == 1 && threads.two != -1 )
|
||||
CPU_SET(threads.two, &cpuset);
|
||||
if ( (proc->sub_frame_start+1)%RX_NB_TH == 2 && threads.three != -1 )
|
||||
CPU_SET(threads.three, &cpuset);
|
||||
CPU_SET(threads.three, &cpuset);
|
||||
//CPU_SET(threads.three, &cpuset);
|
||||
init_thread(900000,1000000 , FIFO_PRIORITY-1, &cpuset,
|
||||
threadname);
|
||||
@@ -558,7 +550,11 @@ static void *UE_thread_rxn_txnp4(void *arg) {
|
||||
(sf_type==SF_UL? "SF_UL" :
|
||||
(sf_type==SF_S ? "SF_S" : "UNKNOWN_SF_TYPE"))));
|
||||
}
|
||||
#ifdef UE_SLOT_PARALLELISATION
|
||||
phy_procedures_slot_parallelization_UE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL );
|
||||
#else
|
||||
phy_procedures_UE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL );
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
@@ -649,6 +645,8 @@ void *UE_thread(void *arg) {
|
||||
char threadname[128];
|
||||
int th_id;
|
||||
|
||||
static uint8_t thread_idx = 0;
|
||||
|
||||
cpu_set_t cpuset;
|
||||
CPU_ZERO(&cpuset);
|
||||
if ( threads.iq != -1 )
|
||||
@@ -700,6 +698,10 @@ void *UE_thread(void *arg) {
|
||||
}
|
||||
AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), "");
|
||||
} else {
|
||||
#if OAISIM
|
||||
(void)dummy_rx; /* avoid gcc warnings */
|
||||
usleep(500);
|
||||
#else
|
||||
// grab 10 ms of signal into dummy buffer
|
||||
if (UE->mode != loop_through_memory) {
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
|
||||
@@ -712,6 +714,7 @@ void *UE_thread(void *arg) {
|
||||
UE->frame_parms.samples_per_tti,
|
||||
UE->frame_parms.nb_antennas_rx);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // UE->is_synchronized==0
|
||||
@@ -729,6 +732,7 @@ void *UE_thread(void *arg) {
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
}
|
||||
UE->rx_offset=0;
|
||||
UE->time_sync_cell=0;
|
||||
//UE->proc.proc_rxtx[0].frame_rx++;
|
||||
//UE->proc.proc_rxtx[1].frame_rx++;
|
||||
for (th_id=0; th_id < RX_NB_TH; th_id++) {
|
||||
@@ -750,7 +754,16 @@ void *UE_thread(void *arg) {
|
||||
} else {
|
||||
sub_frame++;
|
||||
sub_frame%=10;
|
||||
UE_rxtx_proc_t *proc = &UE->proc.proc_rxtx[sub_frame%RX_NB_TH];
|
||||
UE_rxtx_proc_t *proc = &UE->proc.proc_rxtx[thread_idx];
|
||||
// update thread index for received subframe
|
||||
UE->current_thread_id[sub_frame] = thread_idx;
|
||||
|
||||
LOG_D(PHY,"Process Subframe %d thread Idx %d \n", sub_frame, UE->current_thread_id[sub_frame]);
|
||||
|
||||
thread_idx++;
|
||||
if(thread_idx>=RX_NB_TH)
|
||||
thread_idx = 0;
|
||||
|
||||
|
||||
if (UE->mode != loop_through_memory) {
|
||||
for (i=0; i<UE->frame_parms.nb_antennas_rx; i++)
|
||||
@@ -836,6 +849,7 @@ void *UE_thread(void *arg) {
|
||||
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0;
|
||||
|
||||
proc->instance_cnt_rxtx++;
|
||||
LOG_D( PHY, "[SCHED][UE %d] UE RX instance_cnt_rxtx %d subframe %d !!\n", UE->Mod_id, proc->instance_cnt_rxtx,proc->subframe_rx);
|
||||
if (proc->instance_cnt_rxtx == 0) {
|
||||
if (pthread_cond_signal(&proc->cond_rxtx) != 0) {
|
||||
LOG_E( PHY, "[SCHED][UE %d] ERROR pthread_cond_signal for UE RX thread\n", UE->Mod_id);
|
||||
@@ -871,6 +885,10 @@ void *UE_thread(void *arg) {
|
||||
* - UE_thread_rxtx0
|
||||
* - UE_thread_rxtx1
|
||||
* - UE_thread_synch
|
||||
* - UE_thread_fep_slot0
|
||||
* - UE_thread_fep_slot1
|
||||
* - UE_thread_dlsch_proc_slot0
|
||||
* - UE_thread_dlsch_proc_slot1
|
||||
* and the locking between them.
|
||||
*/
|
||||
void init_UE_threads(PHY_VARS_UE *UE) {
|
||||
@@ -896,9 +914,19 @@ void init_UE_threads(PHY_VARS_UE *UE) {
|
||||
UE->proc.proc_rxtx[i].sub_frame_step=nb_threads;
|
||||
printf("Init_UE_threads rtd %d proc %d nb_threads %d i %d\n",rtd->proc->sub_frame_start, UE->proc.proc_rxtx[i].sub_frame_start,nb_threads, i);
|
||||
pthread_create(&UE->proc.proc_rxtx[i].pthread_rxtx, NULL, UE_thread_rxn_txnp4, rtd);
|
||||
|
||||
#ifdef UE_SLOT_PARALLELISATION
|
||||
//pthread_mutex_init(&UE->proc.proc_rxtx[i].mutex_slot0_dl_processing,NULL);
|
||||
//pthread_cond_init(&UE->proc.proc_rxtx[i].cond_slot0_dl_processing,NULL);
|
||||
//pthread_create(&UE->proc.proc_rxtx[i].pthread_slot0_dl_processing,NULL,UE_thread_slot0_dl_processing, rtd);
|
||||
|
||||
pthread_mutex_init(&UE->proc.proc_rxtx[i].mutex_slot1_dl_processing,NULL);
|
||||
pthread_cond_init(&UE->proc.proc_rxtx[i].cond_slot1_dl_processing,NULL);
|
||||
pthread_create(&UE->proc.proc_rxtx[i].pthread_slot1_dl_processing,NULL,UE_thread_slot1_dl_processing, rtd);
|
||||
#endif
|
||||
|
||||
}
|
||||
pthread_create(&UE->proc.pthread_synch,NULL,UE_thread_synch,(void*)UE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ extern LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
|
||||
double cpuf;
|
||||
#include "threads_t.h"
|
||||
threads_t threads= {-1,-1,-1};
|
||||
threads_t threads= {-1,-1,-1,-1,-1,-1,-1};
|
||||
|
||||
//#ifdef XFORMS
|
||||
int otg_enabled;
|
||||
@@ -1405,7 +1405,8 @@ reset_opp_meas_oaisim (void)
|
||||
reset_meas (&ul_chan_stats);
|
||||
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc[0]);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc[1]);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0]);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1]);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_tx);
|
||||
@@ -1574,7 +1575,9 @@ print_opp_meas_oaisim (void)
|
||||
}
|
||||
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc, "[UE][total_phy_proc]",
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc[0], "[UE][total_phy_proc[0]]",
|
||||
&oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc[1], "[UE][total_phy_proc[1]]",
|
||||
&oaisim_stats, &oaisim_stats_f);
|
||||
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0],
|
||||
|
||||
@@ -1431,6 +1431,11 @@ void init_openair1(void)
|
||||
PHY_vars_UE_g[UE_id][CC_id]->mac_enabled=1;
|
||||
|
||||
PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[0][0]->crnti = 0x1235 + UE_id;
|
||||
|
||||
for (uint8_t i=0; i<RX_NB_TH_MAX; i++) {
|
||||
PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[i][0]->dciFormat = 0;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[i][0]->agregationLevel = 0xFF;
|
||||
}
|
||||
PHY_vars_UE_g[UE_id][CC_id]->current_dlsch_cqi[0] = 10;
|
||||
|
||||
LOG_I(EMU, "UE %d mode is initialized to %d\n", UE_id, PHY_vars_UE_g[UE_id][CC_id]->UE_mode[0] );
|
||||
|
||||
Reference in New Issue
Block a user