Commit 30639de5 authored by liuxu's avatar liuxu

vcd test 231202

parent 57982e79
......@@ -2039,6 +2039,11 @@ target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs
target_link_libraries(lte-uesoftmodem PRIVATE
asn1_lte_rrc asn1_s1ap asn1_m2ap asn1_m3ap asn1_x2ap)
add_executable(vcd_test_main
${OPENAIR_DIR}/executables/vcdmain.c)
target_link_libraries(vcd_test_main PRIVATE UTIL pthread)
# nr-softmodem
###################################################
......@@ -2069,7 +2074,7 @@ target_link_libraries(nr-softmodem PRIVATE
ITTI ${NAS_UE_LIB} lte_rrc nr_rrc
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU SIMU_ETH
x2ap f1ap m2ap m3ap e1ap shlib_loader
-Wl,--end-group z dl)
-Wl,--end-group z dl python3.6m)
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt sctp)
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
......@@ -2079,7 +2084,7 @@ if(E2_AGENT)
target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
endif()
target_include_directories(nr-softmodem PRIVATE /usr/include/python3.6m)
add_dependencies(nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
if (ENABLE_LDPC_T1)
......
......@@ -257,6 +257,11 @@ function main() {
TARGET_LIST="$TARGET_LIST nr-uesoftmodem"
echo_info "Will compile NR UE"
shift;;
--vcdtest)
vcdtest=1
TARGET_LIST="$TARGET_LIST vcd_test_main"
echo_info "Will compile vcd_test_main"
shift;;
--mu)
CMAKE_CMD="$CMAKE_CMD -DUE_EXPANSION=True -DPRE_SCD_THREAD=True"
echo_info "Will compile with UE_EXPANSION"
......
......@@ -545,7 +545,8 @@ const char* eurecomFunctionsNames[] = {
"pss_synchro_nr",
"pss_search_time_nr",
"nr_initial_ue_sync",
"beam_switching_gpio"
"beam_switching_gpio",
"lxtest"
};
struct vcd_module_s vcd_modules[] = {
......
......@@ -538,7 +538,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC,
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,
VCD_SIGNAL_DUMPER_FUNCTIONS_LXTEST,
VCD_SIGNAL_DUMPER_FUNCTIONS_END
} vcd_signal_dump_functions;
......
......@@ -17,7 +17,7 @@
static int T_IDs[T_NUMBER_OF_IDS];
int *T_active = T_IDs;
int T_stdout = 1;
int T_stdout = 2;
static int T_socket;
static int local_tracer_pid;
......@@ -188,17 +188,17 @@ void T_init(int remote_port, int wait_for_tracer)
void T_Config_Init(void)
{
int T_port = TTRACER_DEFAULT_PORTNUM;
int T_port = 2021;//TTRACER_DEFAULT_PORTNUM;
int T_nowait = 0;
paramdef_t ttraceparams[] = CMDLINE_TTRACEPARAMS_DESC;
config_get(ttraceparams,
sizeof(ttraceparams) / sizeof(paramdef_t),
TTRACER_CONFIG_PREFIX);
/* compatibility: look for TTracer command line options in root section */
config_process_cmdline(ttraceparams,
sizeof(ttraceparams) / sizeof(paramdef_t),
NULL);
// paramdef_t ttraceparams[] = CMDLINE_TTRACEPARAMS_DESC;
// config_get(ttraceparams,
// sizeof(ttraceparams) / sizeof(paramdef_t),
// TTRACER_CONFIG_PREFIX);
// /* compatibility: look for TTracer command line options in root section */
// config_process_cmdline(ttraceparams,
// sizeof(ttraceparams) / sizeof(paramdef_t),
// NULL);
if (T_stdout < 0 || T_stdout > 2) {
printf("fatal error: T_stdout = %d but only values 0, 1, or 2 are allowed\n", T_stdout);
......
......@@ -63,7 +63,7 @@ typedef struct {
} T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (273)
#define VCD_NUM_FUNCTIONS (274)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (187)
......
......@@ -3602,4 +3602,9 @@ ID = VCD_FUNCTION_BEAM_SWITCHING_GPIO
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = beam_switching_gpio
ID = VCD_FUNCTION_LXTEST
DESC = VCD function LXTEST
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = lxtest
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "T.h"
/*
cd cmake_targets
compile: sudo ./build_oai --vcdtest
run: sudo ./ran_build/build/vcd_test_main
*/
int main( int argc, char **argv ) {
#if T_TRACER
T_Config_Init();
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LXTEST, 1);
sleep(5);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LXTEST, 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO, 1);
sleep(5);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO, 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, 1);
sleep(5);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR, 1);
sleep(5);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR, 0);
return 0;
}
\ No newline at end of file
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