Merge branch 'bugfix-48-L1L2signaling' of https://gitlab.eurecom.fr/oai/openairinterface5g into bugfix-48-L1L2signaling
This commit is contained in:
@@ -1413,6 +1413,6 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y,
|
||||
return(iteration_cnt);
|
||||
}
|
||||
|
||||
#endif __AVX2__
|
||||
#endif //__AVX2__
|
||||
|
||||
|
||||
|
||||
@@ -303,6 +303,10 @@ void ccodedot11_init(void);
|
||||
\brief This function initializes the trellis structure for decoding an 802.11 convolutional code.*/
|
||||
void ccodedot11_init_inv(void);
|
||||
|
||||
/*!\fn void teillis_table_init(void)
|
||||
\brief This function initializes the trellis structure for 3GPP LTE Turbo code.*/
|
||||
void treillis_table_init(void);
|
||||
|
||||
/*\fn void threegpplte_turbo_encoder(uint8_t *input,uint16_t input_length_bytes,uint8_t *output,uint8_t F,uint16_t interleaver_f1,uint16_t interleaver_f2)
|
||||
\brief This function implements a rate 1/3 8-state parralel concatenated turbo code (3GPP-LTE).
|
||||
@param input Pointer to input buffer
|
||||
@@ -353,6 +357,8 @@ void ccodedab_init(void);
|
||||
\brief This function initializes the trellis structure for decoding an DAB convolutional code (first 3 bits).*/
|
||||
void ccodedab_init_inv(void);
|
||||
|
||||
|
||||
|
||||
/*!\fn void crcTableInit(void)
|
||||
\brief This function initializes the different crc tables.*/
|
||||
void crcTableInit (void);
|
||||
|
||||
@@ -128,8 +128,8 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
|
||||
{
|
||||
|
||||
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms;
|
||||
LTE_eNB_UE_stats *eNB_UE_stats = PHY_vars_eNB_g[Mod_id][CC_id]->eNB_UE_stats;
|
||||
int32_t rx_total_gain_eNB_dB = PHY_vars_eNB_g[Mod_id][CC_id]->rx_total_gain_eNB_dB;
|
||||
//LTE_eNB_UE_stats *eNB_UE_stats = PHY_vars_eNB_g[Mod_id][CC_id]->eNB_UE_stats;
|
||||
//int32_t rx_total_gain_eNB_dB = PHY_vars_eNB_g[Mod_id][CC_id]->rx_total_gain_eNB_dB;
|
||||
int i;
|
||||
|
||||
LOG_D(PHY,"[eNB%d] CCid %d Frame %d: Applying radioResourceConfigCommon\n",Mod_id,CC_id,PHY_vars_eNB_g[Mod_id][CC_id]->proc[8].frame_tx);
|
||||
@@ -683,11 +683,11 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
|
||||
int CC_id)
|
||||
{
|
||||
|
||||
PHY_VARS_eNB *phy_vars_eNB = PHY_vars_eNB_g[Mod_id][CC_id];
|
||||
//PHY_VARS_eNB *phy_vars_eNB = PHY_vars_eNB_g[Mod_id][CC_id];
|
||||
uint8_t UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][0]);
|
||||
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10;
|
||||
//struct RadioResourceConfigCommonSCell_r10 *physicalConfigCommonSCell_r10 = sCellToAddMod_r10->radioResourceConfigCommonSCell_r10;
|
||||
PhysCellId_t physCellId_r10 = sCellToAddMod_r10->cellIdentification_r10->physCellId_r10;
|
||||
//PhysCellId_t physCellId_r10 = sCellToAddMod_r10->cellIdentification_r10->physCellId_r10;
|
||||
ARFCN_ValueEUTRA_t dl_CarrierFreq_r10 = sCellToAddMod_r10->cellIdentification_r10->dl_CarrierFreq_r10;
|
||||
uint32_t carrier_freq_local;
|
||||
|
||||
@@ -733,7 +733,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
|
||||
}
|
||||
|
||||
if (physicalConfigDedicatedSCell_r10) {
|
||||
#warning " phy_vars_eNB->physicalConfigDedicatedSCell_r10 does not exist in phy_vars_eNB"
|
||||
//#warning " phy_vars_eNB->physicalConfigDedicatedSCell_r10 does not exist in phy_vars_eNB"
|
||||
// phy_vars_eNB->physicalConfigDedicatedSCell_r10[UE_id] = physicalConfigDedicatedSCell_r10;
|
||||
LOG_I(PHY,"[eNB %d] Frame %d: Configured phyConfigDedicatedSCell with CC_id %d for UE %d\n",Mod_id,/*phy_vars_eNB->frame*/0,CC_id,UE_id);
|
||||
} else {
|
||||
|
||||
@@ -771,7 +771,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
||||
break;
|
||||
case 75:
|
||||
idft1536((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][LTE_CE_OFFSET],
|
||||
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa]);
|
||||
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
idft2048((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][LTE_CE_OFFSET],
|
||||
|
||||
@@ -50,7 +50,7 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
|
||||
PHY_MEASUREMENTS_eNB *phy_measurements = &phy_vars_eNB->PHY_measurements_eNB[eNB_id];
|
||||
uint32_t *rb_mask = phy_vars_eNB->rb_mask_ul;
|
||||
|
||||
uint32_t aarx,rx_power_correction;
|
||||
uint32_t aarx /* ,rx_power_correction */;
|
||||
uint32_t rb;
|
||||
int32_t *ul_ch;
|
||||
int32_t n0_power_tot;
|
||||
|
||||
@@ -170,12 +170,13 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
|
||||
|
||||
case 75:
|
||||
idft1536((short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp); /// complex output
|
||||
(short*)sync_tmp,
|
||||
1); /// complex output
|
||||
break;
|
||||
case 100:
|
||||
idft2048((short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
default:
|
||||
LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL);
|
||||
@@ -217,8 +218,8 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
|
||||
|
||||
case 75:
|
||||
idft1536((short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp /// complex output
|
||||
);
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
idft2048((short*)syncF_tmp, /// complex input
|
||||
@@ -265,8 +266,8 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
|
||||
|
||||
case 75:
|
||||
idft1536((short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp /// complex output
|
||||
);
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
idft2048((short*)syncF_tmp, /// complex input
|
||||
|
||||
@@ -572,7 +572,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue,
|
||||
// skip the first 4 RE due to interpolation filter length of 5 (not possible to skip 5 due to 128i alignment, must be multiple of 128bit)
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i pmi128_re,pmi128_im,mmtmpPMI0,mmtmpPMI1,mmtmpPMI2,mmtmpPMI3;
|
||||
__m128i pmi128_re,pmi128_im,mmtmpPMI0,mmtmpPMI1 /* ,mmtmpPMI2,mmtmpPMI3 */ ;
|
||||
|
||||
dl_ch0_128 = (__m128i *)&phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_id][aarx][4];
|
||||
dl_ch1_128 = (__m128i *)&phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_id][2+aarx][4];
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "PHY/CODING/lte_interleaver_inline.h"
|
||||
#include "PHY/LTE_TRANSPORT/defs.h"
|
||||
#include "PHY/LTE_TRANSPORT/proto.h"
|
||||
#include "SCHED/defs.h"
|
||||
#include "defs.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
|
||||
|
||||
@@ -898,7 +898,7 @@ int32_t generate_prach( PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id, uint8_t subfra
|
||||
memmove( prach, prach+512, Ncp<<2 );
|
||||
prach_len = 256+Ncp;
|
||||
} else {
|
||||
idft1536(prachF,prach2);
|
||||
idft1536(prachF,prach2,1);
|
||||
memmove( prach, prach+3072, Ncp<<2 );
|
||||
prach_len = 1536+Ncp;
|
||||
|
||||
@@ -1338,10 +1338,10 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe,uint16_t *preamble_ene
|
||||
if (prach_fmt == 4) {
|
||||
dft256(prach2,rxsigF[aa],1);
|
||||
} else {
|
||||
dft1536(prach2,rxsigF[aa]);
|
||||
dft1536(prach2,rxsigF[aa],1);
|
||||
|
||||
if (prach_fmt>1)
|
||||
dft1536(prach2+3072,rxsigF[aa]+3072);
|
||||
dft1536(prach2+3072,rxsigF[aa]+3072,1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -639,8 +639,7 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
|
||||
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->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);
|
||||
PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL));
|
||||
|
||||
len+= sprintf(&buffer[len],"DL mcs %d, UL mcs %d, UL rb %d, delta_TF %d, ",
|
||||
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[0]->mcs,
|
||||
@@ -688,11 +687,33 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
|
||||
phy_vars_eNB->eNB_UE_stats[UE_id].sr_total-phy_vars_eNB->eNB_UE_stats[UE_id].sr_received);
|
||||
|
||||
len += sprintf(&buffer[len],"DL Subband CQI: ");
|
||||
|
||||
for (i=0; i<25; i++)
|
||||
|
||||
int nb_sb;
|
||||
switch (phy_vars_eNB->lte_frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
nb_sb=0;
|
||||
break;
|
||||
case 15:
|
||||
nb_sb = 4;
|
||||
case 25:
|
||||
nb_sb = 7;
|
||||
break;
|
||||
case 50:
|
||||
nb_sb = 9;
|
||||
break;
|
||||
case 75:
|
||||
nb_sb = 10;
|
||||
break;
|
||||
case 100:
|
||||
nb_sb = 13;
|
||||
break;
|
||||
default:
|
||||
nb_sb=0;
|
||||
break;
|
||||
}
|
||||
for (i=0; i<nb_sb; i++)
|
||||
len += sprintf(&buffer[len],"%2d ",
|
||||
phy_vars_eNB->eNB_UE_stats[UE_id].DL_subband_cqi[0][i]);
|
||||
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
|
||||
);
|
||||
*/
|
||||
|
||||
void idft1536(int16_t *sigF,int16_t *sig);
|
||||
void idft1536(int16_t *sigF,int16_t *sig,int scale);
|
||||
|
||||
void idft6144(int16_t *sigF,int16_t *sig);
|
||||
|
||||
@@ -168,7 +168,7 @@ void idft3072(int16_t *sigF,int16_t *sig);
|
||||
|
||||
void idft24576(int16_t *sigF,int16_t *sig);
|
||||
|
||||
void dft1536(int16_t *sigF,int16_t *sig);
|
||||
void dft1536(int16_t *sigF,int16_t *sig,int scale);
|
||||
|
||||
void dft6144(int16_t *sigF,int16_t *sig);
|
||||
|
||||
|
||||
@@ -5403,7 +5403,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
|
||||
|
||||
#include "twiddle1536.h"
|
||||
// 512 x 3
|
||||
void idft1536(int16_t *input, int16_t *output)
|
||||
void idft1536(int16_t *input, int16_t *output, int scale)
|
||||
{
|
||||
int i,i2,j;
|
||||
uint32_t tmp[3][512 ]__attribute__((aligned(32)));
|
||||
@@ -5428,24 +5428,26 @@ void idft1536(int16_t *input, int16_t *output)
|
||||
}
|
||||
|
||||
|
||||
for (i=0; i<24; i++) {
|
||||
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[1] = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[2] = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[3] = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[4] = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[5] = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[6] = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[7] = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[8] = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[9] = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p+=16;
|
||||
if (scale==1) {
|
||||
for (i=0; i<24; i++) {
|
||||
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[1] = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[2] = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[3] = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[4] = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[5] = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[6] = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[7] = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[8] = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[9] = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p+=16;
|
||||
}
|
||||
}
|
||||
|
||||
_mm_empty();
|
||||
@@ -5453,11 +5455,13 @@ void idft1536(int16_t *input, int16_t *output)
|
||||
|
||||
}
|
||||
|
||||
void dft1536(int16_t *input, int16_t *output)
|
||||
void dft1536(int16_t *input, int16_t *output, int scale)
|
||||
{
|
||||
int i,i2,j;
|
||||
uint32_t tmp[3][512] __attribute__((aligned(32)));
|
||||
uint32_t tmpo[3][512] __attribute__((aligned(32)));
|
||||
simd_q15_t *y128p=(simd_q15_t*)output;
|
||||
simd_q15_t ONE_OVER_SQRT3_Q15_128 = set1_int16(ONE_OVER_SQRT3_Q15);
|
||||
|
||||
for (i=0,j=0; i<512; i++) {
|
||||
tmp[0][i] = ((uint32_t *)input)[j++];
|
||||
@@ -5485,6 +5489,28 @@ void dft1536(int16_t *input, int16_t *output)
|
||||
(simd_q15_t*)(twa1536+i),(simd_q15_t*)(twb1536+i));
|
||||
}
|
||||
|
||||
if (scale==1) {
|
||||
for (i=0; i<24; i++) {
|
||||
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[1] = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[2] = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[3] = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[4] = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[5] = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[6] = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[7] = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[8] = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[9] = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128);
|
||||
y128p+=16;
|
||||
}
|
||||
}
|
||||
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
|
||||
|
||||
+6
-4
@@ -65,10 +65,12 @@
|
||||
//use msg in the real-time thread context
|
||||
#define msg_nrt printf
|
||||
//use msg_nrt in the non real-time context (for initialization, ...)
|
||||
#ifdef __AVX2__
|
||||
#define malloc16(x) memalign(32,x)
|
||||
#else
|
||||
#define malloc16(x) memalign(16,x)
|
||||
#ifndef malloc16
|
||||
# ifdef __AVX2__
|
||||
# define malloc16(x) memalign(32,x)
|
||||
# else
|
||||
# define malloc16(x) memalign(16,x)
|
||||
# endif
|
||||
#endif
|
||||
#define free16(y,x) free(y)
|
||||
#define bigmalloc malloc
|
||||
|
||||
@@ -52,11 +52,11 @@ void fill_dci(DCI_PDU *DCI_pdu, uint8_t sched_subframe, PHY_VARS_eNB *phy_vars_e
|
||||
{
|
||||
|
||||
int i;
|
||||
uint8_t cooperation_flag = phy_vars_eNB->cooperation_flag;
|
||||
//uint8_t cooperation_flag = phy_vars_eNB->cooperation_flag;
|
||||
uint8_t transmission_mode = phy_vars_eNB->transmission_mode[0];
|
||||
|
||||
uint32_t rballoc = 0x7FFF;
|
||||
uint32_t rballoc2 = 0x000F;
|
||||
//uint32_t rballoc2 = 0x000F;
|
||||
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_tx;
|
||||
|
||||
LTE_eNB_DLSCH_t *DLSCH_ptr = phy_vars_eNB->dlsch_eNB[0][0];
|
||||
@@ -583,7 +583,7 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *phy_vars_eN
|
||||
{
|
||||
|
||||
int i;
|
||||
uint8_t cooperation_flag = phy_vars_eNB->cooperation_flag;
|
||||
//uint8_t cooperation_flag = phy_vars_eNB->cooperation_flag;
|
||||
uint8_t transmission_mode = phy_vars_eNB->transmission_mode[0];
|
||||
|
||||
//uint32_t rballoc = 0x00F0;
|
||||
|
||||
@@ -561,6 +561,7 @@ void phy_eNB_lte_check_measurement_thresholds(instance_t instanceP, ral_threshol
|
||||
#endif
|
||||
|
||||
|
||||
unsigned int taus(void);
|
||||
|
||||
void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_flag,
|
||||
relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn)
|
||||
@@ -1755,6 +1756,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
|
||||
stop_meas(&phy_vars_eNB->phy_proc_tx);
|
||||
|
||||
|
||||
(void)re_allocated; /* remove gcc warning "set but not used" */
|
||||
}
|
||||
|
||||
void process_Msg3(PHY_VARS_eNB *phy_vars_eNB,uint8_t sched_subframe,uint8_t UE_id, uint8_t harq_pid)
|
||||
@@ -3429,13 +3431,13 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
|
||||
|
||||
} // loop i=0 ... NUMBER_OF_UE_MAX-1
|
||||
|
||||
if (abstraction_flag == 0) {
|
||||
lte_eNB_I0_measurements(phy_vars_eNB,
|
||||
subframe,
|
||||
0,
|
||||
phy_vars_eNB->first_run_I0_measurements);
|
||||
phy_vars_eNB->first_run_I0_measurements = 0;
|
||||
}
|
||||
if (abstraction_flag == 0) {
|
||||
lte_eNB_I0_measurements(phy_vars_eNB,
|
||||
subframe,
|
||||
0,
|
||||
phy_vars_eNB->first_run_I0_measurements);
|
||||
phy_vars_eNB->first_run_I0_measurements = 0;
|
||||
}
|
||||
|
||||
#ifdef PHY_ABSTRACTION
|
||||
else {
|
||||
|
||||
@@ -900,6 +900,8 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
|
||||
}
|
||||
*/
|
||||
|
||||
unsigned int taus(void);
|
||||
|
||||
for (i=0; i<input_buffer_length; i++)
|
||||
ulsch_input_buffer[i]= (uint8_t)(taus()&0xff);
|
||||
|
||||
|
||||
@@ -46,16 +46,16 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id
|
||||
{
|
||||
|
||||
int8_t Po_PUCCH;
|
||||
uint8_t harq_pid;
|
||||
//uint8_t harq_pid;
|
||||
|
||||
// P_pucch = P_opucch+ PL + h(nCQI,nHARQ) + delta_pucchF(pucch_fmt) + g(i))
|
||||
//
|
||||
if ((pucch_fmt == pucch_format1a) ||
|
||||
(pucch_fmt == pucch_format1b)) { // Update g_pucch based on TPC/delta_PUCCH received in PDCCH for this process
|
||||
harq_pid = phy_vars_ue->dlsch_ue[eNB_id][0]->harq_ack[subframe].harq_id;
|
||||
//if ((pucch_fmt == pucch_format1a) ||
|
||||
// (pucch_fmt == pucch_format1b)) { // Update g_pucch based on TPC/delta_PUCCH received in PDCCH for this process
|
||||
//harq_pid = phy_vars_ue->dlsch_ue[eNB_id][0]->harq_ack[subframe].harq_id;
|
||||
//this is now done in dci_tools
|
||||
//phy_vars_ue->g_pucch[eNB_id] += phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->delta_PUCCH;
|
||||
}
|
||||
//}
|
||||
|
||||
Po_PUCCH = get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,eNB_id)+
|
||||
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
|
||||
|
||||
@@ -81,7 +81,7 @@ int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *phy_vars_eNB,uint8_t UE_id,
|
||||
//(phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->control_only == 1) ? phy_vars_eNB->ulsch_eNB[UE_id]->beta_offset_cqi_times8:8;
|
||||
|
||||
DevAssert( UE_id < NUMBER_OF_UE_MAX );
|
||||
#warning "This condition happens sometimes. Need more investigation" // navid
|
||||
//#warning "This condition happens sometimes. Need more investigation" // navid
|
||||
//DevAssert( MPR_x100/6 < 100 );
|
||||
|
||||
if (phy_vars_eNB->ul_power_control_dedicated[UE_id].deltaMCS_Enabled == 1) {
|
||||
|
||||
@@ -288,7 +288,7 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg,
|
||||
n_ue, total_header+total_tbs,total_header,total_tbs);
|
||||
}
|
||||
|
||||
#warning "CC id should be adjusted, set to zero for the moment"
|
||||
//#warning "CC id should be adjusted, set to zero for the moment"
|
||||
memcpy(&UE_transport_info[n_ue][CC_id], UE_info, total_header + total_tbs);
|
||||
|
||||
/* Go to the next UE info */
|
||||
|
||||
@@ -291,7 +291,6 @@ void fill_phy_enb_vars(unsigned int enb_id, uint8_t CC_id,unsigned int next_slot
|
||||
LTE_eNB_DLSCH_t *dlsch_eNB;
|
||||
unsigned short ue_id;
|
||||
uint8_t nb_total_dci;
|
||||
int i;
|
||||
|
||||
// eNB
|
||||
// PBCH : copy payload
|
||||
|
||||
@@ -220,7 +220,7 @@ int main(int argc, char **argv)
|
||||
uint8_t N_RB_DL=25,osf=1;
|
||||
frame_t frame_type = FDD;
|
||||
int xforms=0;
|
||||
FD_lte_phy_scope_ue *form_ue;
|
||||
FD_lte_phy_scope_ue *form_ue = NULL;
|
||||
char title[255];
|
||||
uint32_t DLSCH_RB_ALLOC = 0x1fff;
|
||||
int numCCE=0;
|
||||
@@ -2624,6 +2624,8 @@ PMI_FEEDBACK:
|
||||
num_pdcch_symbols,
|
||||
PHY_vars_eNB->dlsch_eNB[k][0],
|
||||
PHY_vars_eNB->dlsch_eNB[k][1]);
|
||||
/* avoid gcc warnings */
|
||||
(void)re_allocated;
|
||||
|
||||
stop_meas(&PHY_vars_eNB->dlsch_modulation_stats);
|
||||
/*
|
||||
|
||||
@@ -583,10 +583,10 @@ int main(int argc, char **argv)
|
||||
mcs,N_RB_DL,mcs,N_RB_DL,errs[0],
|
||||
mcs,N_RB_DL,mcs,N_RB_DL,trials);
|
||||
else
|
||||
fprintf(fd,"SNR_awgn_%d = [SNR_awgn_%d %d]; errs_mch_awgn_%d =[errs_mch_awgn_%f %d]; mch_trials_awgn_%d =[mch_trials_awgn_%d %d];\n",
|
||||
mcs,N_RB_DL,mcs,N_RB_DL,SNR,
|
||||
mcs,N_RB_DL,mcs,N_RB_DL,errs[0],
|
||||
mcs,N_RB_DL,mcs,N_RB_DL,trials);
|
||||
fprintf(fd,"SNR_awgn_%d = [SNR_awgn_%d %f]; errs_mch_awgn_%d =[errs_mch_awgn_%d %d]; mch_trials_awgn_%d =[mch_trials_awgn_%d %d];\n",
|
||||
N_RB_DL,N_RB_DL,SNR,
|
||||
N_RB_DL,N_RB_DL,errs[0],
|
||||
N_RB_DL,N_RB_DL,trials);
|
||||
|
||||
fflush(fd);
|
||||
|
||||
|
||||
@@ -80,9 +80,9 @@ int main(int argc, char **argv)
|
||||
unsigned char pbch_pdu[6];
|
||||
// int sync_pos, sync_pos_slot;
|
||||
// FILE *rx_frame_file;
|
||||
FILE *output_fd;
|
||||
FILE *output_fd = NULL;
|
||||
uint8_t write_output_file=0;
|
||||
int result;
|
||||
//int result;
|
||||
int freq_offset;
|
||||
// int subframe_offset;
|
||||
// char fname[40], vname[40];
|
||||
@@ -91,8 +91,8 @@ int main(int argc, char **argv)
|
||||
uint16_t Nid_cell=0;
|
||||
|
||||
int n_frames=1;
|
||||
channel_desc_t *eNB2UE,*eNB2UE1,*eNB2UE2;
|
||||
uint32_t nsymb,tx_lev,tx_lev1,tx_lev2;
|
||||
channel_desc_t *eNB2UE,*eNB2UE1 = NULL,*eNB2UE2 = NULL;
|
||||
uint32_t nsymb,tx_lev,tx_lev1 = 0,tx_lev2 = 0;
|
||||
uint8_t extended_prefix_flag=0;
|
||||
int8_t interf1=-21,interf2=-21;
|
||||
LTE_DL_FRAME_PARMS *frame_parms;
|
||||
@@ -104,12 +104,12 @@ int main(int argc, char **argv)
|
||||
char input_val_str[50],input_val_str2[50];
|
||||
// double input_val1,input_val2;
|
||||
// uint16_t amask=0;
|
||||
uint8_t frame_mod4,num_pdcch_symbols;
|
||||
uint8_t frame_mod4,num_pdcch_symbols = 0;
|
||||
uint16_t NB_RB=25;
|
||||
|
||||
SCM_t channel_model=AWGN;//Rayleigh1_anticorr;
|
||||
|
||||
DCI_ALLOC_t dci_alloc[8];
|
||||
//DCI_ALLOC_t dci_alloc[8];
|
||||
uint8_t abstraction_flag=0;//,calibration_flag=0;
|
||||
double pbch_sinr;
|
||||
int pbch_tx_ant;
|
||||
@@ -782,7 +782,10 @@ 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);
|
||||
if (fscanf(input_fd,"%s %s",input_val_str,input_val_str2) != 2) { //&input_val1,&input_val2);
|
||||
printf("%s:%d:%s: error with fscanf, exiting\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((i%4)==0) {
|
||||
((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL));
|
||||
|
||||
@@ -67,9 +67,9 @@ DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2
|
||||
uint32_t UL_alloc_pdu[2];
|
||||
|
||||
int i;
|
||||
int dci_length_bytes,dci_length;
|
||||
int BCCH_pdu_size_bits, BCCH_pdu_size_bytes;
|
||||
int UL_pdu_size_bits, UL_pdu_size_bytes;
|
||||
int dci_length_bytes=0,dci_length=0;
|
||||
int BCCH_pdu_size_bits=0, BCCH_pdu_size_bytes=0;
|
||||
int UL_pdu_size_bits=0, UL_pdu_size_bytes=0;
|
||||
int mcs = 3;
|
||||
|
||||
DCI_pdu.Num_ue_spec_dci = 0;
|
||||
@@ -789,6 +789,11 @@ int main(int argc, char **argv)
|
||||
while (!feof(input_fd)) {
|
||||
ret=fscanf(input_fd,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2);
|
||||
|
||||
if (ret != 2) {
|
||||
printf("%s:%d:%s: fscanf error, exiting\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((i%4)==0) {
|
||||
((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL));
|
||||
((short*)txdata[0])[(i/2)+1] = (short)((1<<15)*strtod(input_val_str2,NULL));
|
||||
|
||||
@@ -58,6 +58,8 @@ PHY_VARS_UE *PHY_vars_UE;
|
||||
|
||||
extern uint16_t prach_root_sequence_map0_3[838];
|
||||
|
||||
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@@ -74,7 +76,7 @@ int main(int argc, char **argv)
|
||||
int **txdata;
|
||||
double **s_re,**s_im,**r_re,**r_im;
|
||||
double iqim=0.0;
|
||||
int trial, ntrials=1;
|
||||
int trial; //, ntrials=1;
|
||||
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
|
||||
uint16_t Nid_cell=0;
|
||||
|
||||
@@ -82,7 +84,7 @@ int main(int argc, char **argv)
|
||||
uint8_t hs_flag=0;
|
||||
int n_frames=1;
|
||||
channel_desc_t *UE2eNB;
|
||||
uint32_t nsymb,tx_lev,tx_lev_dB;
|
||||
uint32_t nsymb,tx_lev; //,tx_lev_dB;
|
||||
uint8_t extended_prefix_flag=0;
|
||||
// int8_t interf1=-19,interf2=-19;
|
||||
LTE_DL_FRAME_PARMS *frame_parms;
|
||||
@@ -101,8 +103,8 @@ int main(int argc, char **argv)
|
||||
uint16_t preamble_energy_list[64],preamble_tx=99,preamble_delay_list[64];
|
||||
uint16_t preamble_max,preamble_energy_max;
|
||||
PRACH_RESOURCES_t prach_resources;
|
||||
uint8_t prach_fmt;
|
||||
int N_ZC;
|
||||
//uint8_t prach_fmt;
|
||||
//int N_ZC;
|
||||
int delay = 0;
|
||||
double delay_avg=0;
|
||||
double ue_speed = 0;
|
||||
@@ -126,7 +128,8 @@ int main(int argc, char **argv)
|
||||
case 'a':
|
||||
printf("Running AWGN simulation\n");
|
||||
awgn_flag = 1;
|
||||
ntrials=1;
|
||||
/* ntrials not used later, no need to set */
|
||||
//ntrials=1;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
@@ -405,9 +408,11 @@ int main(int argc, char **argv)
|
||||
PHY_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag=hs_flag;
|
||||
PHY_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;
|
||||
|
||||
prach_fmt = get_prach_fmt(PHY_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
PHY_vars_eNB->lte_frame_parms.frame_type);
|
||||
N_ZC = (prach_fmt <4)?839:139;
|
||||
/* N_ZC not used later, so prach_fmt is also useless, don't set */
|
||||
//prach_fmt = get_prach_fmt(PHY_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
// PHY_vars_eNB->lte_frame_parms.frame_type);
|
||||
/* N_ZC not used later, no need to set */
|
||||
//N_ZC = (prach_fmt <4)?839:139;
|
||||
|
||||
compute_prach_seq(&PHY_vars_eNB->lte_frame_parms.prach_config_common,PHY_vars_eNB->lte_frame_parms.frame_type,PHY_vars_eNB->X_u);
|
||||
|
||||
@@ -431,7 +436,8 @@ int main(int argc, char **argv)
|
||||
subframe,
|
||||
0); //Nf
|
||||
|
||||
tx_lev_dB = (unsigned int) dB_fixed(tx_lev);
|
||||
/* tx_lev_dB not used later, no need to set */
|
||||
//tx_lev_dB = (unsigned int) dB_fixed(tx_lev);
|
||||
|
||||
write_output("txsig0_new.m","txs0", &txdata[0][subframe*frame_parms->samples_per_tti],frame_parms->samples_per_tti,1,1);
|
||||
//write_output("txsig1.m","txs1", txdata[1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
|
||||
|
||||
Reference in New Issue
Block a user