Add the compression for IF5 and RTT measurements for FH and RF
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -59,3 +59,5 @@ typedef struct IF5_mobipass_header IF5_mobipass_header_t;
|
||||
void send_IF5(PHY_VARS_eNB*, openair0_timestamp, int, uint8_t*, uint16_t);
|
||||
|
||||
void recv_IF5(PHY_VARS_eNB*, openair0_timestamp*, int, uint16_t);
|
||||
|
||||
void malloc_IF5_buffer(PHY_VARS_eNB*);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -78,7 +78,8 @@
|
||||
void exit_fun(const char* s);
|
||||
|
||||
extern int exit_openair;
|
||||
|
||||
struct timespec start_fh, start_fh_prev;
|
||||
int start_fh_sf, start_fh_prev_sf;
|
||||
// Fix per CC openair rf/if device update
|
||||
// extern openair0_device openair0;
|
||||
|
||||
@@ -2751,6 +2752,10 @@ void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc_rxtx) {
|
||||
if (eNB->node_function == NGFI_RRU_IF4p5) {
|
||||
/// **** send_IF4 of rxdataF to RCC (no prach now) **** ///
|
||||
send_IF4p5(eNB, proc_rxtx->frame_rx, proc_rxtx->subframe_rx, IF4p5_PULFFT, 0);
|
||||
start_fh_prev = start_fh;
|
||||
start_fh_prev_sf = start_fh_sf;
|
||||
clock_gettime( CLOCK_MONOTONIC, &start_fh);
|
||||
start_fh_sf = proc_rxtx->subframe_rx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2762,6 +2767,10 @@ void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc_rxtx) {
|
||||
/// **** send_IF5 of rxdata to BBU **** ///
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
|
||||
send_IF5(eNB, proc->timestamp_rx, proc->subframe_rx, &seqno, IF5_RRH_GW_UL);
|
||||
start_fh_prev = start_fh;
|
||||
start_fh_prev_sf = start_fh_sf;
|
||||
clock_gettime( CLOCK_MONOTONIC, &start_fh);
|
||||
start_fh_sf = proc->subframe_rx;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
|
||||
|
||||
}
|
||||
|
||||
@@ -208,6 +208,7 @@
|
||||
#define ENB_CONFIG_STRING_RRH_GW_IQ_TXSHIFT "iq_txshift"
|
||||
#define ENB_CONFIG_STRING_RRH_GW_TX_SAMPLE_ADVANCE "tx_sample_advance"
|
||||
#define ENB_CONFIG_STRING_RRH_GW_TX_SCHEDULING_ADVANCE "tx_scheduling_advance"
|
||||
#define ENB_CONFIG_STRING_RRH_GW_IF_COMPRESSION "if_compression"
|
||||
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity"
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE "none"
|
||||
@@ -338,6 +339,7 @@ void enb_config_display(void)
|
||||
} else {
|
||||
printf( "\tRF target : \tNONE:\n");
|
||||
}
|
||||
printf( "\tif_compression : \t%s Compression:\n",(enb_properties.properties[i]->rrh_gw_config[j].if_compress == 1)? "ALAW" : "None");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -657,6 +659,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
|
||||
char* ipv6 = NULL;
|
||||
char* active = NULL;
|
||||
char* preference = NULL;
|
||||
char* if_compression = NULL;
|
||||
|
||||
char* tr_preference = NULL;
|
||||
char* rf_preference = NULL;
|
||||
@@ -2327,82 +2330,91 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
|
||||
// RRH Config
|
||||
setting_rrh_gws = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_RRH_GW_CONFIG);
|
||||
if ( setting_rrh_gws != NULL) {
|
||||
num_rrh_gw = config_setting_length(setting_rrh_gws);
|
||||
enb_properties.properties[enb_properties_index]->nb_rrh_gw = 0;
|
||||
num_rrh_gw = config_setting_length(setting_rrh_gws);
|
||||
enb_properties.properties[enb_properties_index]->nb_rrh_gw = 0;
|
||||
|
||||
for (j = 0; j < num_rrh_gw; j++) {
|
||||
setting_rrh_gw = config_setting_get_elem(setting_rrh_gws, j);
|
||||
|
||||
if ( !(
|
||||
config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_LOCAL_IF_NAME, (const char **)&if_name)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_LOCAL_ADDRESS, (const char **)&ipv4)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_REMOTE_ADDRESS , (const char **)&ipv4_remote)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_LOCAL_PORT, &local_port)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_REMOTE_PORT, &remote_port)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_ACTIVE, (const char **)&active)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_TRANSPORT_PREFERENCE, (const char **)&tr_preference)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_RF_TARGET_PREFERENCE, (const char **)&rf_preference)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_IQ_TXSHIFT, &iq_txshift)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_TX_SAMPLE_ADVANCE, &tx_sample_advance)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_TX_SCHEDULING_ADVANCE, &tx_scheduling_advance)
|
||||
)
|
||||
) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, %u th enb %u the RRH GW address !\n",
|
||||
lib_config_file_name_pP, i, j);
|
||||
continue; // FIXME will prevent segfaults below, not sure what happens at function exit...
|
||||
}
|
||||
|
||||
enb_properties.properties[enb_properties_index]->nb_rrh_gw += 1;
|
||||
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rrh_gw_if_name = strdup(if_name);
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_address = strdup(ipv4);
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].remote_address = strdup(ipv4_remote);
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_port = local_port;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].remote_port = remote_port;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].iq_txshift = iq_txshift;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].tx_sample_advance = tx_sample_advance;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].tx_scheduling_advance= tx_scheduling_advance;
|
||||
|
||||
if (strcmp(active, "yes") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].active = 1;
|
||||
}
|
||||
|
||||
if (strcmp(tr_preference, "udp") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udp = 1;
|
||||
} else if (strcmp(tr_preference, "raw") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].raw = 1;
|
||||
} else if (strcmp(tr_preference, "udp_if4p5") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udpif4p5 = 1;
|
||||
} else if (strcmp(tr_preference, "raw_if4p5") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif4p5 = 1;
|
||||
} else if (strcmp(tr_preference, "raw_if5_mobipass") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif5_mobipass = 1;
|
||||
} else {//if (strcmp(preference, "no") == 0)
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udp = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].raw = 1;
|
||||
}
|
||||
|
||||
if (strcmp(rf_preference, "exmimo") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].exmimo = 1;
|
||||
} else if (strcmp(rf_preference, "usrp_b200") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_b200 = 1;
|
||||
} else if (strcmp(rf_preference, "usrp_x300") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_x300 = 1;
|
||||
} else if (strcmp(rf_preference, "bladerf") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].bladerf = 1;
|
||||
} else if (strcmp(rf_preference, "lmsdr") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].lmssdr = 1;
|
||||
} else {//if (strcmp(preference, "no") == 0)
|
||||
for (j = 0; j < num_rrh_gw; j++) {
|
||||
setting_rrh_gw = config_setting_get_elem(setting_rrh_gws, j);
|
||||
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].exmimo = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_b200 = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_x300 = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].bladerf = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].lmssdr = 1;
|
||||
|
||||
}
|
||||
}
|
||||
if ( !(
|
||||
config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_LOCAL_IF_NAME, (const char **)&if_name)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_LOCAL_ADDRESS, (const char **)&ipv4)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_REMOTE_ADDRESS , (const char **)&ipv4_remote)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_LOCAL_PORT, &local_port)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_REMOTE_PORT, &remote_port)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_ACTIVE, (const char **)&active)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_TRANSPORT_PREFERENCE, (const char **)&tr_preference)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_RF_TARGET_PREFERENCE, (const char **)&rf_preference)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_IQ_TXSHIFT, &iq_txshift)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_TX_SAMPLE_ADVANCE, &tx_sample_advance)
|
||||
&& config_setting_lookup_int(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_TX_SCHEDULING_ADVANCE, &tx_scheduling_advance)
|
||||
&& config_setting_lookup_string(setting_rrh_gw, ENB_CONFIG_STRING_RRH_GW_IF_COMPRESSION, (const char **)&if_compression)
|
||||
)
|
||||
) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, %u th enb %u the RRH GW address !\n",
|
||||
lib_config_file_name_pP, i, j);
|
||||
continue; // FIXME will prevent segfaults below, not sure what happens at function exit...
|
||||
}
|
||||
|
||||
enb_properties.properties[enb_properties_index]->nb_rrh_gw += 1;
|
||||
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rrh_gw_if_name = strdup(if_name);
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_address = strdup(ipv4);
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].remote_address = strdup(ipv4_remote);
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_port = local_port;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].remote_port = remote_port;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].iq_txshift = iq_txshift;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].tx_sample_advance = tx_sample_advance;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].tx_scheduling_advance= tx_scheduling_advance;
|
||||
|
||||
if (strcmp(active, "yes") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].active = 1;
|
||||
}
|
||||
|
||||
if (strcmp(tr_preference, "udp") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udp = 1;
|
||||
} else if (strcmp(tr_preference, "raw") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].raw = 1;
|
||||
} else if (strcmp(tr_preference, "udp_if4p5") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udpif4p5 = 1;
|
||||
} else if (strcmp(tr_preference, "raw_if4p5") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif4p5 = 1;
|
||||
} else if (strcmp(tr_preference, "raw_if5_mobipass") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif5_mobipass = 1;
|
||||
} else {//if (strcmp(preference, "no") == 0)
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udp = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].raw = 1;
|
||||
}
|
||||
|
||||
if (strcmp(rf_preference, "exmimo") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].exmimo = 1;
|
||||
} else if (strcmp(rf_preference, "usrp_b200") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_b200 = 1;
|
||||
} else if (strcmp(rf_preference, "usrp_x300") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_x300 = 1;
|
||||
} else if (strcmp(rf_preference, "bladerf") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].bladerf = 1;
|
||||
} else if (strcmp(rf_preference, "lmsdr") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].lmssdr = 1;
|
||||
} else {//if (strcmp(preference, "no") == 0)
|
||||
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].exmimo = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_b200 = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_x300 = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].bladerf = 1;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].lmssdr = 1;
|
||||
|
||||
}
|
||||
|
||||
if (strcmp(if_compression, "alaw") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].if_compress = 1;
|
||||
} else if (strcmp(if_compression, "none") == 0) {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].if_compress = 0;
|
||||
} else {
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].if_compress = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
enb_properties.properties[enb_properties_index]->nb_rrh_gw = 0;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rrh_gw_if_name = "none";
|
||||
@@ -2421,8 +2433,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].usrp_x300 = 0;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].bladerf = 0;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].lmssdr = 0;
|
||||
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].if_compress = 0;
|
||||
}
|
||||
|
||||
|
||||
// SCTP SETTING
|
||||
enb_properties.properties[enb_properties_index]->sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
enb_properties.properties[enb_properties_index]->sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
@@ -85,6 +85,7 @@ typedef struct rrh_gw_config_s {
|
||||
uint8_t udpif4p5;
|
||||
uint8_t rawif4p5;
|
||||
uint8_t rawif5_mobipass;
|
||||
uint8_t if_compress;
|
||||
int tx_scheduling_advance;
|
||||
int tx_sample_advance;
|
||||
int iq_txshift;
|
||||
|
||||
@@ -181,6 +181,10 @@ const char* eurecomVariablesNames[] = {
|
||||
"ue0_trx_write_ns",
|
||||
"ue0_trx_read_ns_missing",
|
||||
"ue0_trx_write_ns_missing"
|
||||
"send_if4_symbol",
|
||||
"recv_if4_symbol",
|
||||
"send_if5_pkt_id",
|
||||
"recv_if5_pkt_id"
|
||||
};
|
||||
|
||||
const char* eurecomFunctionsNames[] = {
|
||||
@@ -375,7 +379,10 @@ const char* eurecomFunctionsNames[] = {
|
||||
"send_if4",
|
||||
"recv_if4",
|
||||
"send_if5",
|
||||
"recv_if5"
|
||||
"recv_if5",
|
||||
|
||||
"compress_if",
|
||||
"decompress_if"
|
||||
};
|
||||
|
||||
struct vcd_module_s vcd_modules[VCD_SIGNAL_DUMPER_MODULE_END] = {
|
||||
|
||||
@@ -147,6 +147,10 @@ typedef enum {
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN5,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN6,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN7,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF4_SYMBOL,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF5_PKT_ID,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF5_PKT_ID,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE_PDCP_FLUSH_SIZE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE_PDCP_FLUSH_ERR,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS,
|
||||
@@ -354,6 +358,9 @@ typedef enum {
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5,
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF,
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
||||
} vcd_signal_dump_functions;
|
||||
|
||||
@@ -242,6 +242,8 @@ typedef struct {
|
||||
uint8_t iq_txshift;
|
||||
//! transport type preference (RAW/UDP)
|
||||
uint8_t transp_preference;
|
||||
//! compression enable (0: No comp/ 1: A-LAW)
|
||||
uint8_t if_compress;
|
||||
//! radio front end preference (EXMIMO,USRP, BALDERF,LMSSDR)
|
||||
uint8_t rf_preference;
|
||||
} eth_params_t;
|
||||
|
||||
@@ -145,21 +145,28 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi
|
||||
memcpy(buff2,(void*)ð->eh,MAC_HEADER_SIZE_BYTES);
|
||||
*(int16_t *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int16_t))=1+(i<<1);
|
||||
*(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t)) = timestamp;
|
||||
|
||||
int sent_byte;
|
||||
|
||||
if (eth->compression = ALAW_COMPRESS) {
|
||||
sent_byte = RAW_PACKET_SIZE_BYTES_ALAW(nsamps);
|
||||
} else {
|
||||
sent_byte = RAW_PACKET_SIZE_BYTES(nsamps);
|
||||
}
|
||||
/*printf("[RRH]write mod_%d %d , len %d, buff %p \n",
|
||||
Mod_id,eth->sockfd[Mod_id],RAW_PACKET_SIZE_BYTES(nsamps), buff2);*/
|
||||
|
||||
while(bytes_sent < RAW_PACKET_SIZE_BYTES(nsamps)) {
|
||||
while(bytes_sent < sent_byte) {
|
||||
#if DEBUG
|
||||
printf("------- TX ------: buff2 current position=%d remaining_bytes=%d bytes_sent=%d \n",
|
||||
(void *)(buff2+bytes_sent),
|
||||
RAW_PACKET_SIZE_BYTES(nsamps) - bytes_sent,
|
||||
sent_byte - bytes_sent,
|
||||
bytes_sent);
|
||||
#endif
|
||||
/* Send packet */
|
||||
bytes_sent += send(eth->sockfd,
|
||||
buff2,
|
||||
RAW_PACKET_SIZE_BYTES(nsamps),
|
||||
sent_byte,
|
||||
sendto_flag);
|
||||
if ( bytes_sent == -1) {
|
||||
eth->num_tx_errors++;
|
||||
@@ -172,7 +179,7 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi
|
||||
*(int16_t *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int16_t)),
|
||||
*(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t)),
|
||||
bytes_sent);
|
||||
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, RAW_PACKET_SIZE_BYTES(nsamps), TX_FLAG);
|
||||
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, sent_byte, TX_FLAG);
|
||||
#endif
|
||||
eth->tx_actual_nsamps=bytes_sent>>2;
|
||||
eth->tx_count++;
|
||||
@@ -240,6 +247,8 @@ int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, voi
|
||||
int i=0;
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
int rcvfrom_flag =0;
|
||||
int block_cnt=0;
|
||||
int again_cnt=0;
|
||||
|
||||
eth->rx_nsamps=nsamps;
|
||||
|
||||
@@ -247,25 +256,54 @@ int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, voi
|
||||
/* buff[i] points to the position in rx buffer where the payload to be received will be placed
|
||||
buff2 points to the position in rx buffer where the packet header will be placed */
|
||||
void *buff2 = (void*)(buff[i]-APP_HEADER_SIZE_BYTES-MAC_HEADER_SIZE_BYTES);
|
||||
|
||||
|
||||
/* we don't want to ovewrite with the header info the previous rx buffer data so we store it*/
|
||||
struct ether_header temp = *(struct ether_header *)buff2;
|
||||
int32_t temp0 = *(int32_t *)(buff2 + MAC_HEADER_SIZE_BYTES);
|
||||
openair0_timestamp temp1 = *(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t));
|
||||
|
||||
|
||||
bytes_received=0;
|
||||
int receive_bytes;
|
||||
if (eth->compression == ALAW_COMPRESS) {
|
||||
receive_bytes = RAW_PACKET_SIZE_BYTES_ALAW(nsamps);
|
||||
} else {
|
||||
receive_bytes = RAW_PACKET_SIZE_BYTES(nsamps);
|
||||
}
|
||||
|
||||
while(bytes_received < RAW_PACKET_SIZE_BYTES(nsamps)) {
|
||||
while(bytes_received < receive_bytes) {
|
||||
again:
|
||||
bytes_received +=recv(eth->sockfd,
|
||||
buff2,
|
||||
RAW_PACKET_SIZE_BYTES(nsamps),
|
||||
receive_bytes,
|
||||
rcvfrom_flag);
|
||||
|
||||
|
||||
if (bytes_received ==-1) {
|
||||
eth->num_rx_errors++;
|
||||
perror("ETHERNET IF5 READ: ");
|
||||
if (errno == EAGAIN) continue;
|
||||
exit(-1);
|
||||
if (errno == EAGAIN) {
|
||||
again_cnt++;
|
||||
usleep(10);
|
||||
if (again_cnt == 1000) {
|
||||
perror("ETHERNET IF5 READ (EAGAIN): ");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN \n");
|
||||
goto again;
|
||||
}
|
||||
} else if (errno == EWOULDBLOCK) {
|
||||
block_cnt++;
|
||||
usleep(10);
|
||||
if (block_cnt == 1000) {
|
||||
perror("ETHERNET IF5 READ (EWOULDBLOCK): ");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK \n");
|
||||
goto again;
|
||||
}
|
||||
} else {
|
||||
perror("ETHERNET IF5 READ");
|
||||
printf("(%s):\n", strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
} else {
|
||||
/* store the timestamp value from packet's header */
|
||||
*timestamp = *(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t));
|
||||
@@ -280,7 +318,7 @@ int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, voi
|
||||
*(int16_t *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int16_t)),
|
||||
*(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t)),
|
||||
bytes_received);
|
||||
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, RAW_PACKET_SIZE_BYTES(nsamps),RX_FLAG);
|
||||
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, receive_bytes, RX_FLAG);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -303,19 +341,43 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam
|
||||
|
||||
ssize_t packet_size = MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t;
|
||||
IF4p5_header_t *test_header = (IF4p5_header_t*)(buff[0] + MAC_HEADER_SIZE_BYTES);
|
||||
int block_cnt=0;
|
||||
int again_cnt=0;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Reading from device %p, eth %p, sockfd %d\n",device,eth,eth->sockfd);
|
||||
#endif
|
||||
|
||||
bytes_received = recv(eth->sockfd,
|
||||
buff[0],
|
||||
packet_size,
|
||||
MSG_PEEK);
|
||||
if (bytes_received ==-1) {
|
||||
eth->num_rx_errors++;
|
||||
perror("ETHERNET IF4p5 READ (header): ");
|
||||
exit(-1);
|
||||
while (bytes_received < packet_size) {
|
||||
again:
|
||||
bytes_received = recv(eth->sockfd,
|
||||
buff[0],
|
||||
packet_size,
|
||||
MSG_PEEK);
|
||||
if (bytes_received ==-1) {
|
||||
eth->num_rx_errors++;
|
||||
if (errno == EAGAIN) {
|
||||
again_cnt++;
|
||||
usleep(10);
|
||||
if (again_cnt == 1000) {
|
||||
perror("ETHERNET IF4p5 READ (EAGAIN): ");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN \n");
|
||||
goto again;
|
||||
}
|
||||
} else if (errno == EWOULDBLOCK) {
|
||||
block_cnt++;
|
||||
usleep(10);
|
||||
if (block_cnt == 1000) {
|
||||
perror("ETHERNET IF4p5 READ (EWOULDBLOCK): ");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK \n");
|
||||
goto again;
|
||||
}
|
||||
} else {
|
||||
perror("ETHERNET IF4p5 READ");
|
||||
printf("(%s):\n", strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
for (int i=0;i<packet_size;i++)
|
||||
@@ -331,8 +393,7 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam
|
||||
packet_size = RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks);
|
||||
} else {
|
||||
packet_size = RAW_IF4p5_PRACH_SIZE_BYTES;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
while(bytes_received < packet_size) {
|
||||
bytes_received = recv(eth->sockfd,
|
||||
|
||||
@@ -260,22 +260,30 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
|
||||
// eth->pck_header.seq_num = pck_seq_num;
|
||||
//eth->pck_header.antenna_id = 1+(i<<1);
|
||||
//eth->pck_header.timestamp = timestamp;
|
||||
*(uint16_t *)buff2 = pck_seq_num;
|
||||
*(uint16_t *)buff2 = eth->pck_seq_num;
|
||||
*(uint16_t *)(buff2 + sizeof(uint16_t)) = 1+(i<<1);
|
||||
*(openair0_timestamp *)(buff2 + sizeof(int32_t)) = timestamp;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TX_SEQ_NUM, pck_seq_num);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TX_SEQ_NUM, eth->pck_seq_num);
|
||||
|
||||
int sent_byte;
|
||||
if (eth->compression == ALAW_COMPRESS) {
|
||||
sent_byte = UDP_PACKET_SIZE_BYTES_ALAW(nsamps);
|
||||
} else {
|
||||
sent_byte = UDP_PACKET_SIZE_BYTES(nsamps);
|
||||
}
|
||||
|
||||
while(bytes_sent < UDP_PACKET_SIZE_BYTES(nsamps)) {
|
||||
//while(bytes_sent < sent_byte) {
|
||||
//printf("eth->pck_seq_num: %d\n", eth->pck_seq_num);
|
||||
#if DEBUG
|
||||
printf("------- TX ------: buff2 current position=%d remaining_bytes=%d bytes_sent=%d \n",
|
||||
(void *)(buff2+bytes_sent),
|
||||
UDP_PACKET_SIZE_BYTES(nsamps) - bytes_sent,
|
||||
sent_byte - bytes_sent,
|
||||
bytes_sent);
|
||||
#endif
|
||||
/* Send packet */
|
||||
bytes_sent += sendto(eth->sockfd,
|
||||
buff2,
|
||||
UDP_PACKET_SIZE_BYTES(nsamps),
|
||||
sent_byte,
|
||||
sendto_flag,
|
||||
(struct sockaddr*)ð->dest_addr,
|
||||
eth->addr_len);
|
||||
@@ -291,14 +299,15 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
|
||||
*(int16_t *)(buff2 + sizeof(int16_t)),
|
||||
*(openair0_timestamp *)(buff2 + sizeof(int32_t)),
|
||||
bytes_sent);
|
||||
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, UDP_PACKET_SIZE_BYTES(nsamps), TX_FLAG);
|
||||
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, sent_byte, TX_FLAG);
|
||||
#endif
|
||||
eth->tx_actual_nsamps=bytes_sent>>2;
|
||||
eth->tx_count++;
|
||||
pck_seq_num++;
|
||||
if ( pck_seq_num > MAX_PACKET_SEQ_NUM(nsamps,device->openair0_cfg->samples_per_frame) ) pck_seq_num = 1;
|
||||
eth->pck_seq_num++;
|
||||
if ( eth->pck_seq_num > MAX_PACKET_SEQ_NUM(nsamps,device->openair0_cfg->samples_per_frame) ) eth->pck_seq_num = 1;
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
/* tx buffer values restored */
|
||||
*(int32_t *)buff2 = temp0;
|
||||
*(openair0_timestamp *)(buff2 + sizeof(int32_t)) = temp1;
|
||||
@@ -332,19 +341,24 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
|
||||
|
||||
bytes_received=0;
|
||||
block_cnt=0;
|
||||
int receive_bytes;
|
||||
if (eth->compression == ALAW_COMPRESS) {
|
||||
receive_bytes = UDP_PACKET_SIZE_BYTES_ALAW(nsamps);
|
||||
} else {
|
||||
receive_bytes = UDP_PACKET_SIZE_BYTES(nsamps);
|
||||
}
|
||||
|
||||
|
||||
while(bytes_received < UDP_PACKET_SIZE_BYTES(nsamps)) {
|
||||
while(bytes_received < receive_bytes) {
|
||||
again:
|
||||
#if DEBUG
|
||||
printf("------- RX------: buff2 current position=%d remaining_bytes=%d bytes_recv=%d \n",
|
||||
(void *)(buff2+bytes_received),
|
||||
UDP_PACKET_SIZE_BYTES(nsamps) - bytes_received,
|
||||
receive_bytes - bytes_received,
|
||||
bytes_received);
|
||||
#endif
|
||||
bytes_received +=recvfrom(eth->sockfd,
|
||||
buff2,
|
||||
UDP_PACKET_SIZE_BYTES(nsamps),
|
||||
receive_bytes,
|
||||
rcvfrom_flag,
|
||||
(struct sockaddr *)ð->dest_addr,
|
||||
(socklen_t *)ð->addr_len);
|
||||
@@ -379,28 +393,29 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
|
||||
*(int16_t *)(buff2 + sizeof(int16_t)),
|
||||
*(openair0_timestamp *)(buff2 + sizeof(int32_t)),
|
||||
bytes_received);
|
||||
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, UDP_PACKET_SIZE_BYTES(nsamps),RX_FLAG);
|
||||
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, receive_bytes, RX_FLAG);
|
||||
#endif
|
||||
|
||||
/* store the timestamp value from packet's header */
|
||||
*timestamp = *(openair0_timestamp *)(buff2 + sizeof(int32_t));
|
||||
/* store the sequence number of the previous packet received */
|
||||
if (pck_seq_num_cur == 0) {
|
||||
pck_seq_num_prev = *(uint16_t *)buff2;
|
||||
if (eth->pck_seq_num_cur == 0) {
|
||||
eth->pck_seq_num_prev = *(uint16_t *)buff2;
|
||||
} else {
|
||||
pck_seq_num_prev = pck_seq_num_cur;
|
||||
eth->pck_seq_num_prev = eth->pck_seq_num_cur;
|
||||
}
|
||||
/* get the packet sequence number from packet's header */
|
||||
pck_seq_num_cur = *(uint16_t *)buff2;
|
||||
//printf("cur=%d prev=%d buff=%d\n",pck_seq_num_cur,pck_seq_num_prev,*(uint16_t *)(buff2));
|
||||
if ( ( pck_seq_num_cur != (pck_seq_num_prev + 1) ) && !((pck_seq_num_prev==MAX_PACKET_SEQ_NUM(nsamps,device->openair0_cfg->samples_per_frame)) && (pck_seq_num_cur==1 )) && !((pck_seq_num_prev==1) && (pck_seq_num_cur==1))) {
|
||||
printf("out of order packet received1! %d|%d|%d\n",pck_seq_num_cur,pck_seq_num_prev,(int)*timestamp);
|
||||
eth->pck_seq_num_cur = *(uint16_t *)buff2;
|
||||
if ( ( eth->pck_seq_num_cur != (eth->pck_seq_num_prev + 1) ) && !((eth->pck_seq_num_prev==MAX_PACKET_SEQ_NUM(nsamps,device->openair0_cfg->samples_per_frame)) && (eth->pck_seq_num_cur==1 )) && !((eth->pck_seq_num_prev==1) && (eth->pck_seq_num_cur==1))) {
|
||||
//#if DEBUG
|
||||
printf("Out of order packet received: current_packet=%d previous_packet=%d timestamp=%llu\n",eth->pck_seq_num_cur,eth->pck_seq_num_prev,*timestamp);
|
||||
//#endif
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,pck_seq_num_cur);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,pck_seq_num_prev);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,eth->pck_seq_num_cur);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,eth->pck_seq_num_prev);
|
||||
eth->rx_actual_nsamps=bytes_received>>2;
|
||||
eth->rx_count++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* tx buffer values restored */
|
||||
|
||||
@@ -41,16 +41,24 @@
|
||||
#include <netinet/ether.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include "common_lib.h"
|
||||
#include "ethernet_lib.h"
|
||||
|
||||
|
||||
int num_devices_eth = 0;
|
||||
struct sockaddr_in dest_addr[MAX_INST];
|
||||
int dest_addr_len[MAX_INST];
|
||||
|
||||
|
||||
int trx_eth_start(openair0_device *device) {
|
||||
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
|
||||
/* initialize socket */
|
||||
if (eth->flags == ETH_RAW_MODE) {
|
||||
if (eth->flags == ETH_RAW_MODE) {
|
||||
printf("Setting ETHERNET to ETH_RAW_IF5_MODE\n");
|
||||
if (eth_socket_init_raw(device)!=0) return -1;
|
||||
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
|
||||
@@ -60,10 +68,14 @@ int trx_eth_start(openair0_device *device) {
|
||||
if(eth_get_dev_conf_raw(device)!=0) return -1;
|
||||
}
|
||||
/* adjust MTU wrt number of samples per packet */
|
||||
if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1;
|
||||
if(eth->compression == ALAW_COMPRESS) {
|
||||
if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES_ALAW(device->openair0_cfg->samples_per_packet))!=0) return -1;
|
||||
} else {
|
||||
if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1;
|
||||
}
|
||||
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
|
||||
} else if (eth->flags == ETH_RAW_IF4p5_MODE) {
|
||||
|
||||
|
||||
printf("Setting ETHERNET to ETH_RAW_IF4p5_MODE\n");
|
||||
if (eth_socket_init_raw(device)!=0) return -1;
|
||||
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
|
||||
@@ -74,11 +86,11 @@ int trx_eth_start(openair0_device *device) {
|
||||
}
|
||||
/* adjust MTU wrt number of samples per packet */
|
||||
if(ethernet_tune (device,MTU_SIZE,RAW_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
|
||||
|
||||
|
||||
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
|
||||
} else if (eth->flags == ETH_UDP_IF4p5_MODE) {
|
||||
printf("Setting ETHERNET to UDP_IF4p5_MODE\n");
|
||||
if (eth_socket_init_udp(device)!=0) return -1;
|
||||
if (eth_socket_init_udp(device)!=0) return -1;
|
||||
if (device->host_type == BBU_HOST) {
|
||||
if(eth_set_dev_conf_udp(device)!=0) return -1;
|
||||
} else {
|
||||
@@ -102,7 +114,9 @@ int trx_eth_start(openair0_device *device) {
|
||||
/* apply additional configuration */
|
||||
if(ethernet_tune (device, SND_BUF_SIZE,2000000000)!=0) return -1;
|
||||
if(ethernet_tune (device, RCV_BUF_SIZE,2000000000)!=0) return -1;
|
||||
|
||||
if(ethernet_tune (device, KERNEL_SND_BUF_MAX_SIZE, 200000000)!=0) return -1;
|
||||
if(ethernet_tune (device, KERNEL_RCV_BUF_MAX_SIZE, 200000000)!=0) return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -183,10 +197,12 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
struct timeval timeout;
|
||||
struct ifreq ifr;
|
||||
char system_cmd[256];
|
||||
// char* if_name=DEFAULT_IF;
|
||||
// struct in_addr ia;
|
||||
// struct if_nameindex *ids;
|
||||
char system_cmd[256];
|
||||
int rname[] = { CTL_NET, NET_CORE, NET_CORE_RMEM_MAX };
|
||||
int wname[] = { CTL_NET, NET_CORE, NET_CORE_WMEM_MAX };
|
||||
int namelen=3;
|
||||
int newval[1];
|
||||
int newlen=sizeof(newval);
|
||||
int ret=0;
|
||||
// int i=0;
|
||||
|
||||
@@ -309,7 +325,25 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
|
||||
perror("[ETHERNET] Can't set ring parameters\n");
|
||||
}
|
||||
break;
|
||||
|
||||
case KERNEL_RCV_BUF_MAX_SIZE:
|
||||
newval[0] = value;
|
||||
ret=sysctl(rname, namelen, NULL, 0, newval, newlen);
|
||||
if (ret) {
|
||||
fprintf(stderr,"[ETHERNET] Error using sysctl():%s\n",strerror(errno));
|
||||
} else{
|
||||
printf("[ETHERNET] Kernel network receive buffer max size is set to %u\n",newval[0]);
|
||||
}
|
||||
break;
|
||||
case KERNEL_SND_BUF_MAX_SIZE:
|
||||
newval[0] = value;
|
||||
ret=sysctl(wname, namelen, NULL, 0, newval, newlen);
|
||||
if (ret) {
|
||||
fprintf(stderr,"[ETHERNET] Error using sysctl():%s\n",strerror(errno));
|
||||
} else{
|
||||
printf("[ETHERNET] Kernel network send buffer max size is set to %u\n",newval[0]);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -337,6 +371,15 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
|
||||
printf("transport_init: Unknown transport preference %d - default to RAW", eth_params->transp_preference);
|
||||
eth->flags = ETH_RAW_MODE;
|
||||
}
|
||||
|
||||
if (eth_params->if_compress == 0) {
|
||||
eth->compression = NO_COMPRESS;
|
||||
} else if (eth_params->if_compress == 1) {
|
||||
eth->compression = ALAW_COMPRESS;
|
||||
} else {
|
||||
printf("transport_init: Unknown compression scheme %d - default to ALAW", eth_params->if_compress);
|
||||
eth->compression = ALAW_COMPRESS;
|
||||
}
|
||||
|
||||
printf("[ETHERNET]: Initializing openair0_device for %s ...\n", ((device->host_type == BBU_HOST) ? "BBU": "RRH"));
|
||||
device->Mod_id = 0;//num_devices_eth++;
|
||||
|
||||
@@ -78,6 +78,8 @@ typedef struct {
|
||||
unsigned int tx_timeout_ms;
|
||||
/*!\brief runtime flags */
|
||||
uint32_t flags;
|
||||
/*!\compression enalbe */
|
||||
uint32_t compression;
|
||||
/*!\ time offset between transmiter timestamp and receiver timestamp */
|
||||
double tdiff;
|
||||
/*!\ calibration */
|
||||
@@ -98,7 +100,7 @@ typedef struct {
|
||||
int num_seq_errors;
|
||||
/*!\brief number of errors in interface's receiver */
|
||||
int num_rx_errors;
|
||||
/*!\brief umber of errors in interface's transmitter */
|
||||
/*!\brief number of errors in interface's transmitter */
|
||||
int num_tx_errors;
|
||||
|
||||
/*!\brief current TX timestamp */
|
||||
@@ -117,6 +119,12 @@ typedef struct {
|
||||
uint64_t tx_count;
|
||||
/*!\brief number of packets received */
|
||||
uint64_t rx_count;
|
||||
/*!\brief TX sequence number*/
|
||||
uint16_t pck_seq_num;
|
||||
/*!\brief Current RX sequence number*/
|
||||
uint16_t pck_seq_num_cur;
|
||||
/*!\brief Previous RX sequence number */
|
||||
uint16_t pck_seq_num_prev;
|
||||
|
||||
struct ether_header eh;
|
||||
|
||||
@@ -155,6 +163,10 @@ typedef enum {
|
||||
COALESCE_PAR,
|
||||
/*!\brief pause parameters of ethernet device */
|
||||
PAUSE_PAR,
|
||||
/*!\brief kernel network receive buffer maximun size */
|
||||
KERNEL_RCV_BUF_MAX_SIZE,
|
||||
/*!\brief kernel network send buffer maximun size */
|
||||
KERNEL_SND_BUF_MAX_SIZE,
|
||||
MAX_OPT
|
||||
} eth_opt_t;
|
||||
|
||||
|
||||
@@ -47,6 +47,14 @@
|
||||
#define ETH_RAW_IF5_MOBIPASS 4
|
||||
#endif
|
||||
|
||||
// COMMOM HEADER LENGTHS
|
||||
|
||||
#define NO_COMPRESS 0
|
||||
#define ALAW_COMPRESS 1
|
||||
|
||||
#define UDP_HEADER_SIZE_BYTES 8
|
||||
#define IPV4_HEADER_SIZE_BYTES 60 // This is the maximum IPv4 header length
|
||||
|
||||
// Time domain RRH packet sizes
|
||||
#define MAC_HEADER_SIZE_BYTES (sizeof(struct ether_header))
|
||||
#define MAX_PACKET_SEQ_NUM(spp,spf) (spf/spp)
|
||||
@@ -54,6 +62,10 @@
|
||||
#define UDP_PACKET_SIZE_BYTES(nsamps) (APP_HEADER_SIZE_BYTES + PAYLOAD_SIZE_BYTES(nsamps))
|
||||
#define RAW_PACKET_SIZE_BYTES(nsamps) (APP_HEADER_SIZE_BYTES + MAC_HEADER_SIZE_BYTES + PAYLOAD_SIZE_BYTES(nsamps))
|
||||
|
||||
#define PAYLOAD_SIZE_BYTES_ALAW(nsamps) (nsamps<<1)
|
||||
#define UDP_PACKET_SIZE_BYTES_ALAW(nsamps) (APP_HEADER_SIZE_BYTES + PAYLOAD_SIZE_BYTES_ALAW(nsamps))
|
||||
#define RAW_PACKET_SIZE_BYTES_ALAW(nsamps) (APP_HEADER_SIZE_BYTES + MAC_HEADER_SIZE_BYTES + PAYLOAD_SIZE_BYTES_ALAW(nsamps))
|
||||
|
||||
// Packet sizes for IF4p5 interface format
|
||||
#define DATA_BLOCK_SIZE_BYTES(scaled_nblocks) (sizeof(uint16_t)*scaled_nblocks)
|
||||
#define PRACH_HARD_CODED_NUM_SAMPLES (839*2)
|
||||
|
||||
@@ -254,6 +254,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
},
|
||||
//second config for Ercom
|
||||
{
|
||||
|
||||
@@ -166,7 +166,8 @@ eNBs =
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RCC_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "127.0.0.3";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "lo";
|
||||
remote_address = "127.0.0.1";
|
||||
local_address = "127.0.0.2";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -167,6 +167,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RCC_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "127.0.0.3";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "lo";
|
||||
remote_address = "127.0.0.1";
|
||||
local_address = "127.0.0.2";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -167,7 +167,8 @@ eNBs =
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -170,7 +170,8 @@ eNBs =
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -171,6 +171,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -167,7 +167,8 @@ eNBs =
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -166,7 +166,8 @@ eNBs =
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -169,6 +169,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RRU_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 120;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -95;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "lo";
|
||||
remote_address = "127.0.0.2";
|
||||
local_address = "127.0.0.1";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -169,6 +169,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RRU_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 120;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -95;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "lo";
|
||||
remote_address = "127.0.0.2";
|
||||
local_address = "127.0.0.1";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -168,6 +168,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -169,6 +169,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -166,6 +166,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -169,6 +169,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -166,6 +166,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ eNBs =
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -161,6 +161,29 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
|
||||
void stop_eNB(int nb_inst);
|
||||
|
||||
|
||||
static int recv_if_count = 0;
|
||||
struct timespec start_rf_new, start_rf_prev, start_rf_prev2, end_rf;
|
||||
openair0_timestamp start_rf_new_ts, start_rf_prev_ts, start_rf_prev2_ts, end_rf_ts;
|
||||
extern struct timespec start_fh, start_fh_prev;
|
||||
extern int start_fh_sf, start_fh_prev_sf;
|
||||
struct timespec end_fh;
|
||||
int end_fh_sf;
|
||||
int clock_difftime_ns(struct timespec start, struct timespec end)
|
||||
{
|
||||
struct timespec temp;
|
||||
int temp_ns;
|
||||
|
||||
if ((end.tv_nsec-start.tv_nsec)<0) {
|
||||
temp.tv_sec = end.tv_sec-start.tv_sec-1;
|
||||
temp.tv_nsec = 1000000000+end.tv_nsec-start.tv_nsec;
|
||||
} else {
|
||||
temp.tv_sec = end.tv_sec-start.tv_sec;
|
||||
temp.tv_nsec = end.tv_nsec-start.tv_nsec;
|
||||
}
|
||||
temp_ns = (temp.tv_sec) * 1000000000 + (temp.tv_nsec);
|
||||
return temp_ns;
|
||||
}
|
||||
|
||||
static inline void thread_top_init(char *thread_name,
|
||||
int affinity,
|
||||
uint64_t runtime,
|
||||
@@ -401,6 +424,7 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
|
||||
}
|
||||
}
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN , 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -747,13 +771,18 @@ void fh_if5_asynch_DL(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
||||
openair0_timestamp timestamp_tx;
|
||||
|
||||
recv_IF5(eNB, ×tamp_tx, *subframe, IF5_RRH_GW_DL);
|
||||
//printf("Received subframe %d (TS %llu) from RCC\n",subframe_tx,timestamp_tx);
|
||||
clock_gettime( CLOCK_MONOTONIC, &end_fh);
|
||||
end_fh_sf = *subframe;
|
||||
recv_if_count = recv_if_count + 1;
|
||||
LOG_D(HW,"[From SF %d to SF %d] RTT_FH: %d\n", start_fh_prev_sf, end_fh_sf, clock_difftime_ns(start_fh_prev, end_fh));
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
|
||||
|
||||
subframe_tx = (timestamp_tx/fp->samples_per_tti)%10;
|
||||
frame_tx = (timestamp_tx/(fp->samples_per_tti*10))&1023;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB, frame_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB, subframe_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB, subframe_tx );
|
||||
|
||||
if (proc->first_tx != 0) {
|
||||
*subframe = subframe_tx;
|
||||
@@ -828,7 +857,7 @@ void fh_if4p5_asynch_DL(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
||||
exit_fun("Exiting");
|
||||
}
|
||||
} while (proc->symbol_mask[*subframe] != symbol_mask_full);
|
||||
|
||||
|
||||
*frame = frame_tx;
|
||||
|
||||
|
||||
@@ -912,6 +941,7 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
||||
// Transmit TX buffer based on timestamp from RX
|
||||
// printf("trx_write -> USRP TS %llu (sf %d)\n", (proc->timestamp_rx+(3*fp->samples_per_tti)),(proc->subframe_rx+2)%10);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_rx+(tx_sfoffset*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance)&0xffffffff );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
|
||||
// prepare tx buffer pointers
|
||||
|
||||
lte_subframe_t SF_type = subframe_select(fp,(proc->subframe_rx+tx_sfoffset)%10);
|
||||
@@ -949,7 +979,13 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
||||
siglen,
|
||||
fp->nb_antennas_tx,
|
||||
flags);
|
||||
|
||||
clock_gettime( CLOCK_MONOTONIC, &end_rf);
|
||||
end_rf_ts = proc->timestamp_rx+eNB->ts_offset+(tx_sfoffset*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance;
|
||||
if (recv_if_count != 0 ) {
|
||||
recv_if_count = recv_if_count-1;
|
||||
LOG_D(HW,"[From Timestamp %d to Timestamp %d] RTT_RF: %d; RTT_RF\n", start_rf_prev_ts, end_rf_ts, clock_difftime_ns(start_rf_prev, end_rf));
|
||||
LOG_D(HW,"[From Timestamp %d to Timestamp %d] RTT_RF: %d; RTT_RF\n",start_rf_prev2_ts, end_rf_ts, clock_difftime_ns(start_rf_prev2, end_rf));
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
|
||||
|
||||
@@ -973,6 +1009,13 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
||||
rxp,
|
||||
fp->samples_per_tti,
|
||||
fp->nb_antennas_rx);
|
||||
start_rf_prev2= start_rf_prev;
|
||||
start_rf_prev2_ts= start_rf_prev_ts;
|
||||
start_rf_prev = start_rf_new;
|
||||
start_rf_prev_ts = start_rf_new_ts;
|
||||
clock_gettime( CLOCK_MONOTONIC, &start_rf_new);
|
||||
start_rf_new_ts = ts;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
||||
|
||||
proc->timestamp_rx = ts-eNB->ts_offset;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user