Commit ff6d41b6 authored by hbilel's avatar hbilel

[OAI-UE] Mimo feature

parent 5c375d3a
......@@ -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)) ||
......
......@@ -2893,15 +2893,15 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
break;
case 2:
*CCEmap|=(0x03<<(CCEind&0x1f));
*CCEmap|=(1<<(CCEind&0x1f));
break;
case 4:
*CCEmap|=(0x0f<<(CCEind&0x1f));
*CCEmap|=(1<<(CCEind&0x1f));
break;
case 8:
*CCEmap|=(0xff<<(CCEind&0x1f));
*CCEmap|=(1<<(CCEind&0x1f));
break;
}
......@@ -3518,7 +3518,9 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
} else if (tmode == 3) {
LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 1\n");
// Now check UE_SPEC format 2A_2A search spaces at aggregation 1
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3527,7 +3529,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
mi,
SI_RNTI,
ra_rnti,
P_RNTI,
P_RNTI,
0,
format1A,
format1A,
......@@ -3542,14 +3544,18 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
&CCEmap1,
&CCEmap2);
LOG_D(PHY," format 2A_2A search CCEmap0 %x, format0_found %d, format_c_found %d \n", CCEmap0, format0_found, format_c_found);
if ((CCEmap0==0xffff)||
((format0_found==1)&&(format_c_found==1)))
return(dci_cnt);
LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt);
if (dci_cnt>old_dci_cnt)
return(dci_cnt);
// Now check UE_SPEC format 2 search spaces at aggregation 2
LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 2\n");
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3577,10 +3583,13 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
((format0_found==1)&&(format_c_found==1)))
return(dci_cnt);
LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt);
if (dci_cnt>old_dci_cnt)
return(dci_cnt);
// Now check UE_SPEC format 2_2A search spaces at aggregation 4
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 4 \n");
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3589,7 +3598,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
mi,
SI_RNTI,
ra_rnti,
P_RNTI,
P_RNTI,
2,
format1A,
format1A,
......@@ -3608,11 +3617,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
((format0_found==1)&&(format_c_found==1)))
return(dci_cnt);
LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt);
if (dci_cnt>old_dci_cnt)
return(dci_cnt);
//#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 \n");
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3636,9 +3648,17 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
&CCEmap1,
&CCEmap2);
//#endif
if ((CCEmap0==0xffff)||
((format0_found==1)&&(format_c_found==1)))
return(dci_cnt);
LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt);
if (dci_cnt>old_dci_cnt)
return(dci_cnt);
} else if (tmode == 4) {
// Now check UE_SPEC format 2_2A search spaces at aggregation 1
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3670,6 +3690,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt);
// Now check UE_SPEC format 2 search spaces at aggregation 2
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3701,6 +3722,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt);
// Now check UE_SPEC format 2_2A search spaces at aggregation 4
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3733,6 +3755,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
//#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3762,6 +3785,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
#ifdef DEBUG_DCI_DECODING
LOG_I(PHY," MU-MIMO check UE_SPEC format 1E_2A_M10PRB\n");
#endif
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3794,6 +3818,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt);
// Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 2
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3825,6 +3850,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt);
// Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 4
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......@@ -3858,6 +3884,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
//#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode,
subframe,
dci_alloc,
......
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);
......
......@@ -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");
}
}
......
......@@ -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
......
......@@ -48,7 +48,7 @@ int slot_fep(PHY_VARS_UE *ue,
unsigned int rx_offset;
/*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id];
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
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];*/
......
......@@ -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,
......@@ -768,4 +768,4 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
free(chest_t_abs);
}
\ No newline at end of file
}
......@@ -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];
......@@ -872,7 +872,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 +885,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);
......
......@@ -199,7 +199,7 @@ mac_rrc_data_req(
int sdu_size = sizeof(RRC_MAC_CCCH_DATA_REQ (message_p).sdu);
if (ccch_size > sdu_size) {
LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", ccch_size, sdu_size);
LOG_E(RRC, "SDU larger than CCCH SDU buffer size0 (%d, %d)", ccch_size, sdu_size);
ccch_size = sdu_size;
}
......@@ -297,7 +297,7 @@ mac_rrc_data_req(
int sdu_size = sizeof(RRC_MAC_CCCH_DATA_REQ (message_p).sdu);
if (ccch_size > sdu_size) {
LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", ccch_size, sdu_size);
LOG_E(RRC, "SDU larger than CCCH SDU buffer size1 (%d, %d)", ccch_size, sdu_size);
ccch_size = sdu_size;
}
......@@ -403,7 +403,7 @@ mac_rrc_data_ind(
int msg_sdu_size = CCCH_SDU_SIZE;
if (sdu_lenP > msg_sdu_size) {
LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", sdu_size, msg_sdu_size);
LOG_E(RRC, "SDU larger than CCCH SDU buffer size2 (%d, %d)", sdu_size, msg_sdu_size);
sdu_size = msg_sdu_size;
} else {
sdu_size = sdu_lenP;
......@@ -471,7 +471,7 @@ mac_rrc_data_ind(
int msg_sdu_size = sizeof(RRC_MAC_CCCH_DATA_IND (message_p).sdu);
if (sdu_lenP > msg_sdu_size) {
LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size);
LOG_E(RRC, "SDU larger than CCCH SDU buffer size3 (%d, %d)", sdu_lenP, msg_sdu_size);
sdu_size = msg_sdu_size;
} else {
sdu_size = sdu_lenP;
......
......@@ -61,7 +61,7 @@ Description Defines a list of PLMN network operators
#define VDF5 11
#define SELECTED_PLMN OAI_LTEBOX //SFR1
#define SELECTED_PLMN TEST1 //SFR1
#define TEST_PLMN {0,0,0x0f,1,1,0} // 00101
#define SFR_PLMN_1 {0,2,0x0f,8,0,1} // 20810
......
......@@ -86,14 +86,14 @@ UE0:
};
SIM: {
MSIN="0100001111";
USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f";
MSIN="000001234";
USIM_API_K="000102030405060708090A0B0C0D0E0F";
OPC="C42449363BBAD02B66D16BC975D77CC1";
MSISDN="33611123456";
MSISDN="000000000000";//"33611123456";
};
# Home PLMN Selector with Access Technology
HPLMN= "20893";
HPLMN= "00101";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
......
......@@ -56,6 +56,8 @@
#include "T.h"
extern double cpuf;
#define FRAME_PERIOD 100000000ULL
#define DAQ_PERIOD 66667ULL
#define FIFO_PRIORITY 40
......@@ -538,6 +540,9 @@ static void *UE_thread_rxn_txnp4(void *arg) {
}
phy_procedures_UE_RX( UE, proc, 0, 0, UE->mode, no_relay, NULL );
}
start_meas(&UE->generic_stat);
if (UE->mac_enabled==1) {
ret = mac_xface->ue_scheduler(UE->Mod_id,
......@@ -567,6 +572,10 @@ static void *UE_thread_rxn_txnp4(void *arg) {
UE->Mod_id, proc->frame_rx, proc->subframe_tx,txt );
}
}
stop_meas(&UE->generic_stat);
printf("mac_xface->ue_scheduler %5.2f \n",UE->generic_stat.p_time/(cpuf*1000.0));
// Prepare the future Tx data
if ((subframe_select( &UE->frame_parms, proc->subframe_tx) == SF_UL) ||
......
......@@ -161,30 +161,32 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
memcpy(&(PHY_vars_UE->frame_parms), frame_parms, sizeof(LTE_DL_FRAME_PARMS));
phy_init_lte_ue(PHY_vars_UE,1,abstraction_flag);
for (i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
for (j=0; j<2; j++) {
PHY_vars_UE->dlsch[i][j] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
for (int l=0; l<2; l++) {
for (i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
for (j=0; j<2; j++) {
PHY_vars_UE->dlsch[l][i][j] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
if (!PHY_vars_UE->dlsch[i][j]) {
LOG_E(PHY,"Can't get ue dlsch structures\n");
exit(-1);
} else
LOG_D(PHY,"dlsch[%d][%d] => %p\n",UE_id,i,PHY_vars_UE->dlsch[i][j]);
}
if (!PHY_vars_UE->dlsch[l][i][j]) {
LOG_E(PHY,"Can't get ue dlsch structures\n");
exit(-1);
} else
LOG_D(PHY,"dlsch[%d][%d] => %p\n",UE_id,i,PHY_vars_UE->dlsch[l][i][j]);
}
PHY_vars_UE->ulsch[i] = new_ue_ulsch(frame_parms->N_RB_UL, abstraction_flag);
PHY_vars_UE->ulsch[i] = new_ue_ulsch(frame_parms->N_RB_UL, abstraction_flag);
if (!PHY_vars_UE->ulsch[i]) {
LOG_E(PHY,"Can't get ue ulsch structures\n");
exit(-1);
}
if (!PHY_vars_UE->ulsch[i]) {
LOG_E(PHY,"Can't get ue ulsch structures\n");
exit(-1);
}
PHY_vars_UE->dlsch_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
PHY_vars_UE->dlsch_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
PHY_vars_UE->dlsch_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
PHY_vars_UE->dlsch_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
PHY_vars_UE->transmission_mode[i] = frame_parms->nb_antenna_ports_eNB==1 ? 1 : 2;
PHY_vars_UE->transmission_mode[i] = frame_parms->nb_antenna_ports_eNB==1 ? 1 : 2;
}
}
PHY_vars_UE->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment