Commit 422f3008 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into bugfix-51-mscgen

parents 28b73955 3d0ad079
...@@ -9,13 +9,13 @@ RRC_Rel10=( ...@@ -9,13 +9,13 @@ RRC_Rel10=(
X2AP_Rel11_2=( X2AP_Rel11_2=(
"X2ap-CriticalityDiagnostics-IE-List.h" ae96308b37fcbcbf39da5012e42968135fc5f27b "fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff" "X2ap-CriticalityDiagnostics-IE-List.h" ae96308b37fcbcbf39da5012e42968135fc5f27b "fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff"
"NativeInteger.c" 9f173e87daa1e7378618dbb060a10aae752d74be "fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff" "NativeInteger.c" 1a55f5402fd363318cf5444ffe1f67530dcf66ff "fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff"
"constr_SET_OF.c" 5c8765a1e0fc44a48e406d0aa7628004bf3aac2a "fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff" "constr_SET_OF.c" 808cbbdf19b118c0bdb04e3acf2cbe6e4133be2b "fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff"
) )
S1AP_Rel10_5=( S1AP_Rel10_5=(
"NativeInteger.c" 9f173e87daa1e7378618dbb060a10aae752d74be "fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff" "NativeInteger.c" 1a55f5402fd363318cf5444ffe1f67530dcf66ff "fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff"
"constr_SET_OF.c" 5c8765a1e0fc44a48e406d0aa7628004bf3aac2a "fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff" "constr_SET_OF.c" 808cbbdf19b118c0bdb04e3acf2cbe6e4133be2b "fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff"
) )
red_color="$(tput setaf 1)" red_color="$(tput setaf 1)"
......
...@@ -177,7 +177,6 @@ hashtable_rc_t hashtable_dump_content (const hash_table_t * const hashtblP, char ...@@ -177,7 +177,6 @@ hashtable_rc_t hashtable_dump_content (const hash_table_t * const hashtblP, char
{ {
hash_node_t *node = NULL; hash_node_t *node = NULL;
unsigned int i = 0; unsigned int i = 0;
unsigned int num_elements = 0;
if (hashtblP == NULL) { if (hashtblP == NULL) {
*remaining_bytes_in_buffer_pP = snprintf( *remaining_bytes_in_buffer_pP = snprintf(
buffer_pP, buffer_pP,
......
...@@ -54,7 +54,9 @@ uint64_t vcd_mp_free; ...@@ -54,7 +54,9 @@ uint64_t vcd_mp_free;
#endif #endif
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#ifndef CHARS_TO_UINT32
#define CHARS_TO_UINT32(c1, c2, c3, c4) (((c1) << 24) | ((c2) << 16) | ((c3) << 8) | (c4)) #define CHARS_TO_UINT32(c1, c2, c3, c4) (((c1) << 24) | ((c2) << 16) | ((c3) << 8) | (c4))
#endif
#define MEMORY_POOL_ITEM_INFO_NUMBER 2 #define MEMORY_POOL_ITEM_INFO_NUMBER 2
......
...@@ -128,8 +128,8 @@ void phy_config_sib2_eNB(uint8_t Mod_id, ...@@ -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_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; //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; //int32_t rx_total_gain_eNB_dB = PHY_vars_eNB_g[Mod_id][CC_id]->rx_total_gain_eNB_dB;
int i; 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); 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, ...@@ -683,11 +683,11 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
int CC_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]); 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 PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10;
//struct RadioResourceConfigCommonSCell_r10 *physicalConfigCommonSCell_r10 = sCellToAddMod_r10->radioResourceConfigCommonSCell_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; ARFCN_ValueEUTRA_t dl_CarrierFreq_r10 = sCellToAddMod_r10->cellIdentification_r10->dl_CarrierFreq_r10;
uint32_t carrier_freq_local; uint32_t carrier_freq_local;
...@@ -733,7 +733,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, ...@@ -733,7 +733,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
} }
if (physicalConfigDedicatedSCell_r10) { 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; // 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); 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 { } else {
......
...@@ -48,15 +48,15 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB, ...@@ -48,15 +48,15 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
LTE_eNB_COMMON *eNB_common_vars = &phy_vars_eNB->lte_eNB_common_vars; 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; 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]; 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 *rb_mask = phy_vars_eNB->rb_mask_ul;
uint32_t aarx,rx_power_correction; uint32_t aarx /* ,rx_power_correction */;
uint32_t rb; uint32_t rb;
int32_t *ul_ch; int32_t *ul_ch;
int32_t n0_power_tot; int32_t n0_power_tot;
int len; int len;
int offset; int offset;
int Nsymb = (frame_parms->Ncp==NORMAL)?14:12; //int Nsymb = (frame_parms->Ncp==NORMAL)?14:12;
// noise measurements // noise measurements
// for the moment we measure the noise on the 7th OFDM symbol (in S subframe) // for the moment we measure the noise on the 7th OFDM symbol (in S subframe)
......
...@@ -572,7 +572,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue, ...@@ -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) // 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__) #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_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]; dl_ch1_128 = (__m128i *)&phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_id][2+aarx][4];
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "PHY/CODING/extern.h" #include "PHY/CODING/extern.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_TRANSPORT/defs.h" #include "PHY/LTE_TRANSPORT/defs.h"
#include "SCHED/defs.h"
#include "defs.h" #include "defs.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
......
...@@ -65,10 +65,12 @@ ...@@ -65,10 +65,12 @@
//use msg in the real-time thread context //use msg in the real-time thread context
#define msg_nrt printf #define msg_nrt printf
//use msg_nrt in the non real-time context (for initialization, ...) //use msg_nrt in the non real-time context (for initialization, ...)
#ifdef __AVX2__ #ifndef malloc16
#define malloc16(x) memalign(32,x) # ifdef __AVX2__
#else # define malloc16(x) memalign(32,x)
#define malloc16(x) memalign(16,x) # else
# define malloc16(x) memalign(16,x)
# endif
#endif #endif
#define free16(y,x) free(y) #define free16(y,x) free(y)
#define bigmalloc malloc #define bigmalloc malloc
......
...@@ -54,11 +54,11 @@ void fill_dci(DCI_PDU *DCI_pdu, uint8_t sched_subframe, PHY_VARS_eNB *phy_vars_e ...@@ -54,11 +54,11 @@ void fill_dci(DCI_PDU *DCI_pdu, uint8_t sched_subframe, PHY_VARS_eNB *phy_vars_e
{ {
int i; 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]; uint8_t transmission_mode = phy_vars_eNB->transmission_mode[0];
uint32_t rballoc = 0x7FFF; uint32_t rballoc = 0x7FFF;
uint32_t rballoc2 = 0x000F; //uint32_t rballoc2 = 0x000F;
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_tx; int subframe = phy_vars_eNB->proc[sched_subframe].subframe_tx;
LTE_eNB_DLSCH_t *DLSCH_ptr = phy_vars_eNB->dlsch_eNB[0][0]; LTE_eNB_DLSCH_t *DLSCH_ptr = phy_vars_eNB->dlsch_eNB[0][0];
...@@ -585,7 +585,7 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *phy_vars_eN ...@@ -585,7 +585,7 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *phy_vars_eN
{ {
int i; 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]; uint8_t transmission_mode = phy_vars_eNB->transmission_mode[0];
//uint32_t rballoc = 0x00F0; //uint32_t rballoc = 0x00F0;
......
...@@ -612,6 +612,7 @@ void phy_eNB_lte_check_measurement_thresholds(instance_t instanceP, ral_threshol ...@@ -612,6 +612,7 @@ void phy_eNB_lte_check_measurement_thresholds(instance_t instanceP, ral_threshol
#endif #endif
unsigned int taus(void);
void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_flag, 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) relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn)
...@@ -1822,6 +1823,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -1822,6 +1823,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
stop_meas(&phy_vars_eNB->phy_proc_tx); 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) void process_Msg3(PHY_VARS_eNB *phy_vars_eNB,uint8_t sched_subframe,uint8_t UE_id, uint8_t harq_pid)
...@@ -2493,6 +2495,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ ...@@ -2493,6 +2495,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
} }
sect_id = 0; sect_id = 0;
(void)sect_id; /* remove gcc warning "set but not used" */
/* /*
for (UE_id=0;UE_id<NUMBER_OF_UE_MAX;UE_id++) { for (UE_id=0;UE_id<NUMBER_OF_UE_MAX;UE_id++) {
...@@ -3604,6 +3607,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ ...@@ -3604,6 +3607,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
} // loop i=0 ... NUMBER_OF_UE_MAX-1 } // loop i=0 ... NUMBER_OF_UE_MAX-1
(void)pusch_active; /* remove gcc warning "set but not used" */
// if (pusch_active == 0) { // if (pusch_active == 0) {
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
// LOG_D(PHY,"[eNB] Frame %d, subframe %d Doing I0_measurements\n", // LOG_D(PHY,"[eNB] Frame %d, subframe %d Doing I0_measurements\n",
......
...@@ -902,6 +902,8 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -902,6 +902,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++) for (i=0; i<input_buffer_length; i++)
ulsch_input_buffer[i]= (uint8_t)(taus()&0xff); 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 ...@@ -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; 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)) // P_pucch = P_opucch+ PL + h(nCQI,nHARQ) + delta_pucchF(pucch_fmt) + g(i))
// //
if ((pucch_fmt == pucch_format1a) || //if ((pucch_fmt == pucch_format1a) ||
(pucch_fmt == pucch_format1b)) { // Update g_pucch based on TPC/delta_PUCCH received in PDCCH for this process // (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; //harq_pid = phy_vars_ue->dlsch_ue[eNB_id][0]->harq_ack[subframe].harq_id;
//this is now done in dci_tools //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; //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)+ 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+ 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, ...@@ -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; //(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 ); 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 ); //DevAssert( MPR_x100/6 < 100 );
if (phy_vars_eNB->ul_power_control_dedicated[UE_id].deltaMCS_Enabled == 1) { 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, ...@@ -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); 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); memcpy(&UE_transport_info[n_ue][CC_id], UE_info, total_header + total_tbs);
/* Go to the next UE info */ /* 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 ...@@ -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; LTE_eNB_DLSCH_t *dlsch_eNB;
unsigned short ue_id; unsigned short ue_id;
uint8_t nb_total_dci; uint8_t nb_total_dci;
int i;
// eNB // eNB
// PBCH : copy payload // PBCH : copy payload
......
...@@ -220,7 +220,7 @@ int main(int argc, char **argv) ...@@ -220,7 +220,7 @@ int main(int argc, char **argv)
uint8_t N_RB_DL=25,osf=1; uint8_t N_RB_DL=25,osf=1;
frame_t frame_type = FDD; frame_t frame_type = FDD;
int xforms=0; int xforms=0;
FD_lte_phy_scope_ue *form_ue; FD_lte_phy_scope_ue *form_ue = NULL;
char title[255]; char title[255];
uint32_t DLSCH_RB_ALLOC = 0x1fff; uint32_t DLSCH_RB_ALLOC = 0x1fff;
int numCCE=0; int numCCE=0;
...@@ -2624,6 +2624,8 @@ PMI_FEEDBACK: ...@@ -2624,6 +2624,8 @@ PMI_FEEDBACK:
num_pdcch_symbols, num_pdcch_symbols,
PHY_vars_eNB->dlsch_eNB[k][0], PHY_vars_eNB->dlsch_eNB[k][0],
PHY_vars_eNB->dlsch_eNB[k][1]); PHY_vars_eNB->dlsch_eNB[k][1]);
/* avoid gcc warnings */
(void)re_allocated;
stop_meas(&PHY_vars_eNB->dlsch_modulation_stats); stop_meas(&PHY_vars_eNB->dlsch_modulation_stats);
/* /*
......
...@@ -583,10 +583,10 @@ int main(int argc, char **argv) ...@@ -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,errs[0],
mcs,N_RB_DL,mcs,N_RB_DL,trials); mcs,N_RB_DL,mcs,N_RB_DL,trials);
else 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", 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",
mcs,N_RB_DL,mcs,N_RB_DL,SNR, N_RB_DL,N_RB_DL,SNR,
mcs,N_RB_DL,mcs,N_RB_DL,errs[0], N_RB_DL,N_RB_DL,errs[0],
mcs,N_RB_DL,mcs,N_RB_DL,trials); N_RB_DL,N_RB_DL,trials);
fflush(fd); fflush(fd);
......
...@@ -80,9 +80,9 @@ int main(int argc, char **argv) ...@@ -80,9 +80,9 @@ int main(int argc, char **argv)
unsigned char pbch_pdu[6]; unsigned char pbch_pdu[6];
// int sync_pos, sync_pos_slot; // int sync_pos, sync_pos_slot;
// FILE *rx_frame_file; // FILE *rx_frame_file;
FILE *output_fd; FILE *output_fd = NULL;
uint8_t write_output_file=0; uint8_t write_output_file=0;
int result; //int result;
int freq_offset; int freq_offset;
// int subframe_offset; // int subframe_offset;
// char fname[40], vname[40]; // char fname[40], vname[40];
...@@ -91,8 +91,8 @@ int main(int argc, char **argv) ...@@ -91,8 +91,8 @@ int main(int argc, char **argv)
uint16_t Nid_cell=0; uint16_t Nid_cell=0;
int n_frames=1; int n_frames=1;
channel_desc_t *eNB2UE,*eNB2UE1,*eNB2UE2; channel_desc_t *eNB2UE,*eNB2UE1 = NULL,*eNB2UE2 = NULL;
uint32_t nsymb,tx_lev,tx_lev1,tx_lev2; uint32_t nsymb,tx_lev,tx_lev1 = 0,tx_lev2 = 0;
uint8_t extended_prefix_flag=0; uint8_t extended_prefix_flag=0;
int8_t interf1=-21,interf2=-21; int8_t interf1=-21,interf2=-21;
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
...@@ -104,12 +104,12 @@ int main(int argc, char **argv) ...@@ -104,12 +104,12 @@ int main(int argc, char **argv)
char input_val_str[50],input_val_str2[50]; char input_val_str[50],input_val_str2[50];
// double input_val1,input_val2; // double input_val1,input_val2;
// uint16_t amask=0; // uint16_t amask=0;
uint8_t frame_mod4,num_pdcch_symbols; uint8_t frame_mod4,num_pdcch_symbols = 0;
uint16_t NB_RB=25; uint16_t NB_RB=25;
SCM_t channel_model=AWGN;//Rayleigh1_anticorr; 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; uint8_t abstraction_flag=0;//,calibration_flag=0;
double pbch_sinr; double pbch_sinr;
int pbch_tx_ant; int pbch_tx_ant;
...@@ -782,7 +782,10 @@ int main(int argc, char **argv) ...@@ -782,7 +782,10 @@ int main(int argc, char **argv)
i=0; i=0;
while (!feof(input_fd)) { 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) { if ((i%4)==0) {
((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL)); ((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 ...@@ -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]; uint32_t UL_alloc_pdu[2];
int i; int i;
int dci_length_bytes,dci_length; int dci_length_bytes=0,dci_length=0;
int BCCH_pdu_size_bits, BCCH_pdu_size_bytes; int BCCH_pdu_size_bits=0, BCCH_pdu_size_bytes=0;
int UL_pdu_size_bits, UL_pdu_size_bytes; int UL_pdu_size_bits=0, UL_pdu_size_bytes=0;
int mcs = 3; int mcs = 3;
DCI_pdu.Num_ue_spec_dci = 0; DCI_pdu.Num_ue_spec_dci = 0;
...@@ -789,6 +789,11 @@ int main(int argc, char **argv) ...@@ -789,6 +789,11 @@ int main(int argc, char **argv)
while (!feof(input_fd)) { while (!feof(input_fd)) {
ret=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 (ret != 2) {
printf("%s:%d:%s: fscanf error, exiting\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
}
if ((i%4)==0) { if ((i%4)==0) {
((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL)); ((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)); ((short*)txdata[0])[(i/2)+1] = (short)((1<<15)*strtod(input_val_str2,NULL));
......
...@@ -58,6 +58,8 @@ PHY_VARS_UE *PHY_vars_UE; ...@@ -58,6 +58,8 @@ PHY_VARS_UE *PHY_vars_UE;
extern uint16_t prach_root_sequence_map0_3[838]; 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) int main(int argc, char **argv)
{ {
...@@ -74,7 +76,7 @@ int main(int argc, char **argv) ...@@ -74,7 +76,7 @@ int main(int argc, char **argv)
int **txdata; int **txdata;
double **s_re,**s_im,**r_re,**r_im; double **s_re,**s_im,**r_re,**r_im;
double iqim=0.0; double iqim=0.0;
int trial, ntrials=1; int trial; //, ntrials=1;
uint8_t transmission_mode = 1,n_tx=1,n_rx=1; uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
uint16_t Nid_cell=0; uint16_t Nid_cell=0;
...@@ -82,7 +84,7 @@ int main(int argc, char **argv) ...@@ -82,7 +84,7 @@ int main(int argc, char **argv)
uint8_t hs_flag=0; uint8_t hs_flag=0;
int n_frames=1; int n_frames=1;
channel_desc_t *UE2eNB; 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; uint8_t extended_prefix_flag=0;
// int8_t interf1=-19,interf2=-19; // int8_t interf1=-19,interf2=-19;
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
...@@ -101,8 +103,8 @@ int main(int argc, char **argv) ...@@ -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_energy_list[64],preamble_tx=99,preamble_delay_list[64];
uint16_t preamble_max,preamble_energy_max; uint16_t preamble_max,preamble_energy_max;
PRACH_RESOURCES_t prach_resources; PRACH_RESOURCES_t prach_resources;
uint8_t prach_fmt; //uint8_t prach_fmt;
int N_ZC; //int N_ZC;
int delay = 0; int delay = 0;
double delay_avg=0; double delay_avg=0;
double ue_speed = 0; double ue_speed = 0;
...@@ -126,7 +128,8 @@ int main(int argc, char **argv) ...@@ -126,7 +128,8 @@ int main(int argc, char **argv)
case 'a': case 'a':
printf("Running AWGN simulation\n"); printf("Running AWGN simulation\n");
awgn_flag = 1; awgn_flag = 1;
ntrials=1; /* ntrials not used later, no need to set */
//ntrials=1;
break; break;
case 'd': case 'd':
...@@ -404,9 +407,11 @@ int main(int argc, char **argv) ...@@ -404,9 +407,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.highSpeedFlag=hs_flag;
PHY_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset=0; 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, /* N_ZC not used later, so prach_fmt is also useless, don't set */
PHY_vars_eNB->lte_frame_parms.frame_type); //prach_fmt = get_prach_fmt(PHY_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
N_ZC = (prach_fmt <4)?839:139; // 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