Commit aaa71cfc authored by younes's avatar younes

Added stats for trx_read/write if4.5

parent 406e46d5
......@@ -103,6 +103,8 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
packet_header->frame_status &= ~(0x000f<<26);
packet_header->frame_status |= (symbol_id&0x000f)<<26;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 );
start_meas(&eNB->trx_write_if4p5_stats);
if ((eNB->ifdevice.trx_write_func(&eNB->ifdevice,
symbol_id,
&tx_buffer,
......@@ -111,6 +113,8 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
IF4p5_PDLFFT)) < 0) {
perror("ETHERNET write for IF4p5_PDLFFT\n");
}
stop_meas(&eNB->trx_write_if4p5_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 0 );
slotoffsetF += fp->ofdm_symbol_size;
blockoffsetF += fp->ofdm_symbol_size;
......@@ -155,6 +159,7 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
packet_header->frame_status &= ~(0x000f<<26);
packet_header->frame_status |= (symbol_id&0x000f)<<26;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 );
start_meas(&eNB->trx_write_if4p5_stats);
if ((eNB->ifdevice.trx_write_func(&eNB->ifdevice,
symbol_id,
&tx_buffer,
......@@ -163,6 +168,7 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
IF4p5_PULFFT)) < 0) {
perror("ETHERNET write for IF4p5_PULFFT\n");
}
stop_meas(&eNB->trx_write_if4p5_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 0 );
slotoffsetF += fp->ofdm_symbol_size;
blockoffsetF += fp->ofdm_symbol_size;
......@@ -252,6 +258,8 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t
uint16_t *data_block=NULL, *i=NULL;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 1 );
start_meas(&eNB->trx_read_if4p5_stats);
if (eNB->ifdevice.trx_read_func(&eNB->ifdevice,
(int64_t*) packet_type,
&rx_buffer,
......@@ -259,6 +267,8 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t
0) < 0) {
perror("ETHERNET read");
}
stop_meas(&eNB->trx_read_if4p5_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 0 );
if (eth->flags == ETH_RAW_IF4p5_MODE) {
packet_header = (IF4p5_header_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES);
......
......@@ -635,6 +635,9 @@ typedef struct PHY_VARS_eNB_s {
// IF4 stats
time_stats_t send_if4p5_stats;
time_stats_t recv_if4p5_stats;
time_stats_t trx_write_if4p5_stats;
time_stats_t trx_read_if4p5_stats;
#ifdef LOCALIZATION
/// time state for localization
......
......@@ -680,11 +680,16 @@ static void* print_stats_thread( void* param ) {
printf("[eNB] Launching print_stats thread...\n");
reset_meas(&eNB->send_if4p5_stats);
reset_meas(&eNB->recv_if4p5_stats);
reset_meas(&eNB->trx_write_if4p5_stats);
reset_meas(&eNB->trx_read_if4p5_stats);
while (!oai_exit) {
sleep(2);
print_meas(&eNB->send_if4p5_stats, "send_if4p5_stats", NULL, NULL);
print_meas(&eNB->recv_if4p5_stats, "recv_if4p5_stats", NULL, NULL);
print_meas(&eNB->trx_write_if4p5_stats, "trx_write_if4p5_stats", NULL, NULL);
print_meas(&eNB->trx_read_if4p5_stats, "trx_read_if4p5_stats", NULL, NULL);
}
}
......
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