Commit 293110e2 authored by knopp's avatar knopp

cleanup of warnings and default parameters for simulator target

parent 897de9f8
......@@ -368,7 +368,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
if (dci_alloc[i].L == (uint8_t)L) {
LOG_I(PHY,"Generating DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x), rnti %x\n",
LOG_D(PHY,"Generating DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x), rnti %x\n",
i,num_dci,dci_alloc[i].firstCCE,dci_alloc[i].dci_length,dci_alloc[i].L,
*(unsigned int*)dci_alloc[i].dci_pdu,
dci_alloc[i].rnti);
......
......@@ -3481,13 +3481,13 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
ulsch->harq_processes[harq_pid]->nb_rb = RIV2nb_rb_LUT[rballoc];
if (ue->ul_power_control_dedicated[eNB_id].accumulationEnabled == 1) {
LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d: f_pusch (ACC) %d, adjusting by %d (TPC %d)\n",
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d: f_pusch (ACC) %d, adjusting by %d (TPC %d)\n",
ue->Mod_id,harq_pid,proc->frame_rx,subframe,ulsch->f_pusch,
delta_PUSCH_acc[ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC],
ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC);
ulsch->f_pusch += delta_PUSCH_acc[ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC];
} else {
LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d: f_pusch (ABS) %d, adjusting to %d (TPC %d)\n",
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d: f_pusch (ABS) %d, adjusting to %d (TPC %d)\n",
ue->Mod_id,harq_pid,proc->frame_rx,subframe,ulsch->f_pusch,
delta_PUSCH_abs[ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC],
ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC);
......
......@@ -1899,7 +1899,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
LOG_D(PHY,"[DCI search nPdcch %d - common] Attempting candidate %d Aggregation Level %d DCI length %d at CCE %d/%d (CCEmap %x,CCEmap_cand %x)\n",
pdcch_vars[eNB_id]->num_pdcch_symbols,m,L2,sizeof_bits,CCEind,nCCE,*CCEmap,CCEmap_mask);
else
LOG_I(PHY,"[DCI search nPdcch %d - ue spec %x] Attempting candidate %d Aggregation Level %d DCI length %d at CCE %d/%d (CCEmap %x,CCEmap_cand %x) format %d\n",
LOG_D(PHY,"[DCI search nPdcch %d - ue spec %x] Attempting candidate %d Aggregation Level %d DCI length %d at CCE %d/%d (CCEmap %x,CCEmap_cand %x) format %d\n",
pdcch_vars[eNB_id]->num_pdcch_symbols,pdcch_vars[eNB_id]->crnti,m,L2,sizeof_bits,CCEind,nCCE,*CCEmap,CCEmap_mask,format_c);
dci_decoding(sizeof_bits,
......
......@@ -544,11 +544,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
// num_pdcch_symbols = DCI_pdu->num_pdcch_symbols;
num_pdcch_symbols = eNB->pdcch_vars[subframe&1].num_pdcch_symbols;
num_dci = eNB->pdcch_vars[subframe&1].num_dci;
// LOG_D(PHY,"num_pdcch_symbols %"PRIu8",(dci common %"PRIu8", dci uespec %"PRIu8"\n",num_pdcch_symbols,
// DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
LOG_D(PHY,"num_pdcch_symbols %"PRIu8",number dci %"PRIu8"\n",num_pdcch_symbols, num_dci);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,num_pdcch_symbols);
......@@ -556,9 +553,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,(frame*10)+subframe);
if (num_dci > 0)
LOG_I(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols);
LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols);
//LOG_D(PHY,"Before generate_dci_top num_pdcch_symbols:%d num_dci:%d dci_alloc:dci_length:%d\n", num_pdcch_symbols, num_dci, eNB->pdcch_vars[subframe&1].dci_alloc[0].dci_length);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,1);
......
......@@ -2786,7 +2786,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
uint8_t next1_thread_id = ue->current_thread_id[subframe_rx]== (RX_NB_TH-1) ? 0:(ue->current_thread_id[subframe_rx]+1);
uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1);
LOG_I(PHY,"DCI Decoding procedure in %d.%d\n",frame_rx,subframe_rx);
LOG_D(PHY,"DCI Decoding procedure in %d.%d\n",frame_rx,subframe_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_IN);
#if UE_TIMING_TRACE
start_meas(&ue->dlsch_rx_pdcch_stats);
......@@ -2849,7 +2849,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
LOG_D(PHY,"current_thread %d next1_thread %d next2_thread %d \n", ue->current_thread_id[subframe_rx], next1_thread_id, next2_thread_id);
LOG_I(PHY,"[UE %d] AbsSubFrame %d.%d, Mode %s: DCI found %i --> rnti %x / crnti %x : format %d\n",
LOG_D(PHY,"[UE %d] AbsSubFrame %d.%d, Mode %s: DCI found %i --> rnti %x / crnti %x : format %d\n",
ue->Mod_id,frame_rx%1024,subframe_rx,mode_string[ue->UE_mode[eNB_id]],
dci_cnt,
dci_alloc_rx[0].rnti,
......
......@@ -114,7 +114,7 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
else if (ue->ulsch[eNB_id]->PHR > 40)
ue->ulsch[eNB_id]->PHR = 40;
LOG_I(PHY,"[UE %d][PUSCH %d] AbsSubframe %d.%d: nb_rb: %d, Po_PUSCH %d dBm : tx power max %d , Po_NOMINAL_PUSCH %d,log10(NPRB) %f,PHR %d, PL %d, alpha*PL %f,delta_IF %f,f_pusch %d\n",
LOG_D(PHY,"[UE %d][PUSCH %d] AbsSubframe %d.%d: nb_rb: %d, Po_PUSCH %d dBm : tx power max %d , Po_NOMINAL_PUSCH %d,log10(NPRB) %f,PHR %d, PL %d, alpha*PL %f,delta_IF %f,f_pusch %d\n",
ue->Mod_id,harq_pid,proc->frame_tx,proc->subframe_tx,nb_rb,
ue->ulsch[eNB_id]->Po_PUSCH,
ue->tx_power_max_dBm,
......
......@@ -38,12 +38,7 @@ void adc(double *r_re[2],
for (aa=0; aa<nb_rx_antennas; aa++) {
((short *)output[aa])[((i+output_offset)<<1)] = (short)(r_re[aa][i+input_offset]*gain);
((short *)output[aa])[1+((i+output_offset)<<1)] = (short)(r_im[aa][i+input_offset]*gain);
if ((r_re[aa][i+input_offset]*gain) > 30000) {
//("Adc outputs %d %e %d \n",i,((short *)output[0])[((i+output_offset)<<1)], ((i+output_offset)<<1) );
}
}
//printf("Adc outputs %d %e %d \n",i,((short *)output[0])[((i+output_offset)<<1)], ((i+output_offset)<<1) );
}
}
......@@ -26,7 +26,7 @@
#include "rf.h"
void dac(double *s_re[2],
double *s_im[2],
uint32_t **input,
int32_t **input,
uint32_t input_offset,
uint32_t nb_tx_antennas,
uint32_t length,
......@@ -76,7 +76,7 @@ void dac(double *s_re[2],
double dac_fixed_gain(double *s_re[2],
double *s_im[2],
uint32_t **input,
int32_t **input,
uint32_t input_offset,
uint32_t nb_tx_antennas,
uint32_t length,
......
......@@ -69,14 +69,14 @@ void adc(double *r_re[2],
double *r_im[2],
unsigned int input_offset,
unsigned int output_offset,
int **output,
int32_t **output,
unsigned int nb_rx_antennas,
unsigned int length,
unsigned char B);
void dac(double *s_re[2],
double *s_im[2],
unsigned int **input,
int32_t **input,
unsigned int input_offset,
unsigned int nb_tx_antennas,
unsigned int length,
......@@ -87,7 +87,7 @@ void dac(double *s_re[2],
double dac_fixed_gain(double *s_re[2],
double *s_im[2],
unsigned int **input,
int32_t **input,
unsigned int input_offset,
unsigned int nb_tx_antennas,
unsigned int length,
......
......@@ -45,7 +45,7 @@
#include "UTIL/FIFO/types.h"
#define RF
#define DEBUG_SIM
//#define DEBUG_SIM
/*
#undef LOG_D
#define LOG_D(A,B,C...) printf(B,C)
......@@ -77,17 +77,15 @@ void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM
int CC_id)
{
int32_t att_eNB_id=-1;
int32_t **txdata,**rxdata;
uint32_t eNB_id,ru_id=0;
uint32_t ru_id=0;
double tx_pwr;
double rx_pwr;
int32_t rx_pwr2;
uint32_t i,aa;
uint32_t sf_offset;
double min_path_loss=-200;
uint8_t hold_channel=0;
uint8_t nb_antennas_rx = RU2UE[0][0][CC_id]->nb_rx; // number of rx antennas at UE
uint8_t nb_antennas_tx = RU2UE[0][0][CC_id]->nb_tx; // number of tx antennas at eNB
......@@ -460,11 +458,11 @@ void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM
1e3/UE2RU[0][ru_id][CC_id]->sampling_rate, // sampling time (ns)
(double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx - 66.227); // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
//#ifdef DEBUG_SIM
#ifdef DEBUG_SIM
rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,frame_parms->samples_per_tti,0);//*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL;
LOG_D(OCM,"[SIM][UL] rx_pwr (ADC in) %f dB for subframe %d (rx_gain %f)\n",10*log10(rx_pwr),subframe,
(double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx);
//#endif
#endif
rxdata = RC.ru[ru_id]->common.rxdata;
sf_offset = subframe*frame_parms->samples_per_tti;
......
......@@ -373,6 +373,18 @@ void multipath_tv_channel(channel_desc_t *desc,
double N_RB2sampling_rate(uint16_t N_RB);
double N_RB2channel_bandwidth(uint16_t N_RB);
void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs],
uint16_t subframe,
uint32_t offset,
uint32_t length,
uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *ue_frame_parms,
uint8_t UE_id,
int CC_id);
void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs],
uint16_t subframe,uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame,int ru_id,uint8_t CC_id);
#endif
......@@ -2895,7 +2895,7 @@ allocate_CCEs(int module_idP, int CC_idP, int subframeP, int test_onlyP)
// allocate UL DCIs
if (hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) {
LOG_I(MAC,
LOG_D(MAC,
"Trying to allocate format 0 DCI %d/%d (%d,%d) : rnti %x, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n",
idci, DL_req->number_dci + HI_DCI0_req->number_of_dci,
DL_req->number_dci, HI_DCI0_req->number_of_dci,
......@@ -2964,10 +2964,10 @@ allocate_CCEs(int module_idP, int CC_idP, int subframeP, int test_onlyP)
// the allocation is feasible, rnti rule passes
nCCE += hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.aggregation_level;
LOG_I(MAC, "Allocating at nCCE %d\n", fCCE);
LOG_D(MAC, "Allocating at nCCE %d\n", fCCE);
if (test_onlyP == 0) {
hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.cce_index = fCCE;
LOG_I(MAC, "Allocate CCEs subframe %d, test %d\n",
LOG_D(MAC, "Allocate CCEs subframe %d, test %d\n",
subframeP, test_onlyP);
}
idci++;
......
......@@ -156,7 +156,7 @@ rx_sdu(const module_id_t enb_mod_idP,
}
if (UE_id != -1) {
LOG_I(MAC,
LOG_D(MAC,
"[eNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
enb_mod_idP, harq_pid, CC_idP,frameP,subframeP,
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
......@@ -1302,7 +1302,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
}
//tpc = 1;
if (tpc != 1) {
LOG_I(MAC,
LOG_D(MAC,
"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n",
module_idP, frameP, subframeP, harq_pid, tpc,
tpc_accumulated, normalized_rx_power,
......@@ -1459,7 +1459,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
CC_id, UE_id, subframeP,
S_UL_SCHEDULED);
LOG_I(MAC, "[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n", module_idP, CC_id, frameP, subframeP, UE_id);
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n", module_idP, CC_id, frameP, subframeP, UE_id);
LOG_D(MAC,"[PUSCH %d] SFN/SF:%04d%d UL_CFG:SFN/SF:%04d%d CQI:%d for UE %d/%x\n", harq_pid,frameP,subframeP,ul_sched_frame,ul_sched_subframeP,cqi_req,UE_id,rnti);
// increment first rb for next UE allocation
......
......@@ -18,7 +18,7 @@ RUs = (
);
log_config = {
global_log_level ="debug";
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
......
......@@ -134,7 +134,7 @@
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_UEPARAMS_DESC { \
{"siml1", CONFIG_HLP_SIML1, PARAMFLAG_BOOL, iptr:&simL1flag, defintval:0, TYPE_INT, 0}, \
{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:130, TYPE_DOUBLE, 0}, \
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \
{"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&nb_antenna_rx, defuintval:1, TYPE_UINT8, 0}, \
......@@ -184,7 +184,7 @@
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"s" , CONFIG_HLP_SNR, PARAMFLAG_BOOL, iptr:&snr_dB, defintval:25, TYPE_INT, 0}, \
{"s" , CONFIG_HLP_SNR, 0, iptr:&snr_dB, defintval:25, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
{"codingw" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \
......@@ -288,6 +288,10 @@ extern void init_te_thread(PHY_VARS_eNB *);
extern void kill_td_thread(PHY_VARS_eNB *);
extern void kill_te_thread(PHY_VARS_eNB *);
extern void RCConfig_sim(void);
extern void init_ocm(double,double);
extern void init_ue_devices(void);
PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id,
uint8_t abstraction_flag);
......@@ -296,4 +300,11 @@ void init_eNB_afterRU(void);
extern int stop_L1L2(module_id_t enb_id);
extern int restart_L1L2(module_id_t enb_id);
extern void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface);
extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id,
uint8_t abstraction_flag);
#endif
......@@ -157,7 +157,7 @@ static char *itti_dump_file = NULL;
int UE_scan = 1;
int UE_scan_carrier = 0;
int simL1flag = 0;
int snr_dB=15;
int snr_dB=25;
runmode_t mode = normal_txrx;
......@@ -167,11 +167,11 @@ FILE *input_fd=NULL;
#if MAX_NUM_CCs == 1
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{130,0,0,0}};
#else
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain},{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0},{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0},{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{130,0,0,0},{20,0,0,0}};
#endif
double rx_gain_off = 0.0;
......@@ -215,9 +215,6 @@ uint8_t exit_missed_slots=1;
uint64_t num_missed_slots=0; // counter for the number of missed slots
extern void init_ue_devices();
extern void reset_opp_meas(void);
extern void print_opp_meas(void);
extern void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface);
extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
......@@ -575,7 +572,6 @@ static void get_options(void) {
for (CC_id=1;CC_id<MAX_NUM_CCs;CC_id++) {
tx_max_power[CC_id]=tx_max_power[0];
rx_gain[0][CC_id] = rx_gain[0][0];
tx_gain[0][CC_id] = tx_gain[0][0];
}
......@@ -782,7 +778,6 @@ int restart_L1L2(module_id_t enb_id)
int main( int argc, char **argv )
{
int i;
#if defined (XFORMS)
void *status;
#endif
......@@ -812,7 +807,6 @@ int main( int argc, char **argv )
mode = normal_txrx;
memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS);
memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
set_latency_target();
......@@ -820,8 +814,12 @@ int main( int argc, char **argv )
printf("Reading in command-line options\n");
for (int i=0;i<MAX_NUM_CCs;i++) tx_max_power[i]=23;
get_options ();
printf("NFAPI_MODE value: %d \n", nfapi_mode);
// Panos: Not sure if the following is needed here
......@@ -943,7 +941,6 @@ int main( int argc, char **argv )
PHY_vars_UE_g[i] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
PHY_vars_UE_g[i][CC_id] = init_ue_vars(frame_parms[CC_id], i,abstraction_flag);
PHY_vars_UE_g[i][CC_id];
if (phy_test==1)
PHY_vars_UE_g[i][CC_id]->mac_enabled = 0;
......
......@@ -79,7 +79,7 @@ pthread_t rfsim_thread;
void init_ru_devices(void);
void init_RU(const char*);
void rfsim_top(void *n_frames);
void *rfsim_top(void *n_frames);
void wait_RUs(void)
{
......@@ -348,7 +348,7 @@ int ru_trx_write(openair0_device *device,openair0_timestamp timestamp, void **bu
}
ru_amp[ru_id] = sqrt(ru_amp[ru_id]);
LOG_I(PHY,"Setting amp for RU %d to %f (%d)\n",ru_id,ru_amp[ru_id], dB_fixed((double)signal_energy((int32_t*)buff[0],frame_parms->ofdm_symbol_size)));
LOG_D(PHY,"Setting amp for RU %d to %f (%d)\n",ru_id,ru_amp[ru_id], dB_fixed((double)signal_energy((int32_t*)buff[0],frame_parms->ofdm_symbol_size)));
// tell top-level we are done
pthread_mutex_lock(&subframe_mutex);
subframe_ru_mask|=(1<<ru_id);
......@@ -390,11 +390,11 @@ void init_ru_devices(){
}
}
init_ue_devices() {
void init_ue_devices() {
AssertFatal(PHY_vars_UE_g!=NULL,"Top-level structure for UE is null\n");
for (int UE_id=0;UE_id<NB_UE_INST;UE_id++) {
AssertFatal(PHY_vars_UE_g[UE_id]!=NULL,"UE %d context is not allocated\n");
AssertFatal(PHY_vars_UE_g[UE_id]!=NULL,"UE %d context is not allocated\n",UE_id);
printf("Initializing UE %d\n",UE_id);
for (int CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.Mod_id = UE_id;
......@@ -469,7 +469,7 @@ void init_ocm(double snr_dB,double sinr_dB)
UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
}
LOG_D(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",ru_id,UE_id,CC_id,
LOG_I(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",ru_id,UE_id,CC_id,
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB,
RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower,snr_dB);
......@@ -528,7 +528,7 @@ void init_channel_vars(void)
void rfsim_top(void *n_frames) {
void *rfsim_top(void *n_frames) {
wait_sync("rfsim_top");
......@@ -552,7 +552,7 @@ void rfsim_top(void *n_frames) {
LOG_D(SIM,"Frame %d, Subframe %d, NB_RU %d, NB_UE %d: Checking masks %x,%x\n",frame,sf,RC.nb_RU,NB_UE_INST,subframe_ru_mask_local,subframe_UE_mask_local);
if ((subframe_ru_mask_local == ((1<<RC.nb_RU)-1)) &&
(subframe_UE_mask_local == ((1<<NB_UE_INST)-1))) all_done=1;
else usleep(1500);
else usleep(100);
}
......@@ -571,8 +571,9 @@ void rfsim_top(void *n_frames) {
current_UE_rx_timestamp[UE_inst][CC_id] += PHY_vars_UE_g[UE_inst][CC_id]->frame_parms.samples_per_tti;
LOG_D(SIM,"UE %d/%d: TS %"PRIi64"\n",UE_inst,CC_id,current_UE_rx_timestamp[UE_inst][CC_id]);
}
if (oai_exit == 1) return;
if (oai_exit == 1) return((void*)NULL);
}
}
return((void*)NULL);
}
......@@ -25,3 +25,4 @@ void init_ocm(double snr_dB,double sinr_dB);
void update_ocm(double snr_dB,double sinr_dB);
void init_channel_vars(void);
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