Commit e7b54547 authored by aikaterini.trilyraki's avatar aikaterini.trilyraki

Merge branch 'bugfix-48-L1L2signaling' into develop

parents 6a7bf803 eb03e01f
......@@ -36,6 +36,7 @@
#include <stdlib.h>
#endif
#include "PHY/defs.h"
#include "assertions.h"
//#define cmin(a,b) ((a)<(b) ? (a) : (b))
......@@ -515,16 +516,14 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
// if (rvidx==3)
// for (cnt=0;cnt<Ncb;cnt++)
// counter_buffer[rvidx][cnt]=0;
if (Ncb<(3*(RTC<<5))) {
msg("Exiting, RM condition (Nir %d, Nsoft %d, Kw %d\n",Nir,Nsoft,3*(RTC<<5));
return(0);
}
AssertFatal(Ncb>=(3*RTC<<5),"Exiting, RM condition (Ncb %d, Nir/C %d, Nsoft %d, Kw %d\n",Ncb,Nir/C,Nsoft,3*(RTC<<5));
Gp = G/Nl/Qm;
GpmodC = Gp%C;
#ifdef RM_DEBUG
printf("lte_rate_matching_turbo: Kw %d, rvidx %d, G %d, Qm %d, Nl%d, r %d\n",3*(RTC<<5),rvidx, G, Qm,Nl,r);
printf("lte_rate_matching_turbo: Ncb %d, Kw %d, Nir/C %d, rvidx %d, G %d, Qm %d, Nl%d, r %d\n",Ncb,3*(RTC<<5),Nir/C,rvidx, G, Qm,Nl,r);
#endif
if (r < (C-(GpmodC)))
......
......@@ -243,15 +243,16 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,module_id_t UE_id,uint8_t subframe);
void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNb,
void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
int subframe,
module_id_t eNB_id,
unsigned char clear);
void lte_eNB_I0_measurements_emul(PHY_VARS_eNB *phy_vars_eNb,
void lte_eNB_I0_measurements_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t sect_id);
void lte_eNB_srs_measurements(PHY_VARS_eNB *phy_vars_eNb,
void lte_eNB_srs_measurements(PHY_VARS_eNB *phy_vars_eNBy,
module_id_t eNB_id,
module_id_t UE_id,
unsigned char init_averaging);
......
......@@ -39,57 +39,36 @@
int32_t rx_power_avg_eNB[3][3];
void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNb,
void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
int subframe,
unsigned char eNB_id,
unsigned char clear)
{
LTE_eNB_COMMON *eNB_common_vars = &phy_vars_eNb->lte_eNB_common_vars;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNb->lte_frame_parms;
PHY_MEASUREMENTS_eNB *phy_measurements = &phy_vars_eNb->PHY_measurements_eNB[eNB_id];
LTE_eNB_COMMON *eNB_common_vars = &phy_vars_eNB->lte_eNB_common_vars;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms;
PHY_MEASUREMENTS_eNB *phy_measurements = &phy_vars_eNB->PHY_measurements_eNB[eNB_id];
int32_t *rb_mask = phy_vars_eNB->rb_mask_ul;
uint32_t aarx,rx_power_correction;
uint32_t rb;
int32_t *ul_ch;
int32_t n0_power_tot;
int len;
int offset;
int Nsymb = (frame_parms->Ncp==NORMAL)?14:12;
// noise measurements
// for the moment we measure the noise on the 7th OFDM symbol (in S subframe)
phy_measurements->n0_power_tot = 0;
/* printf("rxdataF0 %p, rxdataF1 %p\n",
(&eNB_common_vars->rxdataF[0][0][(frame_parms->ofdm_symbol_size + frame_parms->first_carrier_offset)<<1 ]),
(&eNB_common_vars->rxdataF[0][1][(frame_parms->ofdm_symbol_size + frame_parms->first_carrier_offset)<<1 ]));
*/
/*
for (i=0;i<512;i++)
printf("sector 0 antenna 0 : %d,%d\n",((short *)&eNB_common_vars->rxdataF[0][0][(19*frame_parms->ofdm_symbol_size)<<1])[i<<1],
((short *)&eNB_common_vars->rxdataF[0][0][(19*frame_parms->ofdm_symbol_size)<<1])[1+(i<<1)]);
for (i=0;i<12;i++)
// printf("sector 0 antenna 1 : %d,%d\n",((short *)&eNB_common_vars->rxdataF[0][1][(19*frame_parms->ofdm_symbol_size)<<1])[i<<1],
((short *)&eNB_common_vars->rxdataF[0][1][(19*frame_parms->ofdm_symbol_size)<<1])[1+(i<<1)]);
*/
if ( (frame_parms->ofdm_symbol_size == 128) ||
(frame_parms->ofdm_symbol_size == 512) )
rx_power_correction = 2;
else
rx_power_correction = 1;
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
if (clear == 1)
phy_measurements->n0_power[aarx]=0;
#ifdef USER_MODE
phy_measurements->n0_power[aarx] = ((k1*signal_energy(&eNB_common_vars->rxdata[eNB_id][aarx][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size],
frame_parms->ofdm_symbol_size)) + k2*phy_measurements->n0_power[aarx])>>10;
#else
phy_measurements->n0_power[aarx] = ((k1*signal_energy(&eNB_common_vars->rxdata[eNB_id][aarx][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size],
frame_parms->ofdm_symbol_size))+k2*phy_measurements->n0_power[aarx])>>10;
#endif
phy_measurements->n0_power[aarx] = (phy_measurements->n0_power[aarx] * 12*frame_parms->N_RB_DL)/(frame_parms->ofdm_symbol_size);
phy_measurements->n0_power_dB[aarx] = (unsigned short) dB_fixed(phy_measurements->n0_power[aarx]);
phy_measurements->n0_power_tot += phy_measurements->n0_power[aarx];
......@@ -97,52 +76,49 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNb,
phy_measurements->n0_power_tot_dB = (unsigned short) dB_fixed(phy_measurements->n0_power_tot);
phy_measurements->n0_power_tot_dBm = phy_measurements->n0_power_tot_dB - phy_vars_eNb->rx_total_gain_eNB_dB;
phy_measurements->n0_power_tot_dBm = phy_measurements->n0_power_tot_dB - phy_vars_eNB->rx_total_gain_eNB_dB;
// printf("n0_power %d\n",phy_measurements->n0_power_tot_dB);
for (rb=0; rb<frame_parms->N_RB_UL; rb++) {
n0_power_tot=0;
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
if (rb < 12)
// ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][((19*(frame_parms->ofdm_symbol_size)) + frame_parms->first_carrier_offset + (rb*12))<<1];
ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][((7*frame_parms->ofdm_symbol_size) + frame_parms->first_carrier_offset + (rb*12))<<1];
else if (rb>12)
ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][((7*frame_parms->ofdm_symbol_size) + 6 + (rb-13)*12)<<1];
else {
ul_ch = NULL;
}
if (clear == 1)
phy_measurements->n0_subband_power[aarx][rb]=0;
if (ul_ch) {
// for (i=0;i<24;i+=2)
// printf("re %d => %d\n",i/2,ul_ch[i]);
phy_measurements->n0_subband_power[aarx][rb] = ((k1*(signal_energy_nodc(ul_ch,
24))*rx_power_correction) + (k2*phy_measurements->n0_subband_power[aarx][rb]))>>11; // 11 and 24 to compensate for repeated signal format
phy_measurements->n0_subband_power_dB[aarx][rb] = dB_fixed(phy_measurements->n0_subband_power[aarx][rb]);
// printf("eNb %d, aarx %d, rb %d : energy %d (%d dB)\n",eNB_id,aarx,rb,signal_energy_nodc(ul_ch,24), phy_measurements->n0_subband_power_dB[aarx][rb]);
n0_power_tot += phy_measurements->n0_subband_power[aarx][rb];
} else {
phy_measurements->n0_subband_power[aarx][rb] = 1;
phy_measurements->n0_subband_power_dB[aarx][rb] = -99;
n0_power_tot = 1;
if ((rb_mask[rb>>5]&(1<<(rb&31))) == 0) { // check that rb was not used in this subframe
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
// select the 7th symbol in an uplink subframe
offset = (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size;
offset += (7*frame_parms->ofdm_symbol_size);//(((Nsymb*subframe)+7)*frame_parms->ofdm_symbol_size);
ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][offset];
len = 12;
// just do first half of middle PRB for odd number of PRBs
if (((frame_parms->N_RB_UL&1) == 1) &&
(rb==(frame_parms->N_RB_UL>>1))) {
len=6;
}
if (clear == 1)
phy_measurements->n0_subband_power[aarx][rb]=0;
AssertFatal(ul_ch, "RX signal buffer (freq) problem");
phy_measurements->n0_subband_power[aarx][rb] = signal_energy_nodc(ul_ch,len);
//((k1*(signal_energy_nodc(ul_ch,len)))
// + (k2*phy_measurements->n0_subband_power[aarx][rb]));
phy_measurements->n0_subband_power_dB[aarx][rb] = dB_fixed(phy_measurements->n0_subband_power[aarx][rb]);
// printf("subframe %d (%d): eNb %d, aarx %d, rb %d len %d: energy %d (%d dB)\n",subframe,offset,eNB_id,aarx,rb,len,signal_energy_nodc(ul_ch,len),
// phy_measurements->n0_subband_power_dB[aarx][rb]);
n0_power_tot += phy_measurements->n0_subband_power[aarx][rb];
}
phy_measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_power_tot);
phy_measurements->n0_subband_power_tot_dBm[rb] = phy_measurements->n0_subband_power_tot_dB[rb] - phy_vars_eNB->rx_total_gain_eNB_dB - dB_fixed(frame_parms->N_RB_UL);
}
phy_measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_power_tot);
phy_measurements->n0_subband_power_tot_dBm[rb] = phy_measurements->n0_subband_power_tot_dB[rb] - phy_vars_eNb->rx_total_gain_eNB_dB - 14;
}
}
void lte_eNB_srs_measurements(PHY_VARS_eNB *phy_vars_eNb,
unsigned char eNB_id,
unsigned char UE_id,
......
......@@ -2108,14 +2108,14 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
if (dci_alloc[i].L == (uint8_t)L) {
#ifdef DEBUG_DCI_ENCODING
LOG_I(PHY,"Generating common DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x)\n",i,num_common_dci,dci_alloc[i].nCCE,dci_alloc[i].dci_length,1<<dci_alloc[i].L,
LOG_I(PHY,"Generating common DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x)\n",i,num_common_dci,dci_alloc[i].firstCCE,dci_alloc[i].dci_length,1<<dci_alloc[i].L,
*(unsigned int*)dci_alloc[i].dci_pdu);
dump_dci(frame_parms,&dci_alloc[i]);
#endif
if (dci_alloc[i].nCCE>=0) {
if (dci_alloc[i].firstCCE>=0) {
e_ptr = generate_dci0(dci_alloc[i].dci_pdu,
e+(72*dci_alloc[i].nCCE),
e+(72*dci_alloc[i].firstCCE),
dci_alloc[i].dci_length,
dci_alloc[i].L,
dci_alloc[i].rnti);
......@@ -2133,9 +2133,9 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
dump_dci(frame_parms,&dci_alloc[i]);
#endif
if (dci_alloc[i].nCCE >= 0) {
if (dci_alloc[i].firstCCE >= 0) {
e_ptr = generate_dci0(dci_alloc[i].dci_pdu,
e+(72*dci_alloc[i].nCCE),
e+(72*dci_alloc[i].firstCCE),
dci_alloc[i].dci_length,
dci_alloc[i].L,
dci_alloc[i].rnti);
......@@ -2537,13 +2537,116 @@ uint16_t get_nquad(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uin
return(Nreg - 4 - (3*Ngroup_PHICH));
}
uint16_t get_nCCE_max(uint8_t Mod_id,uint8_t CC_id)
uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int subframe)
{
// check for eNB only !
return(get_nCCE(3,&PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms,1)); // 5, 15,21
return(get_nCCE(num_pdcch_symbols,
&PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms,
get_mi(&PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms,subframe)));
}
int get_nCCE_offset_l1(int *CCE_table,
const unsigned char L,
const int nCCE,
const int common_dci,
const unsigned short rnti,
const unsigned char subframe)
{
int search_space_free,m,nb_candidates = 0,l,i;
unsigned int Yk;
/*
printf("CCE Allocation: ");
for (i=0;i<nCCE;i++)
printf("%d.",CCE_table[i]);
printf("\n");
*/
if (common_dci == 1) {
// check CCE(0 ... L-1)
nb_candidates = (L==4) ? 4 : 2;
nb_candidates = min(nb_candidates,nCCE/L);
// printf("Common DCI nb_candidates %d, L %d\n",nb_candidates,L);
for (m = nb_candidates-1 ; m >=0 ; m--) {
search_space_free = 1;
for (l=0; l<L; l++) {
// printf("CCE_table[%d] %d\n",(m*L)+l,CCE_table[(m*L)+l]);
if (CCE_table[(m*L) + l] == 1) {
search_space_free = 0;
break;
}
}
if (search_space_free == 1) {
// printf("returning %d\n",m*L);
for (l=0; l<L; l++)
CCE_table[(m*L)+l]=1;
return(m*L);
}
}
return(-1);
} else { // Find first available in ue specific search space
// according to procedure in Section 9.1.1 of 36.213 (v. 8.6)
// compute Yk
Yk = (unsigned int)rnti;
for (i=0; i<=subframe; i++)
Yk = (Yk*39827)%65537;
Yk = Yk % (nCCE/L);
switch (L) {
case 1:
case 2:
nb_candidates = 6;
break;
case 4:
case 8:
nb_candidates = 2;
break;
default:
DevParam(L, nCCE, rnti);
break;
}
LOG_D(MAC,"rnti %x, Yk = %d, nCCE %d (nCCE/L %d),nb_cand %d\n",rnti,Yk,nCCE,nCCE/L,nb_candidates);
for (m = 0 ; m < nb_candidates ; m++) {
search_space_free = 1;
for (l=0; l<L; l++) {
if (CCE_table[(((Yk+m)%(nCCE/L))*L) + l] == 1) {
search_space_free = 0;
break;
}
}
if (search_space_free == 1) {
for (l=0; l<L; l++)
CCE_table[(((Yk+m)%(nCCE/L))*L)+l]=1;
return(((Yk+m)%(nCCE/L))*L);
}
}
return(-1);
}
}
void dci_decoding_procedure0(LTE_UE_PDCCH **lte_ue_pdcch_vars,
int do_common,
uint8_t subframe,
......@@ -2691,7 +2794,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **lte_ue_pdcch_vars,
dci_alloc[*dci_cnt].dci_length = sizeof_bits;
dci_alloc[*dci_cnt].rnti = crc;
dci_alloc[*dci_cnt].L = L;
dci_alloc[*dci_cnt].nCCE = CCEind;
dci_alloc[*dci_cnt].firstCCE = CCEind;
if (sizeof_bytes<=4) {
dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[0];
......
......@@ -453,7 +453,7 @@ uint32_t conv_1C_RIV(int32_t rballoc,uint32_t N_RB_DL) {
}
int get_prb(int N_RB_DL,int odd_slot,int vrb,int Ngap) {
uint32_t get_prb(int N_RB_DL,int odd_slot,int vrb,int Ngap) {
int offset;
......@@ -926,10 +926,15 @@ int generate_eNB_dlsch_params_from_dci(int frame,
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rballoc];
if (vrb_type==LOCALIZED) {
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rballoc];
}
else {
LOG_E(PHY,"Distributed RB allocation not done yet\n");
mac_xface->macphy_exit("exiting");
}
dlsch0_harq->vrb_type = vrb_type;
dlsch0_harq->nb_rb = RIV2nb_rb_LUT6[rballoc];//NPRB;
RIV_max = RIV_max6;
......@@ -960,7 +965,14 @@ int generate_eNB_dlsch_params_from_dci(int frame,
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT25[rballoc];
if (vrb_type==LOCALIZED) {
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT25[rballoc];
}
else {
LOG_E(PHY,"Distributed RB allocation not done yet\n");
mac_xface->macphy_exit("exiting");
}
dlsch0_harq->vrb_type = vrb_type;
dlsch0_harq->nb_rb = RIV2nb_rb_LUT25[rballoc];//NPRB;
RIV_max = RIV_max25;
......@@ -987,9 +999,16 @@ int generate_eNB_dlsch_params_from_dci(int frame,
}
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
if (vrb_type==LOCALIZED) {
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT50_0[rballoc];
dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT50_1[rballoc];
}
else {
LOG_E(PHY,"Distributed RB allocation not done yet\n");
mac_xface->macphy_exit("exiting");
}
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT50_0[rballoc];
dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT50_1[rballoc];
dlsch0_harq->vrb_type = vrb_type;
dlsch0_harq->nb_rb = RIV2nb_rb_LUT50[rballoc];//NPRB;
RIV_max = RIV_max50;
......@@ -1017,10 +1036,17 @@ int generate_eNB_dlsch_params_from_dci(int frame,
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
dlsch0_harq->vrb_type = vrb_type;
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT100_0[rballoc];
dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT100_1[rballoc];
dlsch0_harq->rb_alloc[2] = localRIV2alloc_LUT100_2[rballoc];
dlsch0_harq->rb_alloc[3] = localRIV2alloc_LUT100_3[rballoc];
if (vrb_type==LOCALIZED) {
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT100_0[rballoc];
dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT100_1[rballoc];
dlsch0_harq->rb_alloc[2] = localRIV2alloc_LUT100_2[rballoc];
dlsch0_harq->rb_alloc[3] = localRIV2alloc_LUT100_3[rballoc];
}
else {
LOG_E(PHY,"Distributed RB allocation not done yet\n");
mac_xface->macphy_exit("exiting");
}
dlsch0_harq->nb_rb = RIV2nb_rb_LUT100[rballoc];//NPRB;
......@@ -2682,17 +2708,17 @@ int generate_eNB_dlsch_params_from_dci(int frame,
#ifdef DEBUG_DCI
if (dlsch0) {
msg("dlsch0 eNB: dlsch0 %p\n",dlsch0);
msg("dlsch0 eNB: rnti %x\n",dlsch0->rnti);
msg("dlsch0 eNB: NBRB %d\n",dlsch0_harq->nb_rb);
msg("dlsch0 eNB: rballoc %x\n",dlsch0_harq->rb_alloc[0]);
msg("dlsch0 eNB: harq_pid %d\n",harq_pid);
msg("dlsch0 eNB: round %d\n",dlsch0_harq->round);
msg("dlsch0 eNB: rvidx %d\n",dlsch0_harq->rvidx);
msg("dlsch0 eNB: TBS %d (NPRB %d)\n",dlsch0_harq->TBS,NPRB);
msg("dlsch0 eNB: mcs %d\n",dlsch0_harq->mcs);
msg("dlsch0 eNB: tpmi %d\n",tpmi);
msg("dlsch0 eNB: mimo_mode %d\n",dlsch0_harq->mimo_mode);
printf("dlsch0 eNB: dlsch0 %p\n",dlsch0);
printf("dlsch0 eNB: rnti %x\n",dlsch0->rnti);
printf("dlsch0 eNB: NBRB %d\n",dlsch0_harq->nb_rb);
printf("dlsch0 eNB: rballoc %x\n",dlsch0_harq->rb_alloc[0]);
printf("dlsch0 eNB: harq_pid %d\n",harq_pid);
printf("dlsch0 eNB: round %d\n",dlsch0_harq->round);
printf("dlsch0 eNB: rvidx %d\n",dlsch0_harq->rvidx);
printf("dlsch0 eNB: TBS %d (NPRB %d)\n",dlsch0_harq->TBS,NPRB);
printf("dlsch0 eNB: mcs %d\n",dlsch0_harq->mcs);
printf("dlsch0 eNB: tpmi %d\n",tpmi);
printf("dlsch0 eNB: mimo_mode %d\n",dlsch0_harq->mimo_mode);
}
#endif
......@@ -5549,15 +5575,15 @@ int generate_ue_dlsch_params_from_dci(int frame,
#ifdef DEBUG_DCI
if (dlsch[0]) {
msg("PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti);
msg("PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb);
msg("PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc[0]);
msg("PDSCH dlsch0 UE: harq_pid %d\n",harq_pid);
msg("PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi);
msg("PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx);
msg("PDSCH dlsch0 UE: TBS %d\n",dlsch0_harq->TBS);
msg("PDSCH dlsch0 UE: mcs %d\n",dlsch0_harq->mcs);
msg("PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off);
printf("PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti);
printf("PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb);
printf("PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]);
printf("PDSCH dlsch0 UE: harq_pid %d\n",harq_pid);
printf("PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi);
printf("PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx);
printf("PDSCH dlsch0 UE: TBS %d\n",dlsch0_harq->TBS);
printf("PDSCH dlsch0 UE: mcs %d\n",dlsch0_harq->mcs);
printf("PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off);
}
#endif
......
......@@ -273,6 +273,8 @@ typedef struct {
uint8_t Mdlharq;
/// MIMO transmission mode indicator for this sub-frame (for definition see 36-212 V8.6 2009-03, p.17)
uint8_t Kmimo;
/// Nsoft parameter related to UE Category
uint32_t Nsoft;
/// amplitude of PDSCH (compared to RS) in symbols without pilots
int16_t sqrt_rho_a;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
......@@ -583,13 +585,13 @@ typedef struct {
/// UL RSSI per receive antenna
int32_t UL_rssi[NB_ANTENNAS_RX];
/// PUCCH1a/b power (digital linear)
int32_t Po_PUCCH;
uint32_t Po_PUCCH;
/// PUCCH1a/b power (dBm)
int32_t Po_PUCCH_dBm;
/// PUCCH1 power (digital linear), conditioned on below threshold
int32_t Po_PUCCH1_below;
uint32_t Po_PUCCH1_below;
/// PUCCH1 power (digital linear), conditioned on above threshold
int32_t Po_PUCCH1_above;
uint32_t Po_PUCCH1_above;
/// Indicator that Po_PUCCH has been updated by PHY
int32_t Po_PUCCH_update;
/// DL Wideband CQI index (2 TBs)
......@@ -700,6 +702,8 @@ typedef struct {
uint8_t Mdlharq;
/// MIMO transmission mode indicator for this sub-frame (for definition see 36-212 V8.6 2009-03, p.17)
uint8_t Kmimo;
/// Nsoft parameter related to UE Category
uint32_t Nsoft;
/// Maximum number of Turbo iterations
uint8_t max_turbo_iterations;
/// accumulated tx power adjustment for PUCCH
......@@ -744,7 +748,7 @@ typedef struct {
/// Aggregation level
uint8_t L;
/// Position of first CCE of the dci
int nCCE;
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
/// rnti
......
......@@ -117,7 +117,7 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
}
LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigned char N_RB_DL, uint8_t abstraction_flag)
LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_t Nsoft,unsigned char N_RB_DL, uint8_t abstraction_flag)
{
LTE_eNB_DLSCH_t *dlsch;
......@@ -148,6 +148,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
bzero(dlsch,sizeof(LTE_eNB_DLSCH_t));
dlsch->Kmimo = Kmimo;
dlsch->Mdlharq = Mdlharq;
dlsch->Nsoft = Nsoft;
for (i=0; i<10; i++)
dlsch->harq_ids[i] = Mdlharq;
......@@ -400,7 +401,7 @@ int dlsch_encoding(unsigned char *a,
dlsch->harq_processes[harq_pid]->w[r],
dlsch->harq_processes[harq_pid]->e+r_offset,
dlsch->harq_processes[harq_pid]->C, // C
NSOFT, // Nsoft,
dlsch->Nsoft, // Nsoft,
dlsch->Mdlharq,
dlsch->Kmimo,
dlsch->harq_processes[harq_pid]->rvidx,
......
......@@ -81,7 +81,7 @@ void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
}
}
LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag)
LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag)
{
LTE_UE_DLSCH_t *dlsch;
......@@ -113,6 +113,7 @@ LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t max_turbo_ite
memset(dlsch,0,sizeof(LTE_UE_DLSCH_t));
dlsch->Kmimo = Kmimo;
dlsch->Mdlharq = Mdlharq;
dlsch->Nsoft = Nsoft;
dlsch->max_turbo_iterations = max_turbo_iterations;
for (i=0; i<Mdlharq; i++) {
......@@ -353,7 +354,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
(uint8_t*)&dummy_w[r][0],
dlsch_llr+r_offset,
harq_process->C,
NSOFT,
dlsch->Nsoft,
dlsch->Mdlharq,
dlsch->Kmimo,
harq_process->rvidx,
......
......@@ -662,14 +662,16 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
if (frame_parms->mode1_flag==0)
len = (nb_rb*8)- (2*pbch_pss_sss_adjust/3);
len = (nb_rb*8) - (2*pbch_pss_sss_adjust/3);
else
len = (nb_rb*10) - (5*pbch_pss_sss_adjust/6);
} else {
len = (nb_rb*12) - pbch_pss_sss_adjust;
}
// 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);
for (i=0; i<len; i++) {
*llr32 = *rxF;
// printf("llr %d : (%d,%d)\n",i,((int16_t*)llr32)[0],((int16_t*)llr32)[1]);
......
......@@ -574,12 +574,18 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
phy_vars_eNB->PHY_measurements_eNB[eNB].n0_power_dB[0],
phy_vars_eNB->PHY_measurements_eNB[eNB].n0_power_dB[1]);
len += sprintf(&buffer[len],"[eNB PROC] Subband I0: ");
len += sprintf(&buffer[len],"[eNB PROC] PRB I0 (%X.%X.%X.%X): ",
phy_vars_eNB->rb_mask_ul[0],
phy_vars_eNB->rb_mask_ul[1],phy_vars_eNB->rb_mask_ul[2],phy_vars_eNB->rb_mask_ul[3]);
for (i=0; i<25; i++)
len += sprintf(&buffer[len],"%2d ",
phy_vars_eNB->PHY_measurements_eNB[eNB].n0_subband_power_tot_dB[i]);
for (i=0; i<phy_vars_eNB->lte_frame_parms.N_RB_UL; i++) {
len += sprintf(&buffer[len],"%4d ",
phy_vars_eNB->PHY_measurements_eNB[eNB].n0_subband_power_tot_dBm[i]);
if ((i>0) && ((i%25) == 0))
len += sprintf(&buffer[len],"\n ",
phy_vars_eNB->PHY_measurements_eNB[eNB].n0_subband_power_tot_dBm[i]);
}
len += sprintf(&buffer[len],"\n");
len += sprintf(&buffer[len],"\n[eNB PROC] PERFORMANCE PARAMETERS\n");
/*
......@@ -635,11 +641,11 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[UE_id]->ulsch_power[1]),
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[0],
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[1],
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH)-phy_vars_eNB->rx_total_gain_eNB_dB,
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below)-phy_vars_eNB->rx_total_gain_eNB_dB,
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above)-phy_vars_eNB->rx_total_gain_eNB_dB,
PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm, //-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL),
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL),
phy_vars_eNB->eNB_UE_stats[UE_id].sector);
for(i=0; i<8; i++)
......
......@@ -56,15 +56,16 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch);
void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch, uint8_t abstraction_flag);
/** \fn new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t abstraction_flag)
/** \fn new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t abstraction_flag)
\brief This function allocates structures for a particular DLSCH at eNB
@returns Pointer to DLSCH to be removed
@param Kmimo Kmimo factor from 36-212/36-213
@param Mdlharq Maximum number of HARQ rounds (36-212/36-213)
@param Nsoft Soft-LLR buffer size from UE-Category
@params N_RB_DL total number of resource blocks (determine the operating BW)
@param abstraction_flag Flag to indicate abstracted interface
*/
LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t N_RB_DL, uint8_t abstraction_flag);
LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t N_RB_DL, uint8_t abstraction_flag);
/** \fn free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
\brief This function frees memory allocated for a particular DLSCH at UE
......@@ -72,11 +73,16 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t N_RB_DL, ui
*/
void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch);
LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t Mdlharq,uint8_t max_turbo_iterations,uint8_t N_RB_UL, uint8_t abstraction_flag);
LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag);
LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char Mdlharq,unsigned char N_RB_UL, uint8_t abstraction_flag);
/** \fn new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t abstraction_flag)
\brief This function allocates structures for a particular DLSCH at eNB
@returns Pointer to DLSCH to be removed
@param Kmimo Kmimo factor from 36-212/36-213
@param Mdlharq Maximum number of HARQ rounds (36-212/36-213)
@param Nsoft Soft-LLR buffer size from UE-Category
@params N_RB_DL total number of resource blocks (determine the operating BW)
@param abstraction_flag Flag to indicate abstracted interface
*/
LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag);
void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch, uint8_t abstraction_flag);
......@@ -1233,11 +1239,20 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb);
uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb);
/* \brief Return bit-map of resource allocation for a given DCI rballoc (RIV format) and vrb type
@param N_RB_DL number of PRB on DL
@param indicator for even/odd slot
@param vrb vrb index
@param Ngap Gap indicator
*/
uint32_t get_prb(int N_RB_DL,int odd_slot,int vrb,int Ngap);
/* \brief Return prb for a given vrb index
@param vrb_type VRB type (0=localized,1=distributed)
@param rb_alloc_dci rballoc field from DCI
*/
uint32_t get_rballoc(vrb_t vrb_type,uint16_t rb_alloc_dci);
/* \brief Return bit-map of resource allocation for a given DCI rballoc (RIV format) and vrb type
@returns Transmission mode (1-7)
*/
......@@ -1577,6 +1592,12 @@ uint16_t computeRIV(uint16_t N_RB_DL,uint16_t RBstart,uint16_t Lcrbs);
uint32_t pmi_extend(LTE_DL_FRAME_PARMS *frame_parms,uint8_t wideband_pmi);
int get_nCCE_offset_l1(int *CCE_table,
const unsigned char L,
const int nCCE,
const int common_dci,
const unsigned short rnti,
const unsigned char subframe);
uint16_t get_nCCE(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uint8_t mi);
......@@ -1584,7 +1605,7 @@ uint16_t get_nquad(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uin
uint8_t get_mi(LTE_DL_FRAME_PARMS *frame,uint8_t subframe);
uint16_t get_nCCE_max(uint8_t Mod_id,uint8_t CC_id);
uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int subframe);
uint8_t get_num_pdcch_symbols(uint8_t num_dci,DCI_ALLOC_t *dci_alloc,LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
......@@ -1637,22 +1658,22 @@ void generate_pucch_emul(PHY_VARS_UE *phy_vars_ue,
uint8_t subframe);
int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
PUCCH_FMT_t fmt,
uint8_t UE_id,
uint16_t n1_pucch,
uint16_t n2_pucch,
uint8_t shortened_format,
uint8_t *payload,
uint8_t subframe,
uint8_t pucch1_thres);
uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
PUCCH_FMT_t fmt,
uint8_t UE_id,
uint16_t n1_pucch,
uint16_t n2_pucch,
uint8_t shortened_format,
uint8_t *payload,
uint8_t subframe,
uint8_t pucch1_thres);
int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t UE_index,
PUCCH_FMT_t fmt,
uint8_t n1_pucch_sel,
uint8_t *payload,
uint8_t subframe);
uint8_t UE_index,
PUCCH_FMT_t fmt,
uint8_t n1_pucch_sel,
uint8_t *payload,
uint8_t subframe);
/*!
......
This diff is collapsed.
......@@ -1657,8 +1657,15 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB,
}
} else {
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
/*
eNB_pusch_vars->ulsch_power[i] = signal_energy_nodc(eNB_pusch_vars->drs_ch_estimates[eNB_id][i],
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)*rx_power_correction;
*/
eNB_pusch_vars->ulsch_power[i] = signal_energy_nodc(eNB_pusch_vars->drs_ch_estimates[eNB_id][i],
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12);
#ifdef LOCALIZATION
eNB_pusch_vars->subcarrier_power = (int32_t *)malloc(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*sizeof(int32_t));
eNB_pusch_vars->active_subcarrier = subcarrier_energy(eNB_pusch_vars->drs_ch_estimates[eNB_id][i],
......
......@@ -119,7 +119,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR);
// I/Q PUCCH comp (format 1)
fdui->pucch_comp1 = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 480, 240, 100, "PUCCH I/Q of MF Output" );
fdui->pucch_comp1 = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 480, 240, 100, "PUCCH1 Energy (SR)" );
fl_set_object_boxtype( fdui->pucch_comp1, FL_EMBOSSED_BOX );
fl_set_object_color( fdui->pucch_comp1, FL_BLACK, FL_YELLOW );
fl_set_object_lcolor( fdui->pucch_comp1, FL_WHITE ); // Label color
......@@ -160,7 +160,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
int UE_id)
{
int eNB_id = 0;
int i,arx,atx,ind,k;
int i,i2,arx,atx,ind,k;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_enb->lte_frame_parms;
int nsymb_ce = 12*frame_parms->N_RB_UL*frame_parms->symbols_per_tti;
uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx;
......@@ -171,15 +171,17 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
int16_t *pusch_llr;
int16_t *pusch_comp;
int32_t *pucch1_comp;
int16_t *pucch1ab_comp;
int32_t *pucch1_thres;
int32_t *pucch1ab_comp;
float Re,Im,ymax;
float *llr, *bit;
float I[nsymb_ce*2], Q[nsymb_ce*2];
float I_pucch[10240],Q_pucch[10240],A_pucch[10240],B_pucch[10240];
float I_pucch[10240],Q_pucch[10240],A_pucch[10240],B_pucch[10240],C_pucch[10240];
float rxsig_t_dB[nb_antennas_rx][FRAME_LENGTH_COMPLEX_SAMPLES];
float chest_t_abs[nb_antennas_rx][frame_parms->ofdm_symbol_size];
float *chest_f_abs;
float time[FRAME_LENGTH_COMPLEX_SAMPLES];
float time2[2048];
float freq[nsymb_ce*nb_antennas_rx*nb_antennas_tx];
int frame = phy_vars_enb->proc[0].frame_tx;
uint32_t total_dlsch_bitrate = phy_vars_enb->total_dlsch_bitrate;
......@@ -206,7 +208,8 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
pusch_llr = (int16_t*) phy_vars_enb->lte_eNB_pusch_vars[UE_id]->llr;
pusch_comp = (int16_t*) phy_vars_enb->lte_eNB_pusch_vars[UE_id]->rxdataF_comp[eNB_id][0];
pucch1_comp = (int32_t*) phy_vars_enb->pucch1_stats[UE_id];
pucch1ab_comp = (int16_t*) phy_vars_enb->pucch1ab_stats[UE_id];
pucch1_thres = (int32_t*) phy_vars_enb->pucch1_stats_thres[UE_id];
pucch1ab_comp = (int32_t*) phy_vars_enb->pucch1ab_stats[UE_id];
// Received signal in time domain of receive antenna 0
if (rxsig_t != NULL) {
......@@ -236,19 +239,21 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
if (chest_t[0] !=NULL) {
for (i=0; i<(frame_parms->ofdm_symbol_size); i++) {
chest_t_abs[0][i] = 10*log10((float) (chest_t[0][2*i]*chest_t[0][2*i]+chest_t[0][2*i+1]*chest_t[0][2*i+1]));
i2 = (i+(frame_parms->ofdm_symbol_size>>1))%frame_parms->ofdm_symbol_size;
time2[i] = (float)(i-(frame_parms->ofdm_symbol_size>>1));
chest_t_abs[0][i] = 10*log10((float) (1+chest_t[0][2*i2]*chest_t[0][2*i2]+chest_t[0][2*i2+1]*chest_t[0][2*i2+1]));
if (chest_t_abs[0][i] > ymax)
ymax = chest_t_abs[0][i];
}
fl_set_xyplot_data(form->chest_t,time,chest_t_abs[0],(frame_parms->ofdm_symbol_size),"","","");
fl_set_xyplot_data(form->chest_t,time2,chest_t_abs[0],(frame_parms->ofdm_symbol_size),"","","");
}
for (arx=1; arx<nb_antennas_rx; arx++) {
if (chest_t[arx] !=NULL) {
for (i=0; i<(frame_parms->ofdm_symbol_size>>3); i++) {
chest_t_abs[arx][i] = 10*log10((float) (chest_t[arx][2*i]*chest_t[arx][2*i]+chest_t[arx][2*i+1]*chest_t[arx][2*i+1]));
chest_t_abs[arx][i] = 10*log10((float) (1+chest_t[arx][2*i]*chest_t[arx][2*i]+chest_t[arx][2*i+1]*chest_t[arx][2*i+1]));
if (chest_t_abs[arx][i] > ymax)
ymax = chest_t_abs[arx][i];
......@@ -337,16 +342,20 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
// PUSCH I/Q of MF Output
if (pucch1ab_comp!=NULL) {
for (ind=0; ind<10240; ind++) {
I_pucch[ind] = pucch1ab_comp[2*ind];
Q_pucch[ind] = pucch1ab_comp[2*ind+1];
I_pucch[ind] = (float)pucch1ab_comp[2*(ind)];
Q_pucch[ind] = (float)pucch1ab_comp[2*(ind)+1];
A_pucch[ind] = 10*log10(pucch1_comp[ind]);
B_pucch[ind] = ind;
C_pucch[ind] = (float)pucch1_thres[ind];
}
fl_set_xyplot_data(form->pucch_comp,I_pucch,Q_pucch,10240,"","","");
fl_set_xyplot_data(form->pucch_comp1,B_pucch,A_pucch,1024,"","","");
fl_set_xyplot_xbounds(form->pucch_comp,-200,200);
fl_set_xyplot_ybounds(form->pucch_comp,-100,100);
fl_set_xyplot_ybounds(form->pucch_comp1,10,40);
fl_add_xyplot_overlay(form->pucch_comp1,1,B_pucch,C_pucch,1024,FL_RED);
fl_set_xyplot_ybounds(form->pucch_comp,-5000,5000);
fl_set_xyplot_xbounds(form->pucch_comp,-5000,5000);
fl_set_xyplot_ybounds(form->pucch_comp1,20,80);
}
......
......@@ -313,6 +313,8 @@ typedef struct PHY_VARS_eNB_s {
struct PhysicalConfigDedicated *physicalConfigDedicated[NUMBER_OF_UE_MAX];
uint32_t rb_mask_ul[4];
/// Information regarding TM5
MU_MIMO_mode mu_mimo_mode[NUMBER_OF_UE_MAX];
......@@ -374,12 +376,13 @@ typedef struct PHY_VARS_eNB_s {
#ifdef LOCALIZATION
/// time state for localization
time_stats_t localization_stats;
#endif
#endif
int32_t pucch1_stats_cnt[NUMBER_OF_UE_MAX][10];
int32_t pucch1_stats[NUMBER_OF_UE_MAX][10*1024];
int32_t pucch1_stats_thres[NUMBER_OF_UE_MAX][10*1024];
int32_t pucch1ab_stats_cnt[NUMBER_OF_UE_MAX][10];
int32_t pucch1ab_stats[NUMBER_OF_UE_MAX][10*1024];
int32_t pucch1ab_stats[NUMBER_OF_UE_MAX][2*10*1024];
#if ENABLE_RAL
hash_table_t *ral_thresholds_timed;
......
......@@ -339,13 +339,12 @@ typedef struct {
#define NUMBER_OF_SUBBANDS_MAX 13
#define NUMBER_OF_HARQ_PID_MAX 8
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP)
#define MAX_FRAME_NUMBER 0x400
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP)
#define NUMBER_OF_eNB_MAX 1
#define NUMBER_OF_UE_MAX 4
#define NUMBER_OF_CONNECTED_eNB_MAX 3
#else
#define MAX_FRAME_NUMBER 0xFFFF
#ifdef LARGE_SCALE
#define NUMBER_OF_eNB_MAX 2
#define NUMBER_OF_UE_MAX 120
......@@ -470,13 +469,13 @@ typedef struct {
//! estimated avg noise power (dB)
short n0_power_tot_dBm;
//! estimated avg noise power per RB per RX ant (lin)
unsigned short n0_subband_power[NB_ANTENNAS_RX][25];
unsigned short n0_subband_power[NB_ANTENNAS_RX][100];
//! estimated avg noise power per RB per RX ant (dB)
unsigned short n0_subband_power_dB[NB_ANTENNAS_RX][25];
unsigned short n0_subband_power_dB[NB_ANTENNAS_RX][100];
//! estimated avg noise power per RB (dB)
short n0_subband_power_tot_dB[25];
short n0_subband_power_tot_dB[100];
//! estimated avg noise power per RB (dBm)
short n0_subband_power_tot_dBm[25];
short n0_subband_power_tot_dBm[100];
// eNB measurements (per user)
//! estimated received spatial signal power (linear)
unsigned int rx_spatial_power[NUMBER_OF_UE_MAX][2][2];
......@@ -496,13 +495,13 @@ typedef struct {
/// Wideband CQI (sum of all RX antennas, in dB)
char wideband_cqi_tot[NUMBER_OF_UE_MAX];
/// Subband CQI per RX antenna and RB (= SINR)
int subband_cqi[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][25];
int subband_cqi[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][100];
/// Total Subband CQI and RB (= SINR)
int subband_cqi_tot[NUMBER_OF_UE_MAX][25];
int subband_cqi_tot[NUMBER_OF_UE_MAX][100];
/// Subband CQI in dB and RB (= SINR dB)
int subband_cqi_dB[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][25];
int subband_cqi_dB[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][100];
/// Total Subband CQI and RB
int subband_cqi_tot_dB[NUMBER_OF_UE_MAX][25];
int subband_cqi_tot_dB[NUMBER_OF_UE_MAX][100];
} PHY_MEASUREMENTS_eNB;
......
......@@ -399,7 +399,6 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui
uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1);
int get_nCCE_offset(unsigned char L, int nCCE, int common_dci, unsigned short rnti, unsigned char subframe);
void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
......
......@@ -405,8 +405,8 @@ uint8_t get_ack(LTE_DL_FRAME_PARMS *frame_parms,
if (harq_ack[0].send_harq_status == 1)
o_ACK[1] = harq_ack[0].ack;
} else if (harq_ack[8].send_harq_status == 1)
o_ACK[0] = harq_ack[8].ack;
} else if (harq_ack[0].send_harq_status == 1)
o_ACK[0] = harq_ack[0].ack;
status = harq_ack[9].send_harq_status + (harq_ack[0].send_harq_status<<1);
//printf("Subframe 4, TDD config 3: harq_ack[9] = %d,harq_ack[0] = %d\n",harq_ack[9].ack,harq_ack[0].ack);
......
This diff is collapsed.
......@@ -168,7 +168,7 @@ void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe)
1,
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
phy_vars_ue->frame_rx,subframe);
LOG_I(PHY,"[UE %d] Dumping dlsch_SI : ofdm_symbol_size %d, nsymb %d, nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n",
LOG_D(PHY,"[UE %d] Dumping dlsch_SI : ofdm_symbol_size %d, nsymb %d, nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n",
phy_vars_ue->Mod_id,
phy_vars_ue->lte_frame_parms.ofdm_symbol_size,
nsymb,
......@@ -2063,9 +2063,9 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
#endif
#ifdef DEBUG_PHY_PROC
//#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[UE %d] Frame %d, slot %d, Mode %s: DCI found %i\n",phy_vars_ue->Mod_id,frame_rx,slot_rx,mode_string[phy_vars_ue->UE_mode[eNB_id]],dci_cnt);
#endif
//#endif
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->dci_received += dci_cnt;
/*
......@@ -2103,10 +2103,10 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
#ifdef DEBUG_PHY_PROC
if (subframe_rx == 9) { //( frame_rx % 100 == 0) {
// if (subframe_rx == 9) { //( frame_rx % 100 == 0) {
LOG_D(PHY,"frame %d, subframe %d, rnti %x: dci %d/%d\n",frame_rx,subframe_rx,phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->crnti,i,dci_cnt);
//dump_dci(&phy_vars_ue->lte_frame_parms, &dci_alloc_rx[i]);
}
// }
#endif
......@@ -2446,7 +2446,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
else
openair_daq_vars.use_ia_receiver = (openair_daq_vars.use_ia_receiver+1)%3;
LOG_I(PHY,"[MYEMOS] frame %d, IA receiver %d, MCS %d, bitrate %d\n",
LOG_D(PHY,"[MYEMOS] frame %d, IA receiver %d, MCS %d, bitrate %d\n",
frame_rx,
openair_daq_vars.use_ia_receiver,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[phy_vars_ue->dlsch_ue[eNB_id][0]->current_harq_pid]->mcs,
......@@ -2624,13 +2624,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
phy_vars_ue->dlsch_ue[eNB_id][0]->active = 0;
#ifdef DEBUG_PHY_PROC
//#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d Scheduling DLSCH decoding\n",
phy_vars_ue->Mod_id,
phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,
harq_pid,
(subframe_prev == 9) ? (frame_rx-1) : frame_rx,subframe_prev);
#endif
//#endif
if (phy_vars_ue->dlsch_ue[eNB_id][0]) {
if (abstraction_flag == 0) {
......@@ -2676,17 +2676,18 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
if (ret == (1+phy_vars_ue->dlsch_ue[eNB_id][0]->max_turbo_iterations)) {
phy_vars_ue->dlsch_errors[eNB_id]++;
#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d)\n",
//#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d,TBS %d)\n",
phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,
harq_pid,frame_rx,subframe_prev,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->rvidx,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->mcs);
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->mcs,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->TBS);
// if (abstraction_flag ==0 )
//dump_dlsch(phy_vars_ue,eNB_id,subframe_prev,harq_pid);
//mac_xface->macphy_exit("");
#endif
dump_dlsch(phy_vars_ue,eNB_id,subframe_prev,harq_pid);
mac_xface->macphy_exit("");
//#endif
} else {
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d (slot_rx %d): Received DLSCH (rv %d,mcs %d,TBS %d)\n",
phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,
......@@ -2801,7 +2802,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
frame_rx,subframe_prev);
#ifdef DEBUG_PHY_PROC
LOG_I(PHY,"Decoding DLSCH_SI : rb_alloc %x : nb_rb %d G %d TBS %d, num_pdcch_sym %d\n",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc_even[0],
LOG_D(PHY,"Decoding DLSCH_SI : rb_alloc %x : nb_rb %d G %d TBS %d, num_pdcch_sym %d\n",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc_even[0],
phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->nb_rb,
phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->G,
phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->TBS,
......@@ -2849,7 +2850,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
if (ret == (1+phy_vars_ue->dlsch_ue_SI[eNB_id]->max_turbo_iterations)) {
phy_vars_ue->dlsch_SI_errors[eNB_id]++;
#ifdef DEBUG_PHY_PROC
LOG_I(PHY,"[UE %d] Frame %d, subframe %d, received SI in error (TBS %d, mcs %d, rvidx %d, rballoc %X.%X.%X.%X\n",
LOG_D(PHY,"[UE %d] Frame %d, subframe %d, received SI in error (TBS %d, mcs %d, rvidx %d, rballoc %X.%X.%X.%X\n",
phy_vars_ue->Mod_id,
frame_rx,
subframe_prev,
......@@ -3282,7 +3283,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
}
if (is_pmch_subframe((subframe_rx==9?-1:0)+frame_rx,subframe_rx,&phy_vars_ue->lte_frame_parms)) {
LOG_I(PHY,"ue calling pmch subframe ..\n ");
LOG_D(PHY,"ue calling pmch subframe ..\n ");
if ((slot_rx%2)==1) {
LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation(%d)\n",
......@@ -3430,7 +3431,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
phy_vars_rn->sync_area[subframe_rx] = sync_area; // this could also go the harq data struct
phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->TBS = phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->TBS;
phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->mcs = phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->mcs;
LOG_I(PHY,"[RN/UE %d] Frame %d subframe %d: store the MCH PDU for MBSFN sync area %d (MCS %d, TBS %d)\n",
LOG_D(PHY,"[RN/UE %d] Frame %d subframe %d: store the MCH PDU for MBSFN sync area %d (MCS %d, TBS %d)\n",
phy_vars_ue->Mod_id, frame_rx,subframe_rx,sync_area,
phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->mcs,
phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->TBS>>3);
......
......@@ -184,15 +184,15 @@ int main(int argc, char **argv)
unsigned int ret;
unsigned int coded_bits_per_codeword=0,nsymb,dci_cnt,tbs=0;
unsigned int tx_lev=0,tx_lev_dB=0,trials,errs[4]= {0,0,0,0},errs2[4]= {0,0,0,0},round_trials[4]= {0,0,0,0},dci_errors=0,dlsch_active=0,num_layers;
unsigned int tx_lev=0,tx_lev_dB=0,trials,errs[4]= {0,0,0,0},errs2[4]= {0,0,0,0},round_trials[4]= {0,0,0,0},dci_errors=0,dlsch_active=0;//,num_layers;
int re_allocated;
char fname[32],vname[32];
FILE *bler_fd;
char bler_fname[256];
FILE *time_meas_fd;
char time_meas_fname[256];
FILE *tikz_fd;
char tikz_fname[256];
// FILE *tikz_fd;
// char tikz_fname[256];
FILE *input_trch_fd=NULL;
unsigned char input_trch_file=0;
......@@ -218,7 +218,7 @@ int main(int argc, char **argv)
uint8_t rx_sample_offset = 0;
//char stats_buffer[4096];
//int len;
uint8_t num_rounds = 4,fix_rounds=0;
uint8_t num_rounds = 4;//,fix_rounds=0;
uint8_t subframe=7;
int u;
int n=0;
......@@ -232,8 +232,8 @@ int main(int argc, char **argv)
// void *data;
// int ii;
int bler;
double blerr[4],uncoded_ber,avg_ber;
// int bler;
double blerr[4],uncoded_ber;//,avg_ber;
short *uncoded_ber_bit=NULL;
uint8_t N_RB_DL=25,osf=1;
frame_t frame_type = FDD;
......@@ -248,7 +248,7 @@ int main(int argc, char **argv)
int common_flag=0,TPC=0;
double cpu_freq_GHz;
time_stats_t ts;//,sts,usts;
// time_stats_t ts;//,sts,usts;
int avg_iter,iter_trials;
int rballocset=0;
int print_perf=0;
......@@ -262,17 +262,24 @@ int main(int argc, char **argv)
int TB0_active = 1;
uint32_t perfect_ce = 0;
LTE_DL_UE_HARQ_t *dlsch0_ue_harq;
LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq;
// LTE_DL_UE_HARQ_t *dlsch0_ue_harq;
// LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq;
uint8_t Kmimo;
FILE *proc_fd = NULL;
char buf[64];
uint8_t ue_category=4;
uint32_t Nsoft;
int CCE_table[800];
int threequarter_fs=0;
opp_enabled=1; // to enable the time meas
#if defined(__arm__)
FILE *proc_fd = NULL;
char buf[64];
proc_fd = fopen("/sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq", "r");
if(!proc_fd)
printf("cannot open /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq");
......@@ -295,7 +302,7 @@ int main(int argc, char **argv)
// default parameters
n_frames = 1000;
snr0 = 0;
num_layers = 1;
// num_layers = 1;
perfect_ce = 0;
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:Y")) != -1) {
......@@ -478,14 +485,12 @@ int main(int argc, char **argv)
case 'N':
channel_model=AWGN;
break;
default:
msg("Unsupported channel model!\n");
exit(-1);
}
break;
case 'R':
num_rounds=atoi(optarg);
break;
......@@ -915,10 +920,27 @@ int main(int argc, char **argv)
else
Kmimo=1;
switch (ue_category) {
case 1:
Nsoft = 250368;
break;
case 2:
case 3:
Nsoft = 1237248;
break;
case 4:
Nsoft = 1827072;
break;
default:
printf("Unsupported UE category %d\n",ue_category);
exit(-1);
break;
}
for (k=0; k<n_users; k++) {
// Create transport channel structures for 2 transport blocks (MIMO)
for (i=0; i<2; i++) {
PHY_vars_eNB->dlsch_eNB[k][i] = new_eNB_dlsch(Kmimo,8,N_RB_DL,0);
PHY_vars_eNB->dlsch_eNB[k][i] = new_eNB_dlsch(Kmimo,8,Nsoft,N_RB_DL,0);
if (!PHY_vars_eNB->dlsch_eNB[k][i]) {
printf("Can't get eNB dlsch structures\n");
......@@ -930,7 +952,7 @@ int main(int argc, char **argv)
}
for (i=0; i<2; i++) {
PHY_vars_UE->dlsch_ue[0][i] = new_ue_dlsch(Kmimo,8,MAX_TURBO_ITERATIONS,N_RB_DL,0);
PHY_vars_UE->dlsch_ue[0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0);
if (!PHY_vars_UE->dlsch_ue[0][i]) {
printf("Can't get ue dlsch structures\n");
......@@ -941,7 +963,7 @@ int main(int argc, char **argv)
}
// structure for SIC at UE
PHY_vars_UE->dlsch_eNB[0] = new_eNB_dlsch(Kmimo,8,N_RB_DL,0);
PHY_vars_UE->dlsch_eNB[0] = new_eNB_dlsch(Kmimo,8,Nsoft,N_RB_DL,0);
if (DLSCH_alloc_pdu2_1E[0].tpmi == 5) {
......@@ -1228,7 +1250,7 @@ int main(int argc, char **argv)
dci_alloc[num_dci].L = 1;
dci_alloc[num_dci].rnti = SI_RNTI;
dci_alloc[num_dci].format = format1A;
dci_alloc[num_dci].nCCE = 0;
dci_alloc[num_dci].firstCCE = 0;
dump_dci(&PHY_vars_eNB->lte_frame_parms,&dci_alloc[num_dci]);
printf("Generating dlsch params for user %d\n",k);
......@@ -1535,7 +1557,7 @@ int main(int argc, char **argv)
dci_alloc[num_dci].L = 1;
dci_alloc[num_dci].rnti = SI_RNTI;
dci_alloc[num_dci].format = format1A;
dci_alloc[num_dci].nCCE = 0;
dci_alloc[num_dci].firstCCE = 0;
dump_dci(&PHY_vars_eNB->lte_frame_parms,&dci_alloc[num_dci]);
printf("Generating dlsch params for user %d\n",k);
......@@ -1843,7 +1865,7 @@ int main(int argc, char **argv)
dci_alloc[num_dci].L = 1;
dci_alloc[num_dci].rnti = SI_RNTI;
dci_alloc[num_dci].format = format1A;
dci_alloc[num_dci].nCCE = 0;
dci_alloc[num_dci].firstCCE = 0;
dump_dci(&PHY_vars_eNB->lte_frame_parms,&dci_alloc[num_dci]);
printf("Generating dlsch params for user %d\n",k);
......@@ -1874,7 +1896,7 @@ int main(int argc, char **argv)
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].nCCE = 4*k;
dci_alloc[num_dci].firstCCE = 4*k;
printf("Generating dlsch params for user %d\n",k);
generate_eNB_dlsch_params_from_dci(0,
subframe,
......@@ -1919,17 +1941,20 @@ int main(int argc, char **argv)
if (n_frames==1) printf("%d\n",numCCE);
// apply RNTI-based nCCE allocation
memset(CCE_table,0,800*sizeof(int));
for (i=num_common_dci; i<num_dci; i++) {
dci_alloc[i].nCCE = get_nCCE_offset(1<<dci_alloc[i].L,
numCCE,
(dci_alloc[i].rnti==SI_RNTI)? 1 : 0,
dci_alloc[i].rnti,
subframe);
dci_alloc[i].firstCCE = get_nCCE_offset_l1(CCE_table,
1<<dci_alloc[i].L,
numCCE,
(dci_alloc[i].rnti==SI_RNTI)? 1 : 0,
dci_alloc[i].rnti,
subframe);
if (n_frames==1)
printf("dci %d: rnti %x, format %d : nCCE %d/%d\n",i,dci_alloc[i].rnti, dci_alloc[i].format,
dci_alloc[i].nCCE,numCCE);
dci_alloc[i].firstCCE,numCCE);
}
for (k=0; k<n_users; k++) {
......@@ -2012,7 +2037,7 @@ int main(int argc, char **argv)
round_trials[3] = 0;
dci_errors=0;
avg_ber = 0;
// avg_ber = 0;
round=0;
avg_iter = 0;
......@@ -2597,15 +2622,15 @@ PMI_FEEDBACK:
}
start_meas(&PHY_vars_eNB->dlsch_modulation_stats);
re_allocated = dlsch_modulation(PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNB_id],
AMP,
subframe,
&PHY_vars_eNB->lte_frame_parms,
num_pdcch_symbols,
PHY_vars_eNB->dlsch_eNB[k][0],
PHY_vars_eNB->dlsch_eNB[k][1]);
PHY_vars_eNB->dlsch_eNB[k][1]);
stop_meas(&PHY_vars_eNB->dlsch_modulation_stats);
/*
if (trials==0 && round==0)
......
......@@ -56,15 +56,15 @@ PHY_VARS_UE *PHY_vars_UE;
#define UL_RB_ALLOC 0x1ff;
#define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2)
#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
#define DLSCH_RB_ALLOC ((uint16_t)0x1fbf) // igore DC component,RB13
DCI_PDU DCI_pdu;
DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2Lcommon, uint8_t format_selector, uint32_t rnti)
{
uint8_t BCCH_alloc_pdu[8];
uint8_t DLSCH_alloc_pdu[8];
uint8_t UL_alloc_pdu[8];
uint32_t BCCH_alloc_pdu[2];
uint32_t DLSCH_alloc_pdu[2];
uint32_t UL_alloc_pdu[2];
int i;
int dci_length_bytes,dci_length;
......@@ -370,31 +370,35 @@ DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2
DCI_pdu.dci_alloc[0].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++;
/*
if (lte_frame_parms->N_RB_DL >= 25) {
// add ue specific dci
DCI_pdu.dci_alloc[1].dci_length = dci_length;
DCI_pdu.dci_alloc[1].L = log2L;
DCI_pdu.dci_alloc[1].rnti = rnti;
DCI_pdu.dci_alloc[1].format = format1;
DCI_pdu.dci_alloc[1].ra_flag = 0;
memcpy((void*)&DCI_pdu.dci_alloc[1].dci_pdu[0], &DLSCH_alloc_pdu[0], dci_length_bytes);
DCI_pdu.Num_ue_spec_dci++;
DCI_pdu.dci_alloc[0].dci_length = UL_pdu_size_bits;
DCI_pdu.dci_alloc[0].L = log2L;
DCI_pdu.dci_alloc[0].rnti = rnti;
DCI_pdu.dci_alloc[0].format = format0;
DCI_pdu.dci_alloc[0].ra_flag = 0;
memcpy((void*)&DCI_pdu.dci_alloc[0].dci_pdu[0], &UL_alloc_pdu[0], UL_pdu_size_bytes);
DCI_pdu.Num_ue_spec_dci++;
*/
DCI_pdu.dci_alloc[1].dci_length = dci_length;
DCI_pdu.dci_alloc[1].L = log2L;
DCI_pdu.dci_alloc[1].rnti = rnti;
DCI_pdu.dci_alloc[1].format = format1;
DCI_pdu.dci_alloc[1].ra_flag = 0;
memcpy((void*)&DCI_pdu.dci_alloc[1].dci_pdu[0], &DLSCH_alloc_pdu[0], dci_length_bytes);
DCI_pdu.Num_ue_spec_dci++;
if (lte_frame_parms->N_RB_DL >= 50) {
DCI_pdu.dci_alloc[2].dci_length = UL_pdu_size_bits;
DCI_pdu.dci_alloc[2].L = log2L;
DCI_pdu.dci_alloc[2].rnti = rnti;
DCI_pdu.dci_alloc[2].format = format0;
DCI_pdu.dci_alloc[2].ra_flag = 0;
memcpy((void*)&DCI_pdu.dci_alloc[0].dci_pdu[0], &UL_alloc_pdu[0], UL_pdu_size_bytes);
DCI_pdu.Num_ue_spec_dci++;
}
}
DCI_pdu.nCCE = 0;
for (i=0; i<DCI_pdu.Num_common_dci+DCI_pdu.Num_ue_spec_dci; i++) {
DCI_pdu.nCCE += (1<<(DCI_pdu.dci_alloc[i].L));
}
return(&DCI_pdu);
}
......@@ -431,10 +435,8 @@ int main(int argc, char **argv)
uint8_t dci_cnt=0;
LTE_DL_FRAME_PARMS *frame_parms;
uint8_t log2L=2, log2Lcommon=2, format_selector=0;
uint8_t numCCE,nCCE_max,common_active=0,ul_active=0,dl_active=0;
uint32_t rv;
uint8_t numCCE,common_active=0,ul_active=0,dl_active=0;
DCI_format_t format = format1;
uint32_t n_trials_common=0,n_trials_ul=0,n_trials_dl=0,false_detection_cnt=0;
uint8_t common_rx,ul_rx,dl_rx;
uint8_t tdd_config=3;
......@@ -448,19 +450,19 @@ int main(int argc, char **argv)
DCI_ALLOC_t dci_alloc_rx[8];
void* dlsch_pdu = NULL;
// int ret;
int ret;
uint8_t harq_pid;
uint8_t phich_ACK;
uint8_t num_phich_interf = 0;
lte_frame_type_t frame_type=TDD;
int re_offset;
uint32_t *txptr;
// int re_offset;
// uint32_t *txptr;
int aarx;
int k;
uint32_t perfect_ce = 0;
int CCE_table[800];
number_of_cards = 1;
openair_daq_vars.rx_rf_mode = 1;
......@@ -785,7 +787,7 @@ int main(int argc, char **argv)
i=0;
while (!feof(input_fd)) {
fscanf(input_fd,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2);
ret=fscanf(input_fd,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2);
if ((i%4)==0) {
((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL));
......@@ -812,7 +814,7 @@ int main(int argc, char **argv)
PHY_vars_UE->UE_mode[0] = PUSCH;
nCCE_max = get_nCCE(3,&PHY_vars_eNB->lte_frame_parms,get_mi(&PHY_vars_eNB->lte_frame_parms,0));
// nCCE_max = get_nCCE(3,&PHY_vars_eNB->lte_frame_parms,get_mi(&PHY_vars_eNB->lte_frame_parms,0));
//printf("nCCE_max %d\n",nCCE_max);
//printf("num_phich interferers %d\n",num_phich_interf);
......@@ -864,55 +866,62 @@ int main(int argc, char **argv)
numCCE=0;
n_trials_common++;
common_active = 1;
n_trials_ul++;
ul_active = 1;
n_trials_dl++;
dl_active = 1;
if (PHY_vars_eNB->lte_frame_parms.N_RB_DL >= 50) {
n_trials_ul++;
ul_active = 1;
}
if (PHY_vars_eNB->lte_frame_parms.N_RB_DL >= 25) {
n_trials_dl++;
dl_active = 1;
}
init_nCCE_table();
num_pdcch_symbols = get_num_pdcch_symbols(DCI_pdu.Num_common_dci+DCI_pdu.Num_ue_spec_dci,
DCI_pdu.dci_alloc, frame_parms, subframe);
DCI_pdu.nCCE = get_nCCE(num_pdcch_symbols,&PHY_vars_eNB->lte_frame_parms,get_mi(&PHY_vars_eNB->lte_frame_parms,subframe));
numCCE = get_nCCE(num_pdcch_symbols,&PHY_vars_eNB->lte_frame_parms,get_mi(&PHY_vars_eNB->lte_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,
num_pdcch_symbols,
DCI_pdu.nCCE);
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++) {
// SI RNTI
if (DCI_pdu.dci_alloc[i].rnti == SI_RNTI) {
DCI_pdu.dci_alloc[i].nCCE = get_nCCE_offset(1<<DCI_pdu.dci_alloc[i].L,
DCI_pdu.nCCE,
1,
SI_RNTI,
subframe);
DCI_pdu.dci_alloc[i].firstCCE = get_nCCE_offset_l1(CCE_table,
1<<DCI_pdu.dci_alloc[i].L,
numCCE,
1,
SI_RNTI,
subframe);
}
// RA RNTI
else if (DCI_pdu.dci_alloc[i].ra_flag == 1) {
DCI_pdu.dci_alloc[i].nCCE = get_nCCE_offset(1<<DCI_pdu.dci_alloc[i].L,
DCI_pdu.nCCE,
1,
DCI_pdu.dci_alloc[i].rnti,
subframe);
DCI_pdu.dci_alloc[i].firstCCE = get_nCCE_offset_l1(CCE_table,
1<<DCI_pdu.dci_alloc[i].L,
numCCE,
1,
DCI_pdu.dci_alloc[i].rnti,
subframe);
}
// C RNTI
else {
DCI_pdu.dci_alloc[i].nCCE = get_nCCE_offset(1<<DCI_pdu.dci_alloc[i].L,
DCI_pdu.nCCE,
0,
DCI_pdu.dci_alloc[i].rnti,
subframe);
DCI_pdu.dci_alloc[i].firstCCE = get_nCCE_offset_l1(CCE_table,
1<<DCI_pdu.dci_alloc[i].L,
numCCE,
0,
DCI_pdu.dci_alloc[i].rnti,
subframe);
}
if (n_frames==1)
printf("dci %d: rnti 0x%x, format %d, L %d, nCCE %d/%d dci_length %d\n",i,DCI_pdu.dci_alloc[i].rnti, DCI_pdu.dci_alloc[i].format,
DCI_pdu.dci_alloc[i].L, DCI_pdu.dci_alloc[i].nCCE, DCI_pdu.nCCE, DCI_pdu.dci_alloc[i].dci_length);
DCI_pdu.dci_alloc[i].L, DCI_pdu.dci_alloc[i].firstCCE, numCCE, DCI_pdu.dci_alloc[i].dci_length);
if (DCI_pdu.dci_alloc[i].nCCE==-1)
if (DCI_pdu.dci_alloc[i].firstCCE==-1)
exit(-1);
}
......@@ -946,7 +955,7 @@ int main(int argc, char **argv)
generate_phich_top(PHY_vars_eNB,
subframe,AMP,0,0);
/*
// generate 3 interfering PHICH
if (num_phich_interf>0) {
PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->first_rb = 4;
......@@ -973,7 +982,7 @@ int main(int argc, char **argv)
}
PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->first_rb = 0;
*/
}
// write_output("pilotsF.m","rsF",txdataF[0],lte_PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size,1,1);
......@@ -1153,7 +1162,7 @@ int main(int argc, char **argv)
for (i = 0; i < dci_cnt; i++)
printf("dci %d: rnti 0x%x, format %d, L %d, nCCE %d/%d dci_length %d\n",i, dci_alloc_rx[i].rnti, dci_alloc_rx[i].format,
dci_alloc_rx[i].L, dci_alloc_rx[i].nCCE, numCCE, dci_alloc_rx[i].dci_length);
dci_alloc_rx[i].L, dci_alloc_rx[i].firstCCE, numCCE, dci_alloc_rx[i].dci_length);
}
for (i=0; i<dci_cnt; i++) {
......@@ -1228,8 +1237,8 @@ int main(int argc, char **argv)
} //trials
printf("SNR %f : n_errors_common = %d/%d (%e)\n", SNR,n_errors_common,n_trials_common,(double)n_errors_common/n_trials_common);
printf("SNR %f : n_errors_ul = %d/%d (%e)\n", SNR,n_errors_ul,n_trials_ul,(double)n_errors_ul/n_trials_ul);
printf("SNR %f : n_errors_dl = %d/%d (%e)\n", SNR,n_errors_dl,n_trials_dl,(double)n_errors_dl/n_trials_dl);
if (ul_active==1) printf("SNR %f : n_errors_ul = %d/%d (%e)\n", SNR,n_errors_ul,n_trials_ul,(double)n_errors_ul/n_trials_ul);
if (dl_active==1) printf("SNR %f : n_errors_dl = %d/%d (%e)\n", SNR,n_errors_dl,n_trials_dl,(double)n_errors_dl/n_trials_dl);
printf("SNR %f : n_errors_cfi = %d/%d (%e)\n", SNR,n_errors_cfi,trial,(double)n_errors_cfi/trial);
printf("SNR %f : n_errors_hi = %d/%d (%e)\n", SNR,n_errors_hi,trial,(double)n_errors_hi/trial);
......
......@@ -192,7 +192,7 @@ int main(int argc, char **argv)
break;
default:
msg("Unsupported channel model!\n");
printf("Unsupported channel model!\n");
exit(-1);
}
......@@ -204,13 +204,13 @@ int main(int argc, char **argv)
case 's':
snr0 = atof(optarg);
msg("Setting SNR0 to %f\n",snr0);
printf("Setting SNR0 to %f\n",snr0);
break;
case 'S':
snr1 = atof(optarg);
snr1set=1;
msg("Setting SNR1 to %f\n",snr1);
printf("Setting SNR1 to %f\n",snr1);
break;
case 'p':
......@@ -233,7 +233,7 @@ int main(int argc, char **argv)
if ((transmission_mode!=1) &&
(transmission_mode!=2) &&
(transmission_mode!=6)) {
msg("Unsupported transmission mode %d\n",transmission_mode);
printf("Unsupported transmission mode %d\n",transmission_mode);
exit(-1);
}
......@@ -243,7 +243,7 @@ int main(int argc, char **argv)
n_tx=atoi(optarg);
if ((n_tx==0) || (n_tx>2)) {
msg("Unsupported number of tx antennas %d\n",n_tx);
printf("Unsupported number of tx antennas %d\n",n_tx);
exit(-1);
}
......@@ -253,7 +253,7 @@ int main(int argc, char **argv)
n_rx=atoi(optarg);
if ((n_rx==0) || (n_rx>2)) {
msg("Unsupported number of rx antennas %d\n",n_rx);
printf("Unsupported number of rx antennas %d\n",n_rx);
exit(-1);
}
......@@ -367,7 +367,7 @@ int main(int argc, char **argv)
msg("[SIM] Using SCM/101\n");
printf("[SIM] Using SCM/101\n");
UE2eNB = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
channel_model,
......@@ -379,7 +379,7 @@ int main(int argc, char **argv)
if (UE2eNB==NULL) {
msg("Problem generating channel model. Exiting.\n");
printf("Problem generating channel model. Exiting.\n");
exit(-1);
}
......@@ -407,7 +407,7 @@ int main(int argc, char **argv)
PHY_vars_UE->lte_frame_parms.pucch_config_common.nRB_CQI = 0;
PHY_vars_UE->lte_frame_parms.pucch_config_common.nCS_AN = 0;
pucch_payload = 1;
pucch_payload = 0;
generate_pucch(PHY_vars_UE->lte_ue_common_vars.txdataF,
frame_parms,
......@@ -550,9 +550,7 @@ int main(int argc, char **argv)
}
}
lte_eNB_I0_measurements(PHY_vars_eNB,
0,
1);
for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) {
for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_rx; aa++) {
......@@ -600,6 +598,10 @@ int main(int argc, char **argv)
// if (sig == 1)
// printf("*");
lte_eNB_I0_measurements(PHY_vars_eNB,
subframe,
0,
1);
PHY_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dB = N0;//(int8_t)(sigma2_dB-10*log10(PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size/(12*NB_RB)));
stat = rx_pucch(PHY_vars_eNB,
pucch_format,
......
......@@ -97,7 +97,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;
double sigma2, sigma2_dB=10,SNR,SNR2,snr0=-2.0,snr1,SNRmeas,rate,saving_bler=0;
double input_snr_step=.2,snr_int=30;
double blerr;
......@@ -126,7 +126,7 @@ int main(int argc, char **argv)
unsigned int coded_bits_per_codeword,nsymb;
int subframe=3;
unsigned int tx_lev=0,tx_lev_dB,trials,errs[4]= {0,0,0,0},round_trials[4]= {0,0,0,0};
uint8_t transmission_mode=1,n_rx=1,n_tx=1;
uint8_t transmission_mode=1,n_rx=1;
FILE *bler_fd=NULL;
char bler_fname[512];
......@@ -341,10 +341,6 @@ int main(int argc, char **argv)
exit(-1);
}
if (transmission_mode>1) {
n_tx = 1;
}
break;
case 'y':
......@@ -645,8 +641,8 @@ int main(int argc, char **argv)
// Create transport channel structures for 2 transport blocks (MIMO)
for (i=0; i<2; i++) {
PHY_vars_eNB->dlsch_eNB[0][i] = new_eNB_dlsch(1,8,N_RB_DL,0);
PHY_vars_UE->dlsch_ue[0][i] = new_ue_dlsch(1,8,MAX_TURBO_ITERATIONS,N_RB_DL,0);
PHY_vars_eNB->dlsch_eNB[0][i] = new_eNB_dlsch(1,8,1827072,N_RB_DL,0);
PHY_vars_UE->dlsch_ue[0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0);
if (!PHY_vars_eNB->dlsch_eNB[0][i]) {
printf("Can't get eNB dlsch structures\n");
......@@ -661,7 +657,7 @@ int main(int argc, char **argv)
PHY_vars_eNB->dlsch_eNB[0][i]->rnti = 14;
PHY_vars_UE->dlsch_ue[0][i]->rnti = 14;
}
}
switch (PHY_vars_eNB->lte_frame_parms.N_RB_UL) {
......@@ -849,11 +845,11 @@ int main(int argc, char **argv)
harq_pid = subframe2harq_pid(&PHY_vars_UE->lte_frame_parms,PHY_vars_UE->frame_tx,subframe);
input_buffer_length = PHY_vars_UE->ulsch_ue[0]->harq_processes[harq_pid]->TBS/8;
input_buffer = (unsigned char *)malloc(input_buffer_length+4);
// printf("UL frame %d/subframe %d, harq_pid %d\n",PHY_vars_UE->frame,subframe,harq_pid);
if (input_fdUL == NULL) {
input_buffer_length = PHY_vars_UE->ulsch_ue[0]->harq_processes[harq_pid]->TBS/8;
input_buffer = (unsigned char *)malloc(input_buffer_length+4);
if (n_frames == 1) {
trch_out_fdUL= fopen("ulsch_trchUL.txt","w");
......@@ -875,7 +871,7 @@ int main(int argc, char **argv)
i=0;
while (!feof(input_fdUL)) {
fscanf(input_fdUL,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2);
ret=fscanf(input_fdUL,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2);
if ((i%4)==0) {
((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL));
......@@ -1205,6 +1201,7 @@ int main(int argc, char **argv)
start_meas(&PHY_vars_eNB->phy_proc_rx);
start_meas(&PHY_vars_eNB->ofdm_demod_stats);
lte_eNB_I0_measurements(PHY_vars_eNB,
subframe,
0,
1);
......
......@@ -251,7 +251,8 @@ typedef struct {
typedef struct {
uint8_t Num_ue_spec_dci ;
uint8_t Num_common_dci ;
unsigned int nCCE;
uint32_t nCCE;
uint32_t num_pdcch_symbols;
DCI_ALLOC_t dci_alloc[NUM_DCI_MAX] ;
} DCI_PDU;
/*! \brief CCCH payload */
......@@ -735,7 +736,8 @@ typedef struct {
uint8_t dl_pow_off[MAX_NUM_CCs];
uint16_t pre_nb_available_rbs[MAX_NUM_CCs];
unsigned char rballoc_sub_UE[MAX_NUM_CCs][N_RBG_MAX];
uint16_t ta_timer;
int16_t ta_update;
} UE_sched_ctrl;
/*! \brief eNB template for the Random access information */
typedef struct {
......@@ -765,8 +767,6 @@ typedef struct {
uint8_t Msg3_subframe;
/// Flag to indicate the eNB should generate Msg4 upon reception of SDU from RRC. This is triggered by first ULSCH reception at eNB for new user.
uint8_t generate_Msg4;
/// Flag to indicate the eNB should generate the DCI for Msg4, after getting the SDU from RRC.
uint8_t generate_Msg4_dci;
/// Flag to indicate that eNB is waiting for ACK that UE has received Msg3.
uint8_t wait_ack_Msg4;
/// UE RNTI allocated during RAR
......@@ -835,8 +835,8 @@ typedef struct {
/// Outgoing CCCH pdu for PHY
CCCH_PDU CCCH_pdu;
RA_TEMPLATE RA_template[NB_RA_PROC_MAX];
/// BCCH active flag
uint8_t bcch_active;
/// VRB map for common channels
uint8_t vrb_map[100];
/// MBSFN SubframeConfig
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
/// number of subframe allocation pattern available for MBSFN sync area
......@@ -883,9 +883,11 @@ typedef struct {
/// Common cell resources
COMMON_channels_t common_channels[MAX_NUM_CCs];
UE_list_t UE_list;
///subband bitmap configuration
SBMAP_CONF sbmap_conf;
/// CCE table used to build DCI scheduling information
int CCE_table[MAX_NUM_CCs][800];
/// active flag for Other lcid
// uint8_t lcid_active[NB_RB_MAX];
/// eNB stats
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -468,6 +468,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
mac_xface->get_transmission_mode = get_transmission_mode;
mac_xface->get_rballoc = get_rballoc;
mac_xface->get_nb_rb = conv_nprb;
mac_xface->get_prb = get_prb;
// mac_xface->get_SB_size = Get_SB_size;
mac_xface->get_subframe_direction = get_subframe_direction;
mac_xface->Msg3_transmitted = Msg3_tx;
......@@ -507,7 +508,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
mac_xface->computeRIV = computeRIV;
mac_xface->get_TBS_DL = get_TBS_DL;
mac_xface->get_TBS_UL = get_TBS_UL;
mac_xface->get_nCCE_max = get_nCCE_max;
mac_xface->get_nCCE_max = get_nCCE_mac;
mac_xface->get_nCCE_offset = get_nCCE_offset;
mac_xface->get_ue_mode = get_ue_mode;
mac_xface->phy_config_sib1_eNB = phy_config_sib1_eNB;
......
This diff is collapsed.
This diff is collapsed.
......@@ -238,14 +238,17 @@ typedef struct {
int (*get_ue_active_harq_pid)(module_id_t Mod_id, uint8_t CC_id,rnti_t rnti, int frame, uint8_t subframe, uint8_t *harq_pid, uint8_t *round, uint8_t ul_flag);
/// Function to retrieve number of CCE
uint16_t (*get_nCCE_max)(module_id_t Mod_id,uint8_t CC_id);
uint16_t (*get_nCCE_max)(module_id_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int subframe);
/// Function to get the CCE offset
int (*get_nCCE_offset)(unsigned char L, int nCCE, int common_dci, unsigned short rnti, unsigned char subframe);
/// Function to retrieve number of PRB in an rb_alloc
uint32_t (*get_nb_rb)(uint8_t ra_header, uint32_t rb_alloc, int n_rb_dl);
/// Function to convert VRB to PRB for distributed allocation
int (*get_prb)(int N_RB_DL,int odd_slot,int vrb,int Ngap);
/// Function to retrieve transmission mode for UE
uint8_t (*get_transmission_mode)(module_id_t Mod_id,uint8_t CC_id,rnti_t rnti);
......@@ -312,8 +315,9 @@ typedef struct {
/// get the delta TF for Uplink Power Control Calculation
int16_t (*get_hundred_times_delta_TF) (module_id_t module_idP, uint8_t CC_id, rnti_t rnti, uint8_t harq_pid);
/// get target uplink received power
/// get target PUSCH received power
int16_t (*get_target_pusch_rx_power) (module_id_t module_idP, uint8_t CC_id);
/// get target PUSCH received power
int16_t (*get_target_pucch_rx_power) (module_id_t module_idP, uint8_t CC_id);
unsigned char is_cluster_head;
......
This diff is collapsed.
This diff is collapsed.
......@@ -66,7 +66,7 @@ eNBs =
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -108;
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment