Commit 212dff25 authored by Gabriel's avatar Gabriel

Merge remote-tracking branch 'origin/mimo_feature_ue_br' into develop_integration_w10

parents 5c375d3a 305ebf5c
......@@ -1034,6 +1034,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c
......
......@@ -948,6 +948,11 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
// fill cqi parameters for periodic CQI reporting
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;
}
void phy_config_cba_rnti (module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups)
......@@ -1306,6 +1311,10 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
ue->high_speed_flag = 1;
ue->ch_est_alpha = 24576;
// enable MIB/SIB decoding by default
ue->decode_MIB = 1;
ue->decode_SIB = 1;
init_prach_tables(839);
......
......@@ -51,10 +51,10 @@ 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[eNB_id];
LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[(Ns>>1)&0x1][eNB_id];
LTE_DL_UE_HARQ_t *dlsch0_harq;
harq_pid = dlsch_ue[0]->current_harq_pid;
harq_pid = dlsch_ue[0]->current_harq_pid;
dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) ||
......
This diff is collapsed.
This diff is collapsed.
......@@ -708,7 +708,7 @@ typedef struct {
int16_t sqrt_rho_a;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t sqrt_rho_b;
/// Current HARQ process id
/// Current HARQ process id threadRx Odd and threadRx Even
uint8_t current_harq_pid;
/// Current subband antenna selection
uint32_t antenna_alloc;
......
......@@ -38,6 +38,7 @@
#include "SIMULATION/TOOLS/defs.h"
//#define DEBUG_DLSCH_DECODING
extern double cpuf;
void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
{
......@@ -270,7 +271,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return(max_turbo_iterations);
}*/
/*harq_pid = dlsch->current_harq_pid;
/*harq_pid = dlsch->current_harq_pid[subframe&0x1];
if (harq_pid >= 8) {
printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid);
return(max_turbo_iterations);
......@@ -341,6 +342,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
printf("Segmentation: C %d, Cminus %d, Kminus %d, Kplus %d\n",harq_process->C,harq_process->Cminus,harq_process->Kminus,harq_process->Kplus);
#endif
opp_enabled=1;
for (r=0; r<harq_process->C; r++) {
......@@ -376,7 +379,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
(r==0) ? harq_process->F : 0);
#ifdef DEBUG_DLSCH_DECODING
LOG_I(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n",
LOG_D(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n",
harq_pid,r, G,
Kr*3,
harq_process->TBS,
......@@ -459,6 +462,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#if 1
if (err_flag == 0) {
LOG_D(PHY, "turbo algo Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d maxIter %d\n",
Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,
harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round,dlsch->max_turbo_iterations);
if (llr8_flag) {
AssertFatal (Kr >= 256, "turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d\n",
Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round);
......@@ -605,6 +612,13 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
stop_meas(dlsch_turbo_decoding_stats);
/*printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n",
harq_process->C,
r,
dlsch_rate_unmatching_stats->p_time/(cpuf*1000.0),
dlsch_deinterleaving_stats->p_time/(cpuf*1000.0),
dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0));*/
}
}
}
......@@ -636,25 +650,28 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process->round++;
if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS);
}
// printf("Rate: [UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
if (harq_process->round >= dlsch->Mdlharq) {
harq_process->status = SCH_IDLE;
harq_process->round = 0;
}
if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, pid status %d, round %d/Max %d, TBS %d)\n",
phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->status,harq_process->round,dlsch->Mdlharq,harq_process->TBS);
}
return((1+dlsch->max_turbo_iterations));
} else {
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, round %d, subframe %d)\n",
phy_vars_ue->Mod_id, frame_rx_prev, subframe_rx_prev, harq_pid, harq_process->round, subframe);
harq_process->status = SCH_IDLE;
harq_process->round = 0;
dlsch->harq_ack[subframe].ack = 1;
dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1;
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, pid status %d, round %d, subframe %d)\n",
phy_vars_ue->Mod_id, frame_rx_prev, subframe_rx_prev, harq_pid, harq_process->status, harq_process->round, subframe);
if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS);
......@@ -908,7 +925,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break;
case PDSCH: // TB0
dlsch_ue = phy_vars_ue->dlsch[eNB_id][0];
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0];
harq_pid = dlsch_ue->current_harq_pid;
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]);
DevAssert( ue_id != (uint32_t)-1 );
......@@ -954,7 +971,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break;
case PDSCH1: { // TB1
dlsch_ue = phy_vars_ue->dlsch[eNB_id][1];
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1];
harq_pid = dlsch_ue->current_harq_pid;
int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] );
DevAssert( UE_id != -1 );
......@@ -1008,7 +1025,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break;
default:
dlsch_ue = phy_vars_ue->dlsch[eNB_id][0];
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][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);
......
......@@ -8831,6 +8831,37 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
len = (nb_rb*12) - pbch_pss_sss_adjust;
}
#ifdef __AVX2__
// Round length up to multiple of 16 words
uint32_t len256i = ((len+16)>>4)*16;
int32_t *rxF_256i = (int32_t*) malloc16_clear(len256i*4);
int32_t *rxF_i_256i = (int32_t*) malloc16_clear(len256i*4);
int32_t *ch_mag_256i = (int32_t*) malloc16_clear(len256i*4);
int32_t *ch_mag_i_256i = (int32_t*) malloc16_clear(len256i*4);
int32_t *rho_256i = (int32_t*) malloc16_clear(len256i*4);
memcpy(rxF_256i, rxF, len*4);
memcpy(rxF_i_256i, rxF_i, len*4);
memcpy(ch_mag_256i, ch_mag, len*4);
memcpy(ch_mag_i_256i, ch_mag_i, len*4);
memcpy(rho_256i, rho, len*4);
qam64_qam64_avx2((int32_t *)rxF_256i,
(int32_t *)rxF_i_256i,
(int32_t *)ch_mag_256i,
(int32_t *)ch_mag_i_256i,
(int16_t *)llr16,
(int32_t *) rho_256i,
len);
free16(rxF_256i, sizeof(rxF_256i));
free16(rxF_i_256i, sizeof(rxF_i_256i));
free16(ch_mag_256i, sizeof(ch_mag_256i));
free16(ch_mag_i_256i, sizeof(ch_mag_i_256i));
free16(rho_256i, sizeof(rho_256i));
#else
qam64_qam64((short *)rxF,
(short *)rxF_i,
(short *)ch_mag,
......@@ -8838,6 +8869,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
(short *)llr16,
(short *)rho,
len);
#endif
llr16 += (6*len);
*llr16p = (short *)llr16;
......
This diff is collapsed.
......@@ -107,9 +107,9 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length
len += sprintf(&buffer[len], "[UE PROC] Po_PUCCH = %d dBm (Po_NOMINAL_PUCCH %d dBm, g_pucch %d dB)\n",
get_PL(ue->Mod_id,ue->CC_id,0)+
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
ue->dlsch[0][0]->g_pucch,
ue->dlsch[0][0][0]->g_pucch,
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
ue->dlsch[0][0]->g_pucch);
ue->dlsch[0][0][0]->g_pucch);
}
//for (eNB=0;eNB<NUMBER_OF_eNB_MAX;eNB++) {
for (eNB=0; eNB<1; eNB++) {
......@@ -482,24 +482,24 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length
len += sprintf(&buffer[len], "[UE PROC] Mode 6 Wideband CQI eNB %d : %d dB\n",eNB,ue->measurements.precoded_cqi_dB[eNB][0]);
for (harq_pid=0;harq_pid<8;harq_pid++) {
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0]->harq_processes[harq_pid]->mcs);
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][0]->harq_processes[harq_pid]->mcs);
for (round=0;round<8;round++)
len+=sprintf(&buffer[len],"%d/%d ",
ue->dlsch[0][0]->harq_processes[harq_pid]->errors[round],
ue->dlsch[0][0]->harq_processes[harq_pid]->trials[round]);
ue->dlsch[0][0][0]->harq_processes[harq_pid]->errors[round],
ue->dlsch[0][0][0]->harq_processes[harq_pid]->trials[round]);
len+=sprintf(&buffer[len],"\n");
}
if (ue->dlsch[0] && ue->dlsch[0][0] && ue->dlsch[0][1]) {
len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0]->pmi_alloc),ue->dlsch[0][0]);
if (ue->dlsch[0][0] && ue->dlsch[0][0][0] && ue->dlsch[0][0][1]) {
len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0][0]->pmi_alloc),ue->dlsch[0][0][0]);
len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0]->harq_processes[0]->dl_power_off);
len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0][0]->harq_processes[0]->dl_power_off);
for (harq_pid=0;harq_pid<8;harq_pid++) {
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][1]->harq_processes[0]->mcs);
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][1]->harq_processes[0]->mcs);
for (round=0;round<8;round++)
len+=sprintf(&buffer[len],"%d/%d ",
ue->dlsch[0][1]->harq_processes[harq_pid]->errors[round],
ue->dlsch[0][1]->harq_processes[harq_pid]->trials[round]);
ue->dlsch[0][0][1]->harq_processes[harq_pid]->errors[round],
ue->dlsch[0][0][1]->harq_processes[harq_pid]->trials[round]);
len+=sprintf(&buffer[len],"\n");
}
}
......
......@@ -704,6 +704,22 @@ void qam64_qam16(short *stream0_in,
short *rho01,
int length);
/** \brief This function computes the LLRs for ML (max-logsum approximation) dual-stream 64QAM/16QAM reception.
@param stream0_in Input from channel compensated (MR combined) stream 0
@param stream1_in Input from channel compensated (MR combined) stream 1
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param stream0_out Output from LLR unit for stream0
@param rho01 Cross-correlation between channels (MR combined)
@param length in complex channel outputs*/
void qam64_qam16_avx2(short *stream0_in,
short *stream1_in,
short *ch_mag,
short *ch_mag_i,
short *stream0_out,
short *rho01,
int length);
/** \brief This function perform LLR computation for dual-stream (64QAM/16QAM) transmission.
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
......@@ -746,6 +762,22 @@ void qam64_qam64(short *stream0_in,
short *rho01,
int length);
/** \brief This function computes the LLRs for ML (max-logsum approximation) dual-stream 64QAM/64QAM reception.
@param stream0_in Input from channel compensated (MR combined) stream 0
@param stream1_in Input from channel compensated (MR combined) stream 1
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param stream0_out Output from LLR unit for stream0
@param rho01 Cross-correlation between channels (MR combined)
@param length in complex channel outputs*/
void qam64_qam64_avx2(int32_t *stream0_in,
int32_t *stream1_in,
int32_t *ch_mag,
int32_t *ch_mag_i,
int16_t *stream0_out,
int32_t *rho01,
int length);
/** \brief This function perform LLR computation for dual-stream (64QAM/64QAM) transmission.
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
......
......@@ -233,7 +233,7 @@ uint32_t ulsch_encoding(uint8_t *a,
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
PHY_MEASUREMENTS *meas = &ue->measurements;
LTE_UE_ULSCH_t *ulsch=ue->ulsch[eNB_id];
LTE_UE_DLSCH_t **dlsch = ue->dlsch[eNB_id];
LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id];
uint16_t rnti = 0xffff;
if (!ulsch) {
......@@ -966,7 +966,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
{
LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
LTE_UE_DLSCH_t **dlsch = ue->dlsch[eNB_id];
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[eNB_id]->crnti;
......
......@@ -2066,7 +2066,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc,
// get local ue's ack
if ((UE_index >= oai_emulation.info.first_ue_local) ||(UE_index <(oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local))) {
get_ack(&eNB->frame_parms,
PHY_vars_UE_g[UE_id][CC_id]->dlsch[0][0]->harq_ack,
PHY_vars_UE_g[UE_id][CC_id]->dlsch[0][0][0]->harq_ack,
subframe,
eNB->ulsch[UE_index]->harq_processes[harq_pid]->o_ACK,0);
} else { // get remote UEs' ack
......
......@@ -7,6 +7,7 @@ PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_coding.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_modulation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_demodulation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_llr_computation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/power_control.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_decoding.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_scrambling.o
......
......@@ -510,16 +510,16 @@ 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[eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[eNB_id][0]->current_harq_pid;
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid;
if (harq_pid>=8)
return;
mcs = phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->mcs;
mcs = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs;
// Button 0
if(!phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
if(!phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
// we are in TM5
fl_show_object(form->button_0);
}
......@@ -530,12 +530,12 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) {
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) {
coded_bits_per_codeword = get_G(frame_parms,
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs),
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->Nl,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,
frame,
subframe,
......
......@@ -448,11 +448,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[eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[eNB_id][0]->current_harq_pid;
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid;
if (harq_pid>=8)
return;
mcs0 = phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->mcs;
mcs0 = phy_vars_ue->dlsch[subframe&0x1][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) {
......@@ -461,23 +461,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
*/
}
if (phy_vars_ue->dlsch[eNB_id][1]!=NULL) {
harq_pid = phy_vars_ue->dlsch[eNB_id][1]->current_harq_pid;
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]!=NULL) {
harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->current_harq_pid;
if (harq_pid>=8)
return;
mcs1 = phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->mcs;
mcs1 = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->mcs;
}
if (phy_vars_ue->pdcch_vars[eNB_id]!=NULL) {
num_pdcch_symbols = phy_vars_ue->pdcch_vars[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[eNB_id][0]!=NULL) {
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) {
mod0 = get_Qm(mcs0);
coded_bits_per_codeword0 = get_G(frame_parms,
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs0),
phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->Nl,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,
frame,
subframe,
......@@ -486,13 +486,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[eNB_id][1]!=NULL) {
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]!=NULL) {
mod1 = get_Qm(mcs1);
coded_bits_per_codeword1 = get_G(frame_parms,
phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs1),
phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->Nl,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,
frame,
subframe,
......
......@@ -706,7 +706,7 @@ typedef struct {
LTE_DL_FRAME_PARMS frame_parms_before_ho;
LTE_UE_COMMON common_vars;
LTE_UE_PDSCH *pdsch_vars[2][NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars[2][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];
LTE_UE_PDSCH *pdsch_vars_ra[NUMBER_OF_CONNECTED_eNB_MAX+1];
......@@ -715,7 +715,7 @@ typedef struct {
LTE_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PDCCH *pdcch_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch[NUMBER_OF_CONNECTED_eNB_MAX][2];
LTE_UE_DLSCH_t *dlsch[2][NUMBER_OF_CONNECTED_eNB_MAX][2]; // two RxTx Threads
LTE_UE_ULSCH_t *ulsch[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch_SI[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch_ra[NUMBER_OF_CONNECTED_eNB_MAX];
......@@ -802,6 +802,8 @@ typedef struct {
uint8_t prach_cnt;
uint8_t prach_PreambleIndex;
// uint8_t prach_timer;
uint8_t decode_SIB;
uint8_t decode_MIB;
int rx_offset; /// Timing offset
int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
int timing_advance; ///timing advance signalled from eNB
......@@ -872,7 +874,7 @@ typedef struct {
time_stats_t phy_proc;
time_stats_t phy_proc_tx;
time_stats_t phy_proc_rx;
time_stats_t phy_proc_rx[2];
uint32_t use_ia_receiver;
......@@ -885,6 +887,10 @@ typedef struct {
time_stats_t ulsch_interleaving_stats;
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 ofdm_demod_stats;
time_stats_t dlsch_rx_pdcch_stats;
time_stats_t rx_dft_stats;
......
This diff is collapsed.
......@@ -51,7 +51,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[eNB_id][0]->g_pucch;
ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch;
switch (pucch_fmt) {
case pucch_format1:
......@@ -90,19 +90,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[eNB_id][0]->rnti,proc->frame_tx%1024,subframe,
ue->dlsch[proc->subframe_rx&0x1][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[eNB_id][0]->g_pucch);
ue->dlsch[proc->subframe_rx&0x1][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[eNB_id][0]->rnti,proc->frame_tx%1024,subframe,
ue->dlsch[proc->subframe_rx&0x1][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[eNB_id][0]->g_pucch);
ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch);
}
return(Po_PUCCH);
......
# List of known PLMNS
PLMN: {
PLMN0: {
FULLNAME="Test network";
SHORTNAME="OAI4G";
MNC="01";
MCC="001";
};
PLMN1: {
FULLNAME="SFR France";
SHORTNAME="SFR";
MNC="10";
MCC="208";
};
PLMN2: {
FULLNAME="SFR France";
SHORTNAME="SFR";
MNC="11";
MCC="208";
};
PLMN3: {
FULLNAME="SFR France";
SHORTNAME="SFR";
MNC="13";
MCC="208";
};
PLMN4: {
FULLNAME="OAI LTEBOX";
SHORTNAME="OAIALU";
MNC="93";
MCC="208";
};
PLMN5: {
FULLNAME="T-Mobile USA";
SHORTNAME="T-Mobile";
MNC="280";
MCC="310";
};
PLMN6: {
FULLNAME="FICTITIOUS USA";
SHORTNAME="FICTITIO";
MNC="028";
MCC="310";
};
PLMN7: {
FULLNAME="Vodafone Italia";
SHORTNAME="VODAFONE";
MNC="10";
MCC="222";
};
PLMN8: {
FULLNAME="Vodafone Spain";
SHORTNAME="VODAFONE";
MNC="01";
MCC="214";
};
PLMN9: {
FULLNAME="Vodafone Spain";
SHORTNAME="VODAFONE";
MNC="06";
MCC="214";
};
PLMN10: {
FULLNAME="Vodafone Germ";
SHORTNAME="VODAFONE";
MNC="02";
MCC="262";
};
PLMN11: {
FULLNAME="Vodafone Germ";
SHORTNAME="VODAFONE";
MNC="04";
MCC="262";
};
};
UE0:
{
USER: {
IMEI="356113022094149";
MANUFACTURER="EURECOM";
MODEL="LTE Android PC";
PIN="0000";
};
SIM: {
MSIN="000001234";
USIM_API_K="000102030405060708090A0B0C0D0E0F";
OPC="C42449363BBAD02B66D16BC975D77CC1";
MSISDN="000000000000";//"33611123456";
};
# Home PLMN Selector with Access Technology
HPLMN= "00101";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
# Operator PLMN List
OPLMN_LIST = ("00101", "20810", "20811", "20813", "20893", "310280", "310028");
# Operator controlled PLMN Selector with Access Technology
OCPLMN_LIST = ("22210", "21401", "21406", "26202", "26204");
# Forbidden plmns
FPLMN_LIST = ();
# List of Equivalent HPLMNs
#TODO: UE does not connect if set, to be fixed in the UE
# EHPLMN_LIST= ("20811", "20813");
EHPLMN_LIST= ();
};
......@@ -151,6 +151,8 @@ uint8_t usim_test = 0;
uint8_t nb_antenna_tx = 1;
uint8_t nb_antenna_rx = 1;
int16_t dlsch_demod_shift = 0;
char ref[128] = "internal";
char channels[128] = "0";
......@@ -635,6 +637,7 @@ static void get_options (int argc, char **argv) {
LONG_OPTION_THREADIQ,
LONG_OPTION_THREADODDSUBFRAME,
LONG_OPTION_THREADEVENSUBFRAME,
LONG_OPTION_DEMOD_SHIFT,
#if T_TRACER
LONG_OPTION_T_PORT,
LONG_OPTION_T_NOWAIT,
......@@ -670,6 +673,7 @@ static void get_options (int argc, char **argv) {
{"threadIQ", required_argument, NULL, LONG_OPTION_THREADIQ},
{"threadOddSubframe", required_argument, NULL, LONG_OPTION_THREADODDSUBFRAME},
{"threadEvenSubframe", required_argument, NULL, LONG_OPTION_THREADEVENSUBFRAME},
{"dlsch-demod-shift", required_argument, NULL, LONG_OPTION_DEMOD_SHIFT},
#if T_TRACER
{"T_port", required_argument, 0, LONG_OPTION_T_PORT},
{"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT},
......@@ -800,7 +804,9 @@ static void get_options (int argc, char **argv) {
case LONG_OPTION_THREADEVENSUBFRAME:
threads.even=atoi(optarg);
break;
case LONG_OPTION_DEMOD_SHIFT:
dlsch_demod_shift = atof(optarg);
break;
#if T_TRACER
case LONG_OPTION_T_PORT: {
extern int T_port;
......
......@@ -56,6 +56,8 @@
#include "T.h"