changes for oaisim to function with new threading architecture and trx_read/trx_write emulation. Tested for 5/10 MHz TM1. Multiple-antenna mode fails.
This commit is contained in:
@@ -437,9 +437,14 @@ void do_UL_sig(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX_N
|
||||
txdata = PHY_vars_UE_g[UE_id][CC_id]->common_vars.txdata;
|
||||
sf_offset = subframe*frame_parms->samples_per_tti;
|
||||
|
||||
if (((double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm +
|
||||
if (((double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe] +
|
||||
UE2eNB[UE_id][eNB_id][CC_id]->path_loss_dB) <= -125.0) {
|
||||
// don't simulate a UE that is too weak
|
||||
LOG_D(OCM,"[SIM][UL] UE %d tx_pwr %d dBm (num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||
UE_id,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
|
||||
subframe,sf_offset);
|
||||
} else {
|
||||
|
||||
tx_pwr = dac_fixed_gain((double**)s_re,
|
||||
@@ -451,13 +456,13 @@ void do_UL_sig(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX_N
|
||||
sf_offset,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
14,
|
||||
(double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm-10*log10((double)PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE),
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE); // This make the previous argument the total power
|
||||
(double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe]-10*log10((double)PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]); // This make the previous argument the total power
|
||||
LOG_D(OCM,"[SIM][UL] UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||
UE_id,
|
||||
10*log10(tx_pwr),
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
|
||||
subframe,sf_offset);
|
||||
|
||||
|
||||
|
||||
+57
-30
@@ -139,8 +139,10 @@ node_desc_t *ue_data[NUMBER_OF_UE_MAX];
|
||||
|
||||
pthread_cond_t sync_cond;
|
||||
pthread_mutex_t sync_mutex;
|
||||
int sync_var;
|
||||
int sync_var=-1;
|
||||
|
||||
pthread_mutex_t subframe_mutex;
|
||||
int subframe_eNB_mask=0,subframe_UE_mask=0;
|
||||
|
||||
openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
@@ -451,6 +453,10 @@ typedef enum l2l1_task_state_e {
|
||||
|
||||
l2l1_task_state_t l2l1_state = L2L1_WAITTING;
|
||||
|
||||
extern openair0_timestamp current_eNB_rx_timestamp[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
|
||||
extern openair0_timestamp current_UE_rx_timestamp[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
void *
|
||||
l2l1_task (void *args_p)
|
||||
@@ -719,6 +725,40 @@ l2l1_task (void *args_p)
|
||||
|
||||
clear_eNB_transport_info (oai_emulation.info.nb_enb_local);
|
||||
|
||||
CC_id=0;
|
||||
int all_done=0;
|
||||
while (all_done==0) {
|
||||
pthread_mutex_lock(&subframe_mutex);
|
||||
int subframe_eNB_mask_local = subframe_eNB_mask;
|
||||
int subframe_UE_mask_local = subframe_UE_mask;
|
||||
pthread_mutex_unlock(&subframe_mutex);
|
||||
LOG_D(EMU,"Frame %d, Subframe %d: Checking masks %x,%x\n",frame,sf,subframe_eNB_mask,subframe_UE_mask);
|
||||
if ((subframe_eNB_mask_local == ((1<<NB_eNB_INST)-1)) &&
|
||||
(subframe_UE_mask_local == ((1<<NB_UE_INST)-1)))
|
||||
all_done=1;
|
||||
else
|
||||
usleep(500);
|
||||
}
|
||||
|
||||
//clear subframe masks for next round
|
||||
pthread_mutex_lock(&subframe_mutex);
|
||||
subframe_eNB_mask=0;
|
||||
subframe_UE_mask=0;
|
||||
pthread_mutex_unlock(&subframe_mutex);
|
||||
|
||||
// increment timestamps
|
||||
for (eNB_inst = oai_emulation.info.first_enb_local;
|
||||
(eNB_inst
|
||||
< (oai_emulation.info.first_enb_local
|
||||
+ oai_emulation.info.nb_enb_local));
|
||||
eNB_inst++) {
|
||||
current_eNB_rx_timestamp[eNB_inst][CC_id] += PHY_vars_eNB_g[eNB_inst][CC_id]->frame_parms.samples_per_tti;
|
||||
}
|
||||
for (UE_inst = 0; UE_inst<NB_UE_INST;UE_inst++) {
|
||||
current_UE_rx_timestamp[UE_inst][CC_id] += PHY_vars_UE_g[UE_inst][CC_id]->frame_parms.samples_per_tti;
|
||||
}
|
||||
|
||||
|
||||
for (eNB_inst = oai_emulation.info.first_enb_local;
|
||||
(eNB_inst
|
||||
< (oai_emulation.info.first_enb_local
|
||||
@@ -727,6 +767,7 @@ l2l1_task (void *args_p)
|
||||
if (oai_emulation.info.cli_start_enb[eNB_inst] != 0) {
|
||||
|
||||
T(T_ENB_MASTER_TICK, T_INT(eNB_inst), T_INT(frame % 1024), T_INT(sf));
|
||||
/*
|
||||
LOG_D(EMU,
|
||||
"PHY procedures eNB %d for frame %d, subframe %d TDD %d/%d Nid_cell %d\n",
|
||||
eNB_inst,
|
||||
@@ -736,7 +777,7 @@ l2l1_task (void *args_p)
|
||||
PHY_vars_eNB_g[eNB_inst][0]->frame_parms.tdd_config,
|
||||
PHY_vars_eNB_g[eNB_inst][0]->frame_parms.Nid_cell);
|
||||
|
||||
|
||||
*/
|
||||
#ifdef OPENAIR2
|
||||
//Application: traffic gen
|
||||
update_otg_eNB (eNB_inst, oai_emulation.info.time_ms);
|
||||
@@ -744,35 +785,8 @@ l2l1_task (void *args_p)
|
||||
//IP/OTG to PDCP and PDCP to IP operation
|
||||
// pdcp_run (frame, 1, 0, eNB_inst); //PHY_vars_eNB_g[eNB_id]->Mod_id
|
||||
#endif
|
||||
|
||||
|
||||
CC_id=0;
|
||||
// trigger synch event to RAN FH thread for CC_id
|
||||
eNB_proc_t *proc = &PHY_vars_eNB_g[eNB_inst][CC_id]->proc;
|
||||
|
||||
|
||||
if (pthread_mutex_lock(&proc->mutex_FH) != 0) {
|
||||
LOG_E( PHY, "error locking mutex for FH\n");
|
||||
exit_fun( "error locking mutex" );
|
||||
break;
|
||||
}
|
||||
int cnt_FH = ++proc->instance_cnt_FH;
|
||||
proc->frame_rx = frame;
|
||||
proc->subframe_rx = sf;
|
||||
proc->timestamp_rx += PHY_vars_eNB_g[eNB_inst][CC_id]->frame_parms.samples_per_tti;
|
||||
pthread_mutex_unlock( &proc->mutex_FH );
|
||||
|
||||
if (cnt_FH == 0) {
|
||||
if (pthread_cond_signal(&proc->cond_FH) != 0) {
|
||||
LOG_E(PHY,"ERROR pthread_cond_signal for eNB FH CCid %d\n",proc->CC_id);
|
||||
exit_fun("ERROR pthread_cond_signal");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG_W(PHY,"[eNB] Frame %d, FH CC_id %d thread busy!! (cnt_FH %d)\n",proc->instance_cnt_FH);
|
||||
exit_fun("FH thread busy");
|
||||
break;
|
||||
}
|
||||
#ifdef PRINT_STATS
|
||||
|
||||
if((sf==9) && frame%10==0)
|
||||
@@ -1099,6 +1113,10 @@ main (int argc, char **argv)
|
||||
sinr_dB = -20;
|
||||
}
|
||||
|
||||
pthread_cond_init(&sync_cond,NULL);
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
pthread_mutex_init(&subframe_mutex, NULL);
|
||||
|
||||
#ifdef OPENAIR2
|
||||
init_omv ();
|
||||
#endif
|
||||
@@ -1116,6 +1134,15 @@ main (int argc, char **argv)
|
||||
init_openair2 ();
|
||||
|
||||
init_ocm ();
|
||||
|
||||
// wait for all threads to startup
|
||||
sleep(3);
|
||||
printf("Sending sync to all threads\n");
|
||||
|
||||
pthread_mutex_lock(&sync_mutex);
|
||||
sync_var=0;
|
||||
pthread_cond_broadcast(&sync_cond);
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
|
||||
#ifdef SMBV
|
||||
// Rohde&Schwarz SMBV100A vector signal generator
|
||||
|
||||
@@ -456,7 +456,7 @@ int olg_config(void)
|
||||
set_comp_log(PHY, LOG_TRACE, 0x15, 1);
|
||||
set_comp_log(PDCP, LOG_DEBUG, 0x15,1);
|
||||
set_comp_log(RRC, LOG_DEBUG, 0x15,1);
|
||||
set_comp_log(OCM, LOG_ERR, 0x15,20);
|
||||
set_comp_log(OCM, LOG_DEBUG, 0x15,20);
|
||||
set_comp_log(OTG, LOG_DEBUG, 0x15,1);
|
||||
set_comp_log(OMG, LOG_NOTICE, 0x15,1);
|
||||
set_comp_log(OPT, LOG_ERR, 0x15,1);
|
||||
|
||||
@@ -957,6 +957,11 @@ void init_seed(uint8_t set_seed)
|
||||
}
|
||||
}
|
||||
|
||||
openair0_timestamp current_eNB_rx_timestamp[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
|
||||
openair0_timestamp current_UE_rx_timestamp[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
|
||||
openair0_timestamp last_eNB_rx_timestamp[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
|
||||
openair0_timestamp last_UE_rx_timestamp[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
|
||||
|
||||
int eNB_trx_start(openair0_device *device) {
|
||||
return(0);
|
||||
}
|
||||
@@ -990,42 +995,44 @@ int UE_trx_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
extern pthread_mutex_t subframe_mutex;
|
||||
extern int subframe_eNB_mask,subframe_UE_mask;
|
||||
|
||||
int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
int eNB_trx_write(openair0_device *device,openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
|
||||
|
||||
int eNB_id = device->Mod_id;
|
||||
int CC_id = device->CC_id;
|
||||
int UE_id;
|
||||
int subframe = (timestamp/PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti)%10;
|
||||
|
||||
for (UE_id=0;UE_id<=NB_UE_INST;UE_id++) {
|
||||
do_DL_sig(eNB2UE,
|
||||
enb_data,
|
||||
ue_data,
|
||||
subframe,
|
||||
0, //abstraction_flag,
|
||||
&PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms,
|
||||
UE_id,
|
||||
CC_id);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
int subframe;
|
||||
int ready_for_new_subframe=0;
|
||||
int subframe_eNB_mask_local;
|
||||
int sample_count=0;
|
||||
|
||||
int UE_trx_write(openair0_device *device,openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
|
||||
*ptimestamp = last_eNB_rx_timestamp[eNB_id][CC_id];
|
||||
|
||||
int UE_id = device->Mod_id;
|
||||
int CC_id = device->CC_id;
|
||||
int eNB_id;
|
||||
int subframe = (timestamp/PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti)%10;
|
||||
LOG_D(PHY,"eNB_trx_read nsamps %d TS(%llu,%llu) => subframe %d\n",nsamps,
|
||||
(unsigned long long)current_eNB_rx_timestamp[eNB_id][CC_id],
|
||||
(unsigned long long)last_eNB_rx_timestamp[eNB_id][CC_id],
|
||||
(*ptimestamp/PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti)%10);
|
||||
// if we're at a subframe boundary generate UL signals for this eNB
|
||||
|
||||
for (eNB_id=0;eNB_id<=NB_eNB_INST;eNB_id++) {
|
||||
while (sample_count<nsamps) {
|
||||
while (current_eNB_rx_timestamp[eNB_id][CC_id]<
|
||||
(nsamps+last_eNB_rx_timestamp[eNB_id][CC_id])) {
|
||||
LOG_D(EMU,"eNB: current TS %llu, last TS %llu, sleeping\n",current_eNB_rx_timestamp[eNB_id][CC_id],last_eNB_rx_timestamp[eNB_id][CC_id]);
|
||||
usleep(500);
|
||||
}
|
||||
|
||||
// tell top-level we are busy
|
||||
pthread_mutex_lock(&subframe_mutex);
|
||||
subframe_eNB_mask|=(1<<eNB_id);
|
||||
pthread_mutex_unlock(&subframe_mutex);
|
||||
|
||||
subframe = (last_eNB_rx_timestamp[eNB_id][CC_id]/PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti)%10;
|
||||
LOG_D(PHY,"eNB_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
|
||||
subframe,(unsigned long long)*ptimestamp,
|
||||
(unsigned long long)current_eNB_rx_timestamp[eNB_id][CC_id]);
|
||||
|
||||
do_UL_sig(UE2eNB,
|
||||
enb_data,
|
||||
ue_data,
|
||||
@@ -1035,8 +1042,87 @@ int UE_trx_write(openair0_device *device,openair0_timestamp timestamp, void **bu
|
||||
0, // frame is only used for abstraction
|
||||
eNB_id,
|
||||
CC_id);
|
||||
|
||||
|
||||
last_eNB_rx_timestamp[eNB_id][CC_id] += PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti;
|
||||
sample_count += PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti;
|
||||
}
|
||||
return(0);
|
||||
|
||||
return(nsamps);
|
||||
}
|
||||
|
||||
int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) {
|
||||
|
||||
int UE_id = device->Mod_id;
|
||||
int CC_id = device->CC_id;
|
||||
int subframe;
|
||||
int ready_for_new_subframe=0;
|
||||
int subframe_UE_mask_local;
|
||||
int sample_count=0;
|
||||
int read_size;
|
||||
|
||||
*ptimestamp = last_UE_rx_timestamp[UE_id][CC_id];
|
||||
|
||||
LOG_D(PHY,"UE_trx_read nsamps %d TS(%llu,%llu)\n",nsamps,
|
||||
(unsigned long long)current_UE_rx_timestamp[UE_id][CC_id],
|
||||
(unsigned long long)last_UE_rx_timestamp[UE_id][CC_id]);
|
||||
|
||||
if (nsamps < PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti)
|
||||
read_size = nsamps;
|
||||
else
|
||||
read_size = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti;
|
||||
|
||||
while (sample_count<nsamps) {
|
||||
while (current_UE_rx_timestamp[UE_id][CC_id] <
|
||||
(last_UE_rx_timestamp[UE_id][CC_id]+read_size)) {
|
||||
LOG_D(EMU,"UE_trx_read : current TS %d, last TS %d, sleeping\n",current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
|
||||
|
||||
usleep(500);
|
||||
}
|
||||
|
||||
LOG_D(EMU,"UE_trx_read : current TS %d, last TS %d, sleeping\n",current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
|
||||
|
||||
// tell top-level we are busy
|
||||
pthread_mutex_lock(&subframe_mutex);
|
||||
subframe_UE_mask|=(1<<UE_id);
|
||||
pthread_mutex_unlock(&subframe_mutex);
|
||||
// if we didn't ask for at least a subframe's worth of samples return
|
||||
|
||||
// otherwise we have one subframe here so generate the received signal
|
||||
subframe = (last_UE_rx_timestamp[UE_id][CC_id]/PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti)%10;
|
||||
if ((last_UE_rx_timestamp[UE_id][CC_id]%PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti) > 0)
|
||||
subframe++;
|
||||
|
||||
last_UE_rx_timestamp[UE_id][CC_id] += read_size;
|
||||
sample_count += read_size;
|
||||
|
||||
if (subframe > 9)
|
||||
return(nsamps);
|
||||
|
||||
LOG_D(PHY,"UE_trx_read generating DL subframe %d (Ts %llu, current TS %llu)\n",
|
||||
subframe,(unsigned long long)*ptimestamp,
|
||||
(unsigned long long)current_UE_rx_timestamp[UE_id][CC_id]);
|
||||
do_DL_sig(eNB2UE,
|
||||
enb_data,
|
||||
ue_data,
|
||||
subframe,
|
||||
0, //abstraction_flag,
|
||||
&PHY_vars_UE_g[UE_id][CC_id]->frame_parms,
|
||||
UE_id,
|
||||
CC_id);
|
||||
}
|
||||
|
||||
return(nsamps);
|
||||
}
|
||||
|
||||
int eNB_trx_write(openair0_device *device,openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
|
||||
|
||||
return(nsamps);
|
||||
}
|
||||
|
||||
int UE_trx_write(openair0_device *device,openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
|
||||
|
||||
return(nsamps);
|
||||
}
|
||||
|
||||
void init_devices(void){
|
||||
@@ -1055,8 +1141,10 @@ void init_devices(void){
|
||||
PHY_vars_eNB_g[eNB_id][CC_id]->rfdevice.trx_stop_func = eNB_trx_stop;
|
||||
PHY_vars_eNB_g[eNB_id][CC_id]->rfdevice.trx_set_freq_func = eNB_trx_set_freq;
|
||||
PHY_vars_eNB_g[eNB_id][CC_id]->rfdevice.trx_set_gains_func = eNB_trx_set_gains;
|
||||
current_eNB_rx_timestamp[eNB_id][CC_id] = PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti;
|
||||
last_eNB_rx_timestamp[eNB_id][CC_id] = 0;
|
||||
}
|
||||
for (UE_id=0;UE_id<NB_eNB_INST;UE_id++) {
|
||||
for (UE_id=0;UE_id<NB_UE_INST;UE_id++) {
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.Mod_id = UE_id;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.CC_id = CC_id;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_start_func = UE_trx_start;
|
||||
@@ -1066,6 +1154,9 @@ void init_devices(void){
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_stop_func = UE_trx_stop;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_set_freq_func = UE_trx_set_freq;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_set_gains_func = UE_trx_set_gains;
|
||||
current_UE_rx_timestamp[UE_id][CC_id] = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti;
|
||||
last_UE_rx_timestamp[UE_id][CC_id] = 0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1123,7 +1214,11 @@ void init_openair1(void)
|
||||
//N_TA_offset
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
|
||||
PHY_vars_UE_g[UE_id][CC_id]->use_ia_receiver = 0;
|
||||
|
||||
PHY_vars_UE_g[UE_id][CC_id]->use_ia_receiver = 0;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->mode = normal_txrx;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->mac_enabled = 1;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->no_timing_correction = 1;
|
||||
|
||||
if (PHY_vars_UE_g[UE_id][CC_id]->frame_parms.frame_type == TDD) {
|
||||
if (PHY_vars_UE_g[UE_id][CC_id]->frame_parms.N_RB_DL == 100)
|
||||
@@ -1396,7 +1491,7 @@ void update_ocm()
|
||||
enb_data[eNB_id]->tx_power_dBm = PHY_vars_eNB_g[eNB_id][0]->frame_parms.pdsch_config_common.referenceSignalPower;
|
||||
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++)
|
||||
ue_data[UE_id]->tx_power_dBm = PHY_vars_UE_g[UE_id][0]->tx_power_dBm;
|
||||
ue_data[UE_id]->tx_power_dBm = PHY_vars_UE_g[UE_id][0]->tx_power_dBm[0];
|
||||
|
||||
|
||||
/* check if the openair channel model is activated used for PHY abstraction : path loss*/
|
||||
@@ -1450,10 +1545,10 @@ void update_ocm()
|
||||
UE2eNB[UE_id][eNB_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.pdsch_config_common.referenceSignalPower;
|
||||
}
|
||||
|
||||
LOG_I(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",eNB_id,UE_id,CC_id,
|
||||
LOG_D(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",eNB_id,UE_id,CC_id,
|
||||
eNB2UE[eNB_id][UE_id][CC_id]->path_loss_dB,
|
||||
PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.pdsch_config_common.referenceSignalPower,snr_dB);
|
||||
// printf("[SIM] Path loss from UE %d to eNB %d => %f dB\n",UE_id,eNB_id,UE2eNB[UE_id][eNB_id]->path_loss_dB);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1721,3 +1816,14 @@ void init_time()
|
||||
td_avg = TARGET_SF_TIME_NS;
|
||||
}
|
||||
|
||||
int openair0_transport_load(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * eth_params) {
|
||||
|
||||
return(0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user