Commit 4c54f821 authored by lfarizav's avatar lfarizav

From now, I will working on the scheduler to enable dynamic scheduling coordination for C-RAN

parent 93243c1a
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <stdlib.h> #include <stdlib.h>
#include "lte_phy_scope.h" #include "lte_phy_scope.h"
#define TPUT_WINDOW_LENGTH 100 #define TPUT_WINDOW_LENGTH 100
int otg_enabled; int otg_enabled;
...@@ -150,11 +149,9 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void ) ...@@ -150,11 +149,9 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
void phy_scope_eNB(FD_lte_phy_scope_enb *form, void phy_scope_eNB(FD_lte_phy_scope_enb *form,
PHY_VARS_eNB *phy_vars_enb, PHY_VARS_eNB *phy_vars_enb,
PHY_VARS_UE *phy_vars_ue,
int eNB_id,
int UE_id) int UE_id)
{ {
//int eNB_id = 0; int eNB_id = 0;
//printf("phy_scope_eNB: eNB_id %d, UE %d\n",eNB_id, UE_id); //printf("phy_scope_eNB: eNB_id %d, UE %d\n",eNB_id, UE_id);
int i,i2,arx,atx,ind,k; int i,i2,arx,atx,ind,k;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_enb->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_enb->frame_parms;
...@@ -197,9 +194,9 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form, ...@@ -197,9 +194,9 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
chest_f_abs = (float*) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float)); chest_f_abs = (float*) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float));
llr = (float*) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero llr = (float*) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero
bit = malloc(coded_bits_per_codeword*sizeof(float)); bit = malloc(coded_bits_per_codeword*sizeof(float));
if (phy_vars_ue->do_ofdm_mod) /*if (PHY_VARS_UE_g[0][0]->do_ofdm_mod)
rxsig_t = (int16_t**) phy_vars_enb->common_vars.rxdataF[0]; rxsig_t = (int16_t**) phy_vars_enb->common_vars.rxdataF[0];
else else*/
rxsig_t = (int16_t**) phy_vars_enb->common_vars.rxdata[0]; rxsig_t = (int16_t**) phy_vars_enb->common_vars.rxdata[0];
//chest_t = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id]; //chest_t = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id];
chest_t = (int16_t**) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates[eNB_id]; chest_t = (int16_t**) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates[eNB_id];
......
...@@ -68,8 +68,6 @@ FD_lte_phy_scope_ue * create_lte_phy_scope_ue( void ); ...@@ -68,8 +68,6 @@ FD_lte_phy_scope_ue * create_lte_phy_scope_ue( void );
void phy_scope_eNB(FD_lte_phy_scope_enb *form, void phy_scope_eNB(FD_lte_phy_scope_enb *form,
PHY_VARS_eNB *phy_vars_enb, PHY_VARS_eNB *phy_vars_enb,
PHY_VARS_UE *phy_vars_ue,
int eNB_id,
int UE_id); int UE_id);
void phy_scope_UE(FD_lte_phy_scope_ue *form, void phy_scope_UE(FD_lte_phy_scope_ue *form,
......
...@@ -1202,7 +1202,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1202,7 +1202,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)==SF_UL)) return; if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)==SF_UL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1);
if (do_meas==1) start_meas(&eNB->phy_proc_tx); /*if (do_meas==1)*/ start_meas(&eNB->phy_proc_tx);
T(T_ENB_PHY_DL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe)); T(T_ENB_PHY_DL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe));
...@@ -1534,7 +1534,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1534,7 +1534,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,0);
if (do_meas==1) stop_meas(&eNB->phy_proc_tx); /*if (do_meas==1)*/ stop_meas(&eNB->phy_proc_tx);
} }
void process_Msg3(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t UE_id, uint8_t harq_pid) void process_Msg3(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t UE_id, uint8_t harq_pid)
...@@ -2900,7 +2900,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){ ...@@ -2900,7 +2900,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 1 );
start_meas(&eNB->phy_proc_rx); start_meas(&eNB->phy_proc_rx);
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_common_RX(%d)\n",eNB->Mod_id,frame,subframe); LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_common_RX(%d)\n",eNB->Mod_id,frame,subframe);
...@@ -2912,6 +2912,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){ ...@@ -2912,6 +2912,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){
void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const relaying_type_t r_type) void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const relaying_type_t r_type)
{ {
printf("eNB_uespec_RX\n");
//RX processing for ue-specific resources (i //RX processing for ue-specific resources (i
UNUSED(r_type); UNUSED(r_type);
uint32_t ret=0,i,j,k; uint32_t ret=0,i,j,k;
......
...@@ -508,6 +508,7 @@ schedule_ue_spec( ...@@ -508,6 +508,7 @@ schedule_ue_spec(
continue; continue;
for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) { for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) {
printf("schedule_ue_spec:Active UE_id %d, eNB %d\n",UE_id,module_idP);
continue_flag=0; // reset the flag to allow allocation for the remaining UEs continue_flag=0; // reset the flag to allow allocation for the remaining UEs
rnti = UE_RNTI(module_idP,UE_id); rnti = UE_RNTI(module_idP,UE_id);
eNB_UE_stats = mac_xface->get_eNB_UE_stats(module_idP,CC_id,rnti); eNB_UE_stats = mac_xface->get_eNB_UE_stats(module_idP,CC_id,rnti);
......
...@@ -1190,7 +1190,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -1190,7 +1190,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
}*/ }*/
max_num_ue_to_be_scheduled+=1; max_num_ue_to_be_scheduled+=1;
printf("ulsch_scheduler_pre_processor:max num ue to be scheduled %d\n",max_num_ue_to_be_scheduled);
if (total_ue_count == 0) { if (total_ue_count == 0) {
average_rbs_per_user[CC_id] = 0; average_rbs_per_user[CC_id] = 0;
} else if (total_ue_count == 1 ) { // increase the available RBs, special case, } else if (total_ue_count == 1 ) { // increase the available RBs, special case,
......
...@@ -149,18 +149,18 @@ eNBs = ...@@ -149,18 +149,18 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "enx58ef68b419df"; ENB_INTERFACE_NAME_FOR_S1_MME = "eno2";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.14.170/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.170/24";
ENB_INTERFACE_NAME_FOR_S1U = "enx58ef68b419df"; ENB_INTERFACE_NAME_FOR_S1U = "eno2";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.14.170/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.170/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
rrh_gw_config = ( rrh_gw_config = (
{ {
local_if_name = "enx58ef68b419df"; local_if_name = "eno2";
remote_address = "192.168.14.171"; remote_address = "192.168.12.171";
local_address = "192.168.14.170"; local_address = "192.168.12.170";
local_port = 50000; #for raw option local port must be the same to remote local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000; remote_port = 50000;
rrh_gw_active = "yes"; rrh_gw_active = "yes";
......
...@@ -221,7 +221,7 @@ eNBs = ...@@ -221,7 +221,7 @@ eNBs =
eutra_band = 7; eutra_band = 7;
downlink_frequency = 2685000000L; downlink_frequency = 2685000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 1;
N_RB_DL = 25; N_RB_DL = 25;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antenna_ports = 1; nb_antenna_ports = 1;
...@@ -337,16 +337,16 @@ eNBs = ...@@ -337,16 +337,16 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "enxd8eb97b9c06c"; ENB_INTERFACE_NAME_FOR_S1_MME = "enx58ef68b419df";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.14.170/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.14.170/24";
ENB_INTERFACE_NAME_FOR_S1U = "enxd8eb97b9c06c"; ENB_INTERFACE_NAME_FOR_S1U = "enx58ef68b419df";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.14.170/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.14.170/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
rrh_gw_config = ( rrh_gw_config = (
{ {
local_if_name = "enxd8eb97b9c06c"; local_if_name = "enx58ef68b419df";
remote_address = "192.168.14.171"; remote_address = "192.168.14.171";
local_address = "192.168.14.170"; local_address = "192.168.14.170";
local_port = 50001; #for raw option local port must be the same to remote local_port = 50001; #for raw option local port must be the same to remote
...@@ -409,7 +409,7 @@ eNBs = ...@@ -409,7 +409,7 @@ eNBs =
eutra_band = 7; eutra_band = 7;
downlink_frequency = 2685000000L; downlink_frequency = 2685000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 2;
N_RB_DL = 25; N_RB_DL = 25;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antenna_ports = 1; nb_antenna_ports = 1;
...@@ -525,18 +525,18 @@ eNBs = ...@@ -525,18 +525,18 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_INTERFACE_NAME_FOR_S1_MME = "enx58ef68b50431";
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.1/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.16.170/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_INTERFACE_NAME_FOR_S1U = "enx58ef68b50431";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.1/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.16.170/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
rrh_gw_config = ( rrh_gw_config = (
{ {
local_if_name = "lo"; local_if_name = "enx58ef68b50431";
remote_address = "127.0.0.2"; remote_address = "192.168.16.171";
local_address = "127.0.0.1"; local_address = "192.168.16.170";
local_port = 50002; #for raw option local port must be the same to remote local_port = 50002; #for raw option local port must be the same to remote
remote_port = 50002; remote_port = 50002;
rrh_gw_active = "yes"; rrh_gw_active = "yes";
......
...@@ -140,13 +140,17 @@ time_stats_t softmodem_stats_mt; // main thread ...@@ -140,13 +140,17 @@ time_stats_t softmodem_stats_mt; // main thread
time_stats_t softmodem_stats_hw; // hw acquisition time_stats_t softmodem_stats_hw; // hw acquisition
time_stats_t softmodem_stats_rxtx_sf; // total tx time time_stats_t softmodem_stats_rxtx_sf; // total tx time
time_stats_t softmodem_stats_rx_sf; // total rx time time_stats_t softmodem_stats_rx_sf; // total rx time
time_stats_t softmodem_stats_rx_rf; // total rx time
time_stats_t softmodem_stats_rx_rf_freq; // total rx frequency
time_stats_t softmodem_stats_tx_fh_if4p5; // total rx frequency
time_stats_t softmodem_stats_rx_fh_if4p5; // total rx frequency
//int32_t **rxdata; //int32_t **rxdata;
//int32_t **txdata; //int32_t **txdata;
uint8_t seqno; //sequence number uint8_t seqno; //sequence number
static int time_offset[4] = {0,0,0,0}; static int time_offset[4] = {0,0,0,0};
static int temp_f = 0;
/* mutex, cond and variable to serialize phy proc TX calls /* mutex, cond and variable to serialize phy proc TX calls
* (this mechanism may be relaxed in the future for better * (this mechanism may be relaxed in the future for better
* performances) * performances)
...@@ -442,10 +446,12 @@ void tx_fh_if5_mobipass_standalone(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) { ...@@ -442,10 +446,12 @@ void tx_fh_if5_mobipass_standalone(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
} }
void tx_fh_if4p5(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) { void tx_fh_if4p5(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
start_meas (&softmodem_stats_tx_fh_if4p5);
if ((eNB->frame_parms.frame_type==FDD) || if ((eNB->frame_parms.frame_type==FDD) ||
((eNB->frame_parms.frame_type==TDD) && ((eNB->frame_parms.frame_type==TDD) &&
(subframe_select(&eNB->frame_parms,proc->subframe_tx) != SF_UL))) (subframe_select(&eNB->frame_parms,proc->subframe_tx) != SF_UL)))
send_IF4p5(eNB,proc->frame_tx,proc->subframe_tx, IF4p5_PDLFFT, 0); send_IF4p5(eNB,proc->frame_tx,proc->subframe_tx, IF4p5_PDLFFT, 0);
stop_meas (&softmodem_stats_tx_fh_if4p5);
} }
void proc_tx_high0(PHY_VARS_eNB *eNB, void proc_tx_high0(PHY_VARS_eNB *eNB,
...@@ -974,7 +980,7 @@ static void* eNB_thread_asynch_rxtx( void* param ) { ...@@ -974,7 +980,7 @@ static void* eNB_thread_asynch_rxtx( void* param ) {
void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) { void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
start_meas(&softmodem_stats_rx_rf);
eNB_proc_t *proc = &eNB->proc; eNB_proc_t *proc = &eNB->proc;
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
void *rxp[fp->nb_antennas_rx],*txp[fp->nb_antennas_tx]; void *rxp[fp->nb_antennas_rx],*txp[fp->nb_antennas_tx];
...@@ -1119,10 +1125,11 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) { ...@@ -1119,10 +1125,11 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
exit_fun( "problem receiving samples" ); exit_fun( "problem receiving samples" );
stop_meas(&softmodem_stats_rx_rf);
if (proc->frame_rx==1020) print_meas(&softmodem_stats_rx_rf,"softmodem_stats_rx_rf",NULL,NULL);
} }
void rx_rf_freq(PHY_VARS_eNB *eNB,int *frame,int *subframe) { void rx_rf_freq(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
start_meas(&softmodem_stats_rx_rf_freq);
eNB_proc_t *proc = &eNB->proc; eNB_proc_t *proc = &eNB->proc;
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
void *rxp_freq[fp->nb_antennas_rx],*txp_freq[fp->nb_antennas_tx]; void *rxp_freq[fp->nb_antennas_rx],*txp_freq[fp->nb_antennas_tx];
...@@ -1258,6 +1265,8 @@ void rx_rf_freq(PHY_VARS_eNB *eNB,int *frame,int *subframe) { ...@@ -1258,6 +1265,8 @@ void rx_rf_freq(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
if (rxs_freq != fp->ofdm_symbol_size*fp->symbols_per_tti) if (rxs_freq != fp->ofdm_symbol_size*fp->symbols_per_tti)
exit_fun( "problem receiving samples in frequency" ); exit_fun( "problem receiving samples in frequency" );
stop_meas(&softmodem_stats_rx_rf_freq);
//if (proc->frame_rx==1020)
} }
void rx_fh_if5(PHY_VARS_eNB *eNB,int *frame, int *subframe) { void rx_fh_if5(PHY_VARS_eNB *eNB,int *frame, int *subframe) {
...@@ -1327,7 +1336,7 @@ void rx_fh_if5_mobipass_standalone(PHY_VARS_eNB *eNB,int *frame, int *subframe) ...@@ -1327,7 +1336,7 @@ void rx_fh_if5_mobipass_standalone(PHY_VARS_eNB *eNB,int *frame, int *subframe)
} }
void rx_fh_if4p5(PHY_VARS_eNB *eNB,int *frame,int *subframe) { void rx_fh_if4p5(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
start_meas (&softmodem_stats_rx_fh_if4p5);
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
eNB_proc_t *proc = &eNB->proc; eNB_proc_t *proc = &eNB->proc;
int f,sf; int f,sf;
...@@ -1404,7 +1413,7 @@ void rx_fh_if4p5(PHY_VARS_eNB *eNB,int *frame,int *subframe) { ...@@ -1404,7 +1413,7 @@ void rx_fh_if4p5(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
if (eNB->CC_id==0) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff ); if (eNB->CC_id==0) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
stop_meas (&softmodem_stats_rx_fh_if4p5);
} }
void rx_fh_slave(PHY_VARS_eNB *eNB,int *frame,int *subframe) { void rx_fh_slave(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
...@@ -1759,7 +1768,7 @@ static void* eNB_thread_prach( void* param ) { ...@@ -1759,7 +1768,7 @@ static void* eNB_thread_prach( void* param ) {
} }
void print_opp_meas(void);
static void* eNB_thread_single( void* param ) { static void* eNB_thread_single( void* param ) {
static int eNB_thread_single_status; static int eNB_thread_single_status;
...@@ -1935,13 +1944,15 @@ static void* eNB_thread_single( void* param ) { ...@@ -1935,13 +1944,15 @@ static void* eNB_thread_single( void* param ) {
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
while (!oai_exit) { while (!oai_exit) {
start_meas(&softmodem_stats_hw);
start_meas(&softmodem_stats_rx_sf);
// these are local subframe/frame counters to check that we are in synch with the fronthaul timing. // these are local subframe/frame counters to check that we are in synch with the fronthaul timing.
// They are set on the first rx/tx in the underly FH routines. // They are set on the first rx/tx in the underly FH routines.
if (subframe==9) { if (subframe==9) {
subframe=0; subframe=0;
frame++; frame++;
frame&=1023; frame&=1023;
temp_f++;
} else { } else {
subframe++; subframe++;
} }
...@@ -1967,15 +1978,21 @@ static void* eNB_thread_single( void* param ) { ...@@ -1967,15 +1978,21 @@ static void* eNB_thread_single( void* param ) {
//printf("[lte-enb] frame offset %d\n",proc->frame_offset); //printf("[lte-enb] frame offset %d\n",proc->frame_offset);
// At this point, all information for subframe has been received on FH interface // At this point, all information for subframe has been received on FH interface
// If this proc is to provide synchronization, do so // If this proc is to provide synchronization, do so
stop_meas(&softmodem_stats_rx_sf);
wakeup_slaves(proc); wakeup_slaves(proc);
if (rxtx(eNB,proc_rxtx,"eNB_thread_single") < 0) break; if (rxtx(eNB,proc_rxtx,"eNB_thread_single") < 0) break;
stop_meas(&softmodem_stats_hw);
if (temp_f==3000) {
print_opp_meas();
}
} }
printf( "Exiting eNB_single thread \n"); printf( "Exiting eNB_single thread \n");
eNB_thread_single_status = 0; eNB_thread_single_status = 0;
return &eNB_thread_single_status; return &eNB_thread_single_status;
} }
...@@ -2290,7 +2307,7 @@ void reset_opp_meas(void) { ...@@ -2290,7 +2307,7 @@ void reset_opp_meas(void) {
reset_meas(&softmodem_stats_mt); reset_meas(&softmodem_stats_mt);
reset_meas(&softmodem_stats_hw); reset_meas(&softmodem_stats_hw);
for (sfn=0; sfn < 10; sfn++) { for (sfn=0; sfn < 1; sfn++) {
reset_meas(&softmodem_stats_rxtx_sf); reset_meas(&softmodem_stats_rxtx_sf);
reset_meas(&softmodem_stats_rx_sf); reset_meas(&softmodem_stats_rx_sf);
} }
...@@ -2303,10 +2320,20 @@ void print_opp_meas(void) { ...@@ -2303,10 +2320,20 @@ void print_opp_meas(void) {
print_meas(&softmodem_stats_mt, "Main ENB Thread", NULL, NULL); print_meas(&softmodem_stats_mt, "Main ENB Thread", NULL, NULL);
print_meas(&softmodem_stats_hw, "HW Acquisation", NULL, NULL); print_meas(&softmodem_stats_hw, "HW Acquisation", NULL, NULL);
for (sfn=0; sfn < 10; sfn++) { for (sfn=0; sfn < 1; sfn++) {
print_meas(&softmodem_stats_rxtx_sf,"[eNB][total_phy_proc_rxtx]",NULL, NULL); print_meas(&softmodem_stats_rxtx_sf,"[eNB][total_phy_proc_rxtx]",NULL, NULL);
print_meas(&softmodem_stats_rx_sf,"[eNB][total_phy_proc_rx]",NULL,NULL); print_meas(&softmodem_stats_rx_sf,"[eNB][total_phy_proc_rx]",NULL,NULL);
} }
print_meas(&softmodem_stats_rx_rf,"softmodem_stats_rx_rf",NULL,NULL);
print_meas(&softmodem_stats_rx_rf_freq,"softmodem_stats_rx_rf_freq",NULL,NULL);
print_meas(&PHY_vars_eNB_g[0][0]->phy_proc_tx,"phy_proc_tx",NULL,NULL);
print_meas(&PHY_vars_eNB_g[0][0]->phy_proc_rx,"phy_proc_rx",NULL,NULL);
print_meas(&softmodem_stats_rx_fh_if4p5,"rx_fh_if4p5",NULL,NULL);
print_meas(&softmodem_stats_tx_fh_if4p5,"tx_fh_if4p5",NULL,NULL);
if (NB_eNB_INST>1){
print_meas(&PHY_vars_eNB_g[1][0]->phy_proc_tx,"phy_proc_tx1",NULL,NULL);
print_meas(&PHY_vars_eNB_g[1][0]->phy_proc_rx,"phy_proc_rx1",NULL,NULL);
}
} }
int start_if(PHY_VARS_eNB *eNB) { int start_if(PHY_VARS_eNB *eNB) {
...@@ -2331,6 +2358,10 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst ...@@ -2331,6 +2358,10 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
for (inst=0;inst<nb_inst;inst++) { for (inst=0;inst<nb_inst;inst++) {
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) { for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
//printf("Number of inst %d, eNB %d, rfdevice %d, ifdevice %d, addr %s\n",inst,PHY_vars_eNB_g[inst][CC_id]->Mod_id,PHY_vars_eNB_g[inst][CC_id]->rfdevice.Mod_id,PHY_vars_eNB_g[inst][CC_id]->ifdevice.Mod_id,(eth_params+inst+CC_id)->my_addr); //printf("Number of inst %d, eNB %d, rfdevice %d, ifdevice %d, addr %s\n",inst,PHY_vars_eNB_g[inst][CC_id]->Mod_id,PHY_vars_eNB_g[inst][CC_id]->rfdevice.Mod_id,PHY_vars_eNB_g[inst][CC_id]->ifdevice.Mod_id,(eth_params+inst+CC_id)->my_addr);
reset_meas(&PHY_vars_eNB_g[inst][CC_id]->phy_proc_tx);
reset_meas(&PHY_vars_eNB_g[inst][CC_id]->phy_proc_rx);
reset_meas (&softmodem_stats_rx_fh_if4p5);
reset_meas (&softmodem_stats_tx_fh_if4p5);
eNB = PHY_vars_eNB_g[inst][CC_id]; eNB = PHY_vars_eNB_g[inst][CC_id];
eNB->node_function = node_function[CC_id]; eNB->node_function = node_function[CC_id];
eNB->node_timing = node_timing[CC_id]; eNB->node_timing = node_timing[CC_id];
...@@ -2540,9 +2571,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst ...@@ -2540,9 +2571,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
} }
void stop_eNB(int nb_inst) { void stop_eNB(int nb_inst) {
for (int inst=0;inst<nb_inst;inst++) { for (int inst=0;inst<nb_inst;inst++) {
printf("Killing eNB %d processing threads\n",inst); printf("Killing eNB %d processing threads\n",inst);
kill_eNB_proc(inst); kill_eNB_proc(inst);
......
...@@ -1145,8 +1145,6 @@ l2l1_task (void *args_p) ...@@ -1145,8 +1145,6 @@ l2l1_task (void *args_p)
7); 7);
phy_scope_eNB(form_enb[UE_inst], phy_scope_eNB(form_enb[UE_inst],
PHY_vars_eNB_g[eNB_inst][0], PHY_vars_eNB_g[eNB_inst][0],
PHY_vars_UE_g[UE_inst][0],
eNB_inst,
UE_inst); UE_inst);
//} //}
} }
...@@ -1745,8 +1743,6 @@ print_opp_meas_oaisim (void) ...@@ -1745,8 +1743,6 @@ print_opp_meas_oaisim (void)
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_intl2_stats, print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_intl2_stats,
"[UE][ |_tc_intl2]", &oaisim_stats, &oaisim_stats_f); "[UE][ |_tc_intl2]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_tx,
"[UE][total_phy_proc_tx]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_mod_stats, "[UE][ofdm_mod]", print_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_mod_stats, "[UE][ofdm_mod]",
&oaisim_stats, &oaisim_stats_f); &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_modulation_stats, print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_modulation_stats,
...@@ -1772,6 +1768,8 @@ print_opp_meas_oaisim (void) ...@@ -1772,6 +1768,8 @@ print_opp_meas_oaisim (void)
print_meas (&PHY_vars_eNB_g[eNB_id][0]->phy_proc_tx, print_meas (&PHY_vars_eNB_g[eNB_id][0]->phy_proc_tx,
"[eNB][total_phy_proc_tx]", &oaisim_stats, &oaisim_stats_f); "[eNB][total_phy_proc_tx]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_eNB_g[eNB_id][0]->phy_proc_rx,
"[eNB][total_phy_proc_rx]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_eNB_g[eNB_id][0]->ofdm_mod_stats, print_meas (&PHY_vars_eNB_g[eNB_id][0]->ofdm_mod_stats,
"[eNB][ofdm_mod]", &oaisim_stats, &oaisim_stats_f); "[eNB][ofdm_mod]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_eNB_g[eNB_id][0]->dlsch_modulation_stats, print_meas (&PHY_vars_eNB_g[eNB_id][0]->dlsch_modulation_stats,
...@@ -1787,8 +1785,6 @@ print_opp_meas_oaisim (void) ...@@ -1787,8 +1785,6 @@ print_opp_meas_oaisim (void)
print_meas (&PHY_vars_eNB_g[eNB_id][0]->dlsch_turbo_encoding_stats, print_meas (&PHY_vars_eNB_g[eNB_id][0]->dlsch_turbo_encoding_stats,
"[eNB][|_turbo_encoding]", &oaisim_stats, &oaisim_stats_f); "[eNB][|_turbo_encoding]", &oaisim_stats, &oaisim_stats_f);
//print_meas (&PHY_vars_eNB_g[eNB_id][0]->phy_proc_rx,
// "[eNB][total_phy_proc_rx]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_eNB_g[eNB_id][0]->ofdm_demod_stats, print_meas (&PHY_vars_eNB_g[eNB_id][0]->ofdm_demod_stats,
"[eNB][ofdm_demod]", &oaisim_stats, &oaisim_stats_f); "[eNB][ofdm_demod]", &oaisim_stats, &oaisim_stats_f);
//print_meas(&PHY_vars_eNB_g[eNB_id][0]->ulsch_channel_estimation_stats,"[eNB][channel_est]"); //print_meas(&PHY_vars_eNB_g[eNB_id][0]->ulsch_channel_estimation_stats,"[eNB][channel_est]");
......
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