Merge remote-tracking branch 'origin/develop' into RU-RAU-split
Conflicts: openair1/PHY/INIT/lte_init.c openair1/PHY/LTE_ESTIMATION/defs.h openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c openair1/PHY/LTE_TRANSPORT/dci.c openair1/PHY/LTE_TRANSPORT/dci_tools.c openair1/PHY/LTE_TRANSPORT/defs.h openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c openair1/PHY/LTE_TRANSPORT/if5_tools.c openair1/PHY/LTE_TRANSPORT/phich.c openair1/PHY/LTE_TRANSPORT/proto.h openair1/PHY/defs.h openair1/SCHED/phy_procedures_lte_eNb.c openair1/SCHED/phy_procedures_lte_ue.c openair1/SCHED/pusch_pc.c openair2/ENB_APP/enb_config.c openair2/LAYER2/MAC/defs.h openair2/LAYER2/MAC/eNB_scheduler.c openair2/LAYER2/MAC/eNB_scheduler_dlsch.c openair2/LAYER2/MAC/eNB_scheduler_primitives.c openair2/LAYER2/MAC/eNB_scheduler_ulsch.c openair2/LAYER2/MAC/pre_processor.c openair2/LAYER2/MAC/ue_procedures.c targets/RT/USER/lte-enb.c targets/RT/USER/lte-softmodem.c targets/RT/USER/lte-softmodem.h targets/RT/USER/lte-ue.c targets/SIMU/USER/init_lte.c targets/SIMU/USER/oaisim_functions.c
This commit is contained in:
@@ -29,10 +29,10 @@ typedef struct {
|
||||
#define T_SHM_FILENAME "/T_shm_segment"
|
||||
|
||||
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_NUM_FUNCTIONS 142
|
||||
#define VCD_NUM_FUNCTIONS 172
|
||||
|
||||
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_NUM_VARIABLES 107
|
||||
#define VCD_NUM_VARIABLES 118
|
||||
|
||||
/* first VCD function (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
|
||||
|
||||
@@ -45,6 +45,10 @@ ID = ENB_PHY_INPUT_SIGNAL
|
||||
DESC = eNodeB received signal in the time domain for a duration of 1ms
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
|
||||
FORMAT = int,eNB_ID : int,frame : int,subframe : int,antenna : buffer,rxdata
|
||||
ID = ENB_PHY_OUTPUT_SIGNAL
|
||||
DESC = eNodeB sent signal in the time domain for a duration of 1ms
|
||||
GROUP = ALL:PHY:HEAVY:ENB
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,frame : int,subframe : int,antenna : buffer,txdata
|
||||
ID = ENB_PHY_UL_CHANNEL_ESTIMATE
|
||||
DESC = eNodeB channel estimation in the time domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
|
||||
@@ -111,6 +115,10 @@ ID = ENB_MAC_UE_DL_PDU_WITH_DATA
|
||||
DESC = MAC downlink PDU for an UE
|
||||
GROUP = ALL:MAC:ENB
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data
|
||||
ID = ENB_MAC_SCHEDULING_REQUEST
|
||||
DESC = MAC scheduling request detected for an UE
|
||||
GROUP = ALL:MAC:ENB
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,frame : int,subframe : int,rnti
|
||||
|
||||
#RLC logs
|
||||
ID = ENB_RLC_DL
|
||||
@@ -1350,6 +1358,22 @@ ID = VCD_VARIABLE_UE0_SFN7
|
||||
DESC = VCD variable UE0_SFN7
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
ID = VCD_VARIABLE_SEND_IF4_SYMBOL
|
||||
DESC = VCD variable SEND_IF4_SYMBOL
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
ID = VCD_VARIABLE_RECV_IF4_SYMBOL
|
||||
DESC = VCD variable RECV_IF4_SYMBOL
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
ID = VCD_VARIABLE_SEND_IF5_PKT_ID
|
||||
DESC = VCD variable SEND_IF5_PKT_ID
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
ID = VCD_VARIABLE_RECV_IF5_PKT_ID
|
||||
DESC = VCD variable RECV_IF5_PKT_ID
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
ID = VCD_VARIABLE_UE_PDCP_FLUSH_SIZE
|
||||
DESC = VCD variable UE_PDCP_FLUSH_SIZE
|
||||
GROUP = ALL:VCD:ENB:UE:VCD_VARIABLE
|
||||
@@ -2061,3 +2085,11 @@ ID = VCD_FUNCTION_RECV_IF5
|
||||
DESC = VCD function RECV_IF5
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_TRX_COMPR_IF
|
||||
DESC = VCD function TRX_COMPR_IF
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_TRX_DECOMPR_IF
|
||||
DESC = VCD function TRX_DECOMPR_IF
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
|
||||
@@ -5,7 +5,8 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I.
|
||||
|
||||
LIBS=-lX11 -lm -lpng -lXft
|
||||
|
||||
all: record replay extract_config textlog enb ue vcd macpdu2wireshark
|
||||
all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
|
||||
extract_input_subframe
|
||||
|
||||
record: utils.o record.o database.o config.o
|
||||
$(CC) $(CFLAGS) -o record $^ $(LIBS)
|
||||
@@ -16,6 +17,10 @@ replay: utils.o replay.o
|
||||
extract_config: extract_config.o
|
||||
$(CC) $(CFLAGS) -o extract_config $^ $(LIBS)
|
||||
|
||||
extract_input_subframe: extract_input_subframe.o database.o event.o utils.o \
|
||||
config.o
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
textlog: utils.o textlog.o database.o event.o handler.o config.o \
|
||||
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
||||
filter/filter.a
|
||||
@@ -58,8 +63,8 @@ filter/filter.a:
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f *.o core tracer_remote textlog enb vcd record replay
|
||||
rm -f extract_config macpdu2wireshark
|
||||
rm -f *.o core tracer_remote textlog enb ue vcd record replay
|
||||
rm -f extract_config macpdu2wireshark extract_input_subframe
|
||||
cd gui && make clean
|
||||
cd view && make clean
|
||||
cd logger && make clean
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "config.h"
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
printf(
|
||||
"usage: [options] <file> <frame> <subframe>\n"
|
||||
"options:\n"
|
||||
" -d <database file> this option is mandatory\n"
|
||||
" -v verbose\n"
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int main(int n, char **v)
|
||||
{
|
||||
char *database_filename = NULL;
|
||||
void *database;
|
||||
int i;
|
||||
int input_event_id;
|
||||
database_event_format f;
|
||||
char *file = NULL;
|
||||
int fd;
|
||||
int frame = -1, subframe = -1;
|
||||
int frame_arg, subframe_arg, buffer_arg;
|
||||
int verbose = 0;
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
||||
if (!strcmp(v[i], "-d"))
|
||||
{ if (i > n-2) usage(); database_filename = v[++i]; continue; }
|
||||
if (!strcmp(v[i], "-v")) { verbose = 1; continue; }
|
||||
if (file == NULL) { file = v[i]; continue; }
|
||||
if (frame == -1) { frame = atoi(v[i]); continue; }
|
||||
if (subframe == -1) { subframe = atoi(v[i]); continue; }
|
||||
usage();
|
||||
}
|
||||
if (file == NULL || frame == -1 || subframe == -1) usage();
|
||||
|
||||
if (database_filename == NULL) {
|
||||
printf("ERROR: provide a database file (-d)\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
database = parse_database(database_filename);
|
||||
|
||||
load_config_file(database_filename);
|
||||
|
||||
input_event_id = event_id_from_name(database, "ENB_PHY_INPUT_SIGNAL");
|
||||
f = get_format(database, input_event_id);
|
||||
|
||||
frame_arg = subframe_arg = buffer_arg = -1;
|
||||
for (i = 0; i < f.count; i++) {
|
||||
if (!strcmp(f.name[i], "frame")) {
|
||||
if (frame_arg != -1) goto err;
|
||||
if (strcmp(f.type[i], "int")) goto err;
|
||||
frame_arg = i;
|
||||
}
|
||||
if (!strcmp(f.name[i], "subframe")) {
|
||||
if (subframe_arg != -1) goto err;
|
||||
if (strcmp(f.type[i], "int")) goto err;
|
||||
subframe_arg = i;
|
||||
}
|
||||
if (!strcmp(f.name[i], "rxdata")) {
|
||||
if (buffer_arg != -1) goto err;
|
||||
if (strcmp(f.type[i], "buffer")) goto err;
|
||||
buffer_arg = i;
|
||||
}
|
||||
continue;
|
||||
err:
|
||||
printf("cannot deal with ENB_PHY_INPUT_SIGNAL from database file\n");
|
||||
exit(1);
|
||||
}
|
||||
if (frame_arg == -1 || subframe_arg == -1 || buffer_arg == -1) goto err;
|
||||
|
||||
fd = open(file, O_RDONLY);
|
||||
if (fd == -1) { perror(file); exit(1); }
|
||||
|
||||
/* get wanted frame/subframe */
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(fd, v, database);
|
||||
if (e.type == -1) break;
|
||||
if (e.type != input_event_id) continue;
|
||||
if (verbose)
|
||||
printf("input frame %d subframe %d size %d\n",
|
||||
e.e[frame_arg].i, e.e[subframe_arg].i, e.e[buffer_arg].bsize);
|
||||
if (!(frame == e.e[frame_arg].i && subframe == e.e[subframe_arg].i))
|
||||
continue;
|
||||
#if 0
|
||||
for (i = 0; i < e.e[buffer_arg].bsize/2; i++) {
|
||||
short *x = e.e[buffer_arg].b;
|
||||
x[i] *= 14;
|
||||
}
|
||||
#endif
|
||||
fwrite(e.e[buffer_arg].b, e.e[buffer_arg].bsize, 1, stdout);
|
||||
fflush(stdout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
printf("frame %d subframe %d not found\n", frame, subframe);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user